21394: Use v1.2.1 tag for CWL conformance tests
[arvados.git] / sdk / cwl / test_with_arvbox.sh
index 354d6f0e567f5e4fb93b8d3c96acd8af132b25dd..1742e68df8333a9b97e9912fa423163ac4a6a57e 100755 (executable)
@@ -14,9 +14,9 @@ leave_running=0
 config=dev
 devcwl=0
 tag="latest"
-pythoncmd=python3
 suite=conformance
 runapi=containers
+reinstall=0
 
 while test -n "$1" ; do
     arg="$1"
@@ -45,8 +45,12 @@ while test -n "$1" ; do
             devcwl=1
             shift
             ;;
+        --reinstall)
+            reinstall=1
+            shift
+            ;;
         --pythoncmd)
-            pythoncmd=$2
+            echo "warning: --pythoncmd option is no longer supported; ignored" >&2
             shift ; shift
             ;;
         --suite)
@@ -58,7 +62,7 @@ while test -n "$1" ; do
             shift ; shift
             ;;
         -h|--help)
-            echo "$0 [--no-reset-container] [--leave-running] [--config dev|localdemo] [--tag docker_tag] [--build] [--pythoncmd python(2|3)] [--suite (integration|conformance-v1.0|conformance-*)]"
+            echo "$0 [--no-reset-container] [--leave-running] [--config dev|localdemo] [--tag docker_tag] [--build] [--suite (integration|conformance-v1.0|conformance-*)]"
             exit
             ;;
         *)
@@ -94,21 +98,17 @@ set -eu -o pipefail
 
 . /usr/local/lib/arvbox/common.sh
 
-export PYCMD=$pythoncmd
-
-if test $config = dev ; then
-  cd /usr/src/arvados/sdk/cwl
-  \$PYCMD setup.py sdist
-  pip_install \$(ls -r dist/arvados-cwl-runner-*.tar.gz | head -n1)
+if test $config = dev -o $reinstall = 1; then
+  pip_install_sdist sdk/python sdk/cwl
 fi
 
 set -x
 
-if [ "\$PYCMD" = "python3" ]; then
-    pip3 install cwltest
-else
-    pip install cwltest
-fi
+# 2.3.20230527113600 release of cwltest confirms that files exist on disk, since
+# our files are in Keep, all the tests fail.
+# We should add [optional] Arvados support to cwltest so it can access
+# Keep but for the time being just install the last working version.
+/opt/arvados-py/bin/pip install 'cwltest<2.3.20230527113600'
 
 mkdir -p /tmp/cwltest
 cd /tmp/cwltest
@@ -130,6 +130,14 @@ elif [[ "$suite" != "integration" ]] ; then
    exit 1
 fi
 
+if [[ "$suite" = "conformance-v1.1" ]] ; then
+   git checkout main
+fi
+
+if [[ "$suite" = "conformance-v1.2" ]] ; then
+   git checkout v1.2.1
+fi
+
 #if [[ "$suite" != "integration" ]] ; then
 #  git pull
 #fi
@@ -150,6 +158,9 @@ fi
 
 env
 
+arvados-cwl-runner --version
+cwltest --version
+
 # Skip docker_entrypoint test because it fails on singularity
 #
 # Skip timelimit_invalid_wf test because the timeout is very short
@@ -167,7 +178,7 @@ if [[ "$suite" = "integration" ]] ; then
    cd /usr/src/arvados/sdk/cwl/tests
    exec ./arvados-tests.sh $@
 elif [[ "$suite" = "conformance-v1.2" ]] ; then
-   exec cwltest --tool arvados-cwl-runner --test conformance_tests.yaml -Sdocker_entrypoint,timelimit_invalid_wf -N307 $@ -- \$EXTRA
+   exec cwltest --tool arvados-cwl-runner --test conformance_tests.yaml -Sdocker_entrypoint $@ -- \$EXTRA
 elif [[ "$suite" = "conformance-v1.1" ]] ; then
    exec cwltest --tool arvados-cwl-runner --test conformance_tests.yaml -Sdocker_entrypoint,timelimit_invalid_wf -N199 $@ -- \$EXTRA
 elif [[ "$suite" = "conformance-v1.0" ]] ; then