This is an automated email from the ASF dual-hosted git repository.

sciabarracom pushed a commit to branch 0.9.0
in repository https://gitbox.apache.org/repos/asf/openserverless-runtimes.git

commit 1e6f9903ec79dcb2a95bf1e5c01d5724615b4bd5
Author: Michele Sciabarra <[email protected]>
AuthorDate: Sun Sep 6 09:28:54 2026 +0200

    fixes to runtime tests
---
 Taskfile.yml                            | 8 ++++++++
 openwhisk/_test/build.sh                | 2 +-
 openwhisk/actionProxy_test.go           | 2 +-
 openwhisk/common/gobuild.py             | 2 ++
 openwhisk/common/gobuild.py.launcher.go | 2 ++
 5 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/Taskfile.yml b/Taskfile.yml
index 50c71f5..e1e983f 100644
--- a/Taskfile.yml
+++ b/Taskfile.yml
@@ -80,9 +80,17 @@ tasks:
 
   compile: go build -o proxy
 
+  test-prep: ln -sf $(which python3) /usr/local/bin/python
+
   test:
     dir: openwhisk
     cmds:
+      - |
+        if ! /usr/local/bin/python --version | grep 'Python 3'
+        then echo 'you need to link a python 3 to /usr/local/bin/python to run 
the tests (do not ask why)'
+             echo tast test-init does it for you if you have a python3 and sudo
+             exit 1
+        fi
       - go test -v
 
   docker-login:
diff --git a/openwhisk/_test/build.sh b/openwhisk/_test/build.sh
index 0aa5ed7..b2d40e9 100755
--- a/openwhisk/_test/build.sh
+++ b/openwhisk/_test/build.sh
@@ -27,7 +27,7 @@ function build {
 
 function build_main {
    test -e exec && rm exec
-   cp ../common/gobuild.py.launcher.go $1.go
+   grep -v '^//go:build ' ../common/gobuild.py.launcher.go >$1.go
    cat $1.src >>$1.go
    go build -a -o exec $1.go
    rm $1.go
diff --git a/openwhisk/actionProxy_test.go b/openwhisk/actionProxy_test.go
index 0a67f05..2e0d1c1 100644
--- a/openwhisk/actionProxy_test.go
+++ b/openwhisk/actionProxy_test.go
@@ -144,7 +144,7 @@ func Example_badcompile() {
 
 }
 
-func Example_SetEnv() {
+func Example_setEnv() {
        ap := NewActionProxy("", "", nil, nil, ProxyModeNone)
        fmt.Println(ap.env)
        var m map[string]interface{}
diff --git a/openwhisk/common/gobuild.py b/openwhisk/common/gobuild.py
index 3ea3cdd..98322fa 100755
--- a/openwhisk/common/gobuild.py
+++ b/openwhisk/common/gobuild.py
@@ -48,6 +48,8 @@ def sources(launcher, source_dir, main):
         with codecs.open(dst, 'w', 'utf-8') as d:
             with codecs.open(launcher, 'r', 'utf-8') as e:
                 code = e.read()
+                # strip the build tag that keeps this template out of `go 
build ./...`
+                code = re.sub(r"^//go:build .*\n", "", code, 
flags=re.MULTILINE)
                 code = code.replace("Main", func)
                 d.write(code)
 
diff --git a/openwhisk/common/gobuild.py.launcher.go 
b/openwhisk/common/gobuild.py.launcher.go
index 91f9b2e..d3c7597 100644
--- a/openwhisk/common/gobuild.py.launcher.go
+++ b/openwhisk/common/gobuild.py.launcher.go
@@ -1,3 +1,5 @@
+//go:build launcher_template
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with

Reply via email to