13306: test_with_arvbox can select api
[arvados.git] / sdk / cwl / test_with_arvbox.sh
index aa98252c0c9520fdc6e00fa3b400cd15db28de02..22d47a5d481555ab7b52284eeb263624a0b04bc2 100755 (executable)
@@ -14,6 +14,8 @@ leave_running=0
 config=dev
 tag="latest"
 pythoncmd=python
+suite=conformance
+runapi=containers
 
 while test -n "$1" ; do
     arg="$1"
@@ -42,8 +44,16 @@ while test -n "$1" ; do
             pythoncmd=$2
             shift ; shift
             ;;
+        --suite)
+            suite=$2
+            shift ; shift
+            ;;
+       --api)
+           runapi=$2
+            shift ; shift
+            ;;
         -h|--help)
-            echo "$0 [--no-reset-container] [--leave-running] [--config dev|localdemo] [--tag docker_tag] [--build] [--pythoncmd python[23]]"
+            echo "$0 [--no-reset-container] [--leave-running] [--config dev|localdemo] [--tag docker_tag] [--build] [--pythoncmd python(2|3)] [--suite (integration|conformance)]"
             exit
             ;;
         *)
@@ -77,6 +87,8 @@ if test $config = dev ; then
   pip_install \$(ls -r dist/arvados-cwl-runner-*.tar.gz | head -n1)
 fi
 
+set -x
+
 if [ \$PYCMD = "python3" ]; then
     pip3 install cwltest
 else
@@ -119,7 +131,12 @@ EOF2
 chmod +x /tmp/cwltest/arv-cwl-containers
 
 env
-exec ./run_test.sh RUNNER=/tmp/cwltest/arv-cwl-containers EXTRA=--compute-checksum $@
+if [[ "$suite" = "conformance" ]] ; then
+   exec ./run_test.sh RUNNER=/tmp/cwltest/arv-cwl-${runapi} EXTRA=--compute-checksum $@
+elif [[ "$suite" = "integration" ]] ; then
+   cd /usr/src/arvados/sdk/cwl/tests
+   exec ./arvados-tests.sh $@
+fi
 EOF
 
 CODE=$?