X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/e824e159b213262403771ca4060ac03a7d558b55..ca1eb648712232558014d648939868b2a902558a:/sdk/cwl/test_with_arvbox.sh diff --git a/sdk/cwl/test_with_arvbox.sh b/sdk/cwl/test_with_arvbox.sh index 2bdf0540c0..76aa43d611 100755 --- a/sdk/cwl/test_with_arvbox.sh +++ b/sdk/cwl/test_with_arvbox.sh @@ -12,8 +12,9 @@ fi reset_container=1 leave_running=0 config=dev +devcwl=0 tag="latest" -pythoncmd=python +pythoncmd=python3 suite=conformance runapi=containers @@ -40,6 +41,10 @@ while test -n "$1" ; do build=1 shift ;; + --devcwl) + devcwl=1 + shift + ;; --pythoncmd) pythoncmd=$2 shift ; shift @@ -53,7 +58,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-v1.1)]" + echo "$0 [--no-reset-container] [--leave-running] [--config dev|localdemo] [--tag docker_tag] [--build] [--pythoncmd python(2|3)] [--suite (integration|conformance-v1.0|conformance-*)]" exit ;; *) @@ -66,6 +71,10 @@ if test -z "$ARVBOX_CONTAINER" ; then export ARVBOX_CONTAINER=cwltest fi +if test "$suite" = "conformance" ; then + suite=conformance-v1.0 +fi + if test $reset_container = 1 ; then arvbox stop docker rm $ARVBOX_CONTAINER @@ -98,20 +107,17 @@ fi mkdir -p /tmp/cwltest cd /tmp/cwltest -if [[ "$suite" = "conformance" ]] ; then - suite=conformance-v1.0 -fi - if [[ "$suite" = "conformance-v1.0" ]] ; then if ! test -d common-workflow-language ; then git clone https://github.com/common-workflow-language/common-workflow-language.git fi cd common-workflow-language -elif [[ "$suite" = "conformance-v1.1" ]] ; then - if ! test -d cwl-v1.1 ; then - git clone https://github.com/common-workflow-language/cwl-v1.1.git +elif [[ "$suite" =~ conformance-(.*) ]] ; then + version=\${BASH_REMATCH[1]} + if ! test -d cwl-\${version} ; then + git clone https://github.com/common-workflow-language/cwl-\${version}.git fi - cd cwl-v1.1 + cd cwl-\${version} fi if [[ "$suite" != "integration" ]] ; then @@ -145,12 +151,18 @@ exec arvados-cwl-runner --api=containers \\\$@ EOF2 chmod +x /tmp/cwltest/arv-cwl-containers +EXTRA=--compute-checksum + +if [[ $devcwl == 1 ]] ; then + EXTRA="\$EXTRA --enable-dev" +fi + env if [[ "$suite" = "integration" ]] ; then cd /usr/src/arvados/sdk/cwl/tests exec ./arvados-tests.sh $@ else - exec ./run_test.sh RUNNER=/tmp/cwltest/arv-cwl-${runapi} EXTRA=--compute-checksum $@ + exec ./run_test.sh RUNNER=/tmp/cwltest/arv-cwl-${runapi} EXTRA="\$EXTRA" $@ fi EOF