2 # Copyright (C) The Arvados Authors. All rights reserved.
4 # SPDX-License-Identifier: Apache-2.0
8 if ! which arvbox >/dev/null ; then
9 export PATH=$PATH:$(readlink -f $(dirname $0)/../../tools/arvbox/bin)
22 while test -n "$1" ; do
66 echo "$0 [--no-reset-container] [--leave-running] [--config dev|localdemo] [--tag docker_tag] [--build] [--pythoncmd python(2|3)] [--suite (integration|conformance-v1.0|conformance-*)]"
75 if test -z "$ARVBOX_CONTAINER" ; then
76 export ARVBOX_CONTAINER=cwltest
79 if test "$suite" = "conformance" ; then
80 suite=conformance-v1.0
83 if test $reset_container = 1 ; then
85 docker rm $ARVBOX_CONTAINER
89 arvbox start $config $tag
91 # Copy the integration test suite from our local arvados clone instead
92 # of using the one inside the container, so we can make changes to the
93 # integration tests without necessarily having to rebuilding the
95 docker cp -L $(readlink -f $(dirname $0)/tests) $ARVBOX_CONTAINER:/usr/src/arvados/sdk/cwl
100 . /usr/local/lib/arvbox/common.sh
102 export PYCMD=$pythoncmd
104 if test $config = dev -o $reinstall = 1; then
105 cd /usr/src/arvados/sdk/python
106 \$PYCMD setup.py sdist
107 pip_install \$(ls -r dist/arvados-python-client-*.tar.gz | head -n1)
109 cd /usr/src/arvados/sdk/cwl
110 \$PYCMD setup.py sdist
111 pip_install \$(ls -r dist/arvados-cwl-runner-*.tar.gz | head -n1)
116 # 2.3.20230527113600 release of cwltest confirms that files exist on disk, since
117 # our files are in Keep, all the tests fail.
118 # We should add [optional] Arvados support to cwltest so it can access
119 # Keep but for the time being just install the last working version.
120 if [ "\$PYCMD" = "python3" ]; then
121 pip3 install 'cwltest<2.3.20230527113600'
123 pip install 'cwltest<2.3.20230527113600'
126 mkdir -p /tmp/cwltest
129 if [[ "$suite" = "conformance-v1.0" ]] ; then
130 if ! test -d common-workflow-language ; then
131 git clone https://github.com/common-workflow-language/common-workflow-language.git
133 cd common-workflow-language
134 elif [[ "$suite" =~ conformance-(.*) ]] ; then
135 version=\${BASH_REMATCH[1]}
136 if ! test -d cwl-\${version} ; then
137 git clone https://github.com/common-workflow-language/cwl-\${version}.git
140 git checkout \${version}.0
141 elif [[ "$suite" != "integration" ]] ; then
142 echo "ERROR: unknown suite '$suite'"
146 if [[ "$suite" = "conformance-v1.1" ]] ; then
150 if [[ "$suite" = "conformance-v1.2" ]] ; then
151 git checkout 1.2.1_proposed
154 #if [[ "$suite" != "integration" ]] ; then
158 export ARVADOS_API_HOST=localhost:8000
159 export ARVADOS_API_HOST_INSECURE=1
160 export ARVADOS_API_TOKEN=\$(cat /var/lib/arvados-arvbox/superuser_token)
162 if test -n "$build" ; then
163 /usr/src/arvados/build/build-dev-docker-jobs-image.sh
166 EXTRA=--compute-checksum
168 if [[ $devcwl -eq 1 ]] ; then
169 EXTRA="\$EXTRA --enable-dev"
174 arvados-cwl-runner --version
177 # Skip docker_entrypoint test because it fails on singularity
179 # Skip timelimit_invalid_wf test because the timeout is very short
180 # (5s) and singularity containers loading off an arv-mount take too long
181 # to start and get incorrectly terminated
183 # Skip test 199 in the v1.1 suite because it has different output
184 # depending on whether there is a pty associated with stdout (fixed in
187 # Skip test 307 in the v1.2 suite because the test relied on
188 # secondary file behavior of cwltool that wasn't actually correct to specification
190 if [[ "$suite" = "integration" ]] ; then
191 cd /usr/src/arvados/sdk/cwl/tests
192 exec ./arvados-tests.sh $@
193 elif [[ "$suite" = "conformance-v1.2" ]] ; then
194 exec cwltest --tool arvados-cwl-runner --test conformance_tests.yaml -Sdocker_entrypoint,timelimit_invalid_wf -N307 $@ -- \$EXTRA
195 elif [[ "$suite" = "conformance-v1.1" ]] ; then
196 exec cwltest --tool arvados-cwl-runner --test conformance_tests.yaml -Sdocker_entrypoint,timelimit_invalid_wf -N199 $@ -- \$EXTRA
197 elif [[ "$suite" = "conformance-v1.0" ]] ; then
198 exec cwltest --tool arvados-cwl-runner --test v1.0/conformance_test_v1.0.yaml -Sdocker_entrypoint $@ -- \$EXTRA
204 if test $leave_running = 0 ; then