2 # Copyright (C) The Arvados Authors. All rights reserved.
4 # SPDX-License-Identifier: Apache-2.0
8 cwldir=$(readlink -f $(dirname $0))
10 if ! which arvbox >/dev/null ; then
11 export PATH=$PATH:$cwldir/../../tools/arvbox/bin
23 while test -n "$1" ; do
55 echo "warning: --pythoncmd option is no longer supported; ignored" >&2
67 echo "$0 [--no-reset-container] [--leave-running] [--config dev|localdemo] [--tag docker_tag] [--build] [--suite (integration|conformance-v1.0|conformance-*)]"
76 if test -z "$ARVBOX_CONTAINER" ; then
77 export ARVBOX_CONTAINER=cwltest
80 if test "$suite" = "conformance" ; then
81 suite=conformance-v1.0
84 if test $reset_container = 1 ; then
86 docker rm $ARVBOX_CONTAINER
90 arvbox start $config $tag
92 # Copy the integration test suite from our local arvados clone instead
93 # of using the one inside the container, so we can make changes to the
94 # integration tests without necessarily having to rebuilding the
96 docker cp -L $cwldir/tests $ARVBOX_CONTAINER:/usr/src/arvados/sdk/cwl
101 . /usr/local/lib/arvbox/common.sh
103 if test $config = dev -o $reinstall = 1; then
104 pip_install_sdist sdk/python sdk/cwl
109 # 2.3.20230527113600 release of cwltest confirms that files exist on disk, since
110 # our files are in Keep, all the tests fail.
111 # We should add [optional] Arvados support to cwltest so it can access
112 # Keep but for the time being just install the last working version.
113 /opt/arvados-py/bin/pip install 'cwltest<2.3.20230527113600'
115 mkdir -p /tmp/cwltest
118 if [[ "$suite" = "conformance-v1.0" ]] ; then
119 if ! test -d common-workflow-language ; then
120 git clone https://github.com/common-workflow-language/common-workflow-language.git
122 cd common-workflow-language
123 elif [[ "$suite" =~ conformance-(.*) ]] ; then
124 version=\${BASH_REMATCH[1]}
125 if ! test -d cwl-\${version} ; then
126 git clone https://github.com/common-workflow-language/cwl-\${version}.git
129 git checkout \${version}.0
130 elif [[ "$suite" != "integration" ]] ; then
131 echo "ERROR: unknown suite '$suite'"
135 if [[ "$suite" = "conformance-v1.1" ]] ; then
139 if [[ "$suite" = "conformance-v1.2" ]] ; then
143 #if [[ "$suite" != "integration" ]] ; then
147 export ARVADOS_API_HOST=localhost:8000
148 export ARVADOS_API_HOST_INSECURE=1
149 export ARVADOS_API_TOKEN=\$(cat /var/lib/arvados-arvbox/superuser_token)
151 if test -n "$build" ; then
152 /usr/src/arvados/build/build-dev-docker-jobs-image.sh
155 EXTRA=--compute-checksum
157 if [[ $devcwl -eq 1 ]] ; then
158 EXTRA="\$EXTRA --enable-dev"
163 arvados-cwl-runner --version
166 # Skip docker_entrypoint test because it fails on singularity
168 # Skip timelimit_invalid_wf test because the timeout is very short
169 # (5s) and singularity containers loading off an arv-mount take too long
170 # to start and get incorrectly terminated
172 # Skip test 199 in the v1.1 suite because it has different output
173 # depending on whether there is a pty associated with stdout (fixed in
176 if [[ "$suite" = "integration" ]] ; then
177 cd /usr/src/arvados/sdk/cwl/tests
178 exec ./arvados-tests.sh $@
179 elif [[ "$suite" = "conformance-v1.2" ]] ; then
180 exec cwltest --tool arvados-cwl-runner --test conformance_tests.yaml -Sdocker_entrypoint --badgedir /tmp/badges $@ -- \$EXTRA
181 elif [[ "$suite" = "conformance-v1.1" ]] ; then
182 exec cwltest --tool arvados-cwl-runner --test conformance_tests.yaml -Sdocker_entrypoint,timelimit_invalid_wf -N199 --badgedir /tmp/badges $@ -- \$EXTRA
183 elif [[ "$suite" = "conformance-v1.0" ]] ; then
184 exec cwltest --tool arvados-cwl-runner --test v1.0/conformance_test_v1.0.yaml -Sdocker_entrypoint --badgedir /tmp/badges $@ -- \$EXTRA
190 docker cp -L $ARVBOX_CONTAINER:/tmp/badges $cwldir/badges
192 if test $leave_running = 0 ; then