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)
21 while test -n "$1" ; do
61 echo "$0 [--no-reset-container] [--leave-running] [--config dev|localdemo] [--tag docker_tag] [--build] [--pythoncmd python(2|3)] [--suite (integration|conformance-v1.0|conformance-*)]"
70 if test -z "$ARVBOX_CONTAINER" ; then
71 export ARVBOX_CONTAINER=cwltest
74 if test "$suite" = "conformance" ; then
75 suite=conformance-v1.0
78 if test $reset_container = 1 ; then
80 docker rm $ARVBOX_CONTAINER
84 arvbox start $config $tag
86 # Copy the integration test suite from our local arvados clone instead
87 # of using the one inside the container, so we can make changes to the
88 # integration tests without necessarily having to rebuilding the
90 docker cp -L $(readlink -f $(dirname $0)/tests) $ARVBOX_CONTAINER:/usr/src/arvados/sdk/cwl
95 . /usr/local/lib/arvbox/common.sh
97 export PYCMD=$pythoncmd
99 if test $config = dev ; then
100 cd /usr/src/arvados/sdk/cwl
101 \$PYCMD setup.py sdist
102 pip_install \$(ls -r dist/arvados-cwl-runner-*.tar.gz | head -n1)
107 if [ "\$PYCMD" = "python3" ]; then
113 mkdir -p /tmp/cwltest
116 if [[ "$suite" = "conformance-v1.0" ]] ; then
117 if ! test -d common-workflow-language ; then
118 git clone https://github.com/common-workflow-language/common-workflow-language.git
120 cd common-workflow-language
121 elif [[ "$suite" =~ conformance-(.*) ]] ; then
122 version=\${BASH_REMATCH[1]}
123 if ! test -d cwl-\${version} ; then
124 git clone https://github.com/common-workflow-language/cwl-\${version}.git
127 git checkout \${version}.0
128 elif [[ "$suite" != "integration" ]] ; then
129 echo "ERROR: unknown suite '$suite'"
133 #if [[ "$suite" != "integration" ]] ; then
137 export ARVADOS_API_HOST=localhost:8000
138 export ARVADOS_API_HOST_INSECURE=1
139 export ARVADOS_API_TOKEN=\$(cat /var/lib/arvados-arvbox/superuser_token)
141 if test -n "$build" ; then
142 /usr/src/arvados/build/build-dev-docker-jobs-image.sh
145 EXTRA=--compute-checksum
147 if [[ $devcwl -eq 1 ]] ; then
148 EXTRA="\$EXTRA --enable-dev"
153 # Skip docker_entrypoint test because it fails on singularity
155 # Skip timelimit_invalid_wf test because the timeout is very short
156 # (5s) and singularity containers loading off an arv-mount take too long
157 # to start and get incorrectly terminated
159 # Skip test 199 in the v1.1 suite because it has different output
160 # depending on whether there is a pty associated with stdout (fixed in
163 # Skip test 307 in the v1.2 suite because the test relied on
164 # secondary file behavior of cwltool that wasn't actually correct to specification
166 if [[ "$suite" = "integration" ]] ; then
167 cd /usr/src/arvados/sdk/cwl/tests
168 exec ./arvados-tests.sh $@
169 elif [[ "$suite" = "conformance-v1.2" ]] ; then
170 exec cwltest --tool arvados-cwl-runner --test conformance_tests.yaml -Sdocker_entrypoint,timelimit_invalid_wf -N307 $@ -- \$EXTRA
171 elif [[ "$suite" = "conformance-v1.1" ]] ; then
172 exec cwltest --tool arvados-cwl-runner --test conformance_tests.yaml -Sdocker_entrypoint,timelimit_invalid_wf -N199 $@ -- \$EXTRA
173 elif [[ "$suite" = "conformance-v1.0" ]] ; then
174 exec cwltest --tool arvados-cwl-runner --test v1.0/conformance_test_v1.0.yaml -Sdocker_entrypoint $@ -- \$EXTRA
180 if test $leave_running = 0 ; then