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)
17 while test -n "$1" ; do
37 echo "$0 [--no-reset-container] [--leave-running] [--config dev|localdemo] [--tag docker_tag]"
46 if test -z "$ARVBOX_CONTAINER" ; then
47 export ARVBOX_CONTAINER=cwltest
50 if test $reset_container = 1 ; then
52 docker rm $ARVBOX_CONTAINER
56 arvbox start $config $tag
61 . /usr/local/lib/arvbox/common.sh
63 if test $config = dev ; then
64 cd /usr/src/arvados/sdk/cwl
66 pip_install \$(ls -r dist/arvados-cwl-runner-*.tar.gz | head -n1)
73 if ! test -d common-workflow-language ; then
74 git clone https://github.com/common-workflow-language/common-workflow-language.git
76 cd common-workflow-language
78 export ARVADOS_API_HOST=localhost:8000
79 export ARVADOS_API_HOST_INSECURE=1
80 export ARVADOS_API_TOKEN=\$(cat /var/lib/arvados/superuser_token)
83 if test "$tag" = "latest" ; then
84 arv-keepdocker --pull arvados/jobs $tag
86 jobsimg=\$(curl http://versions.arvados.org/v1/commit/$tag | python -c "import json; import sys; sys.stdout.write(json.load(sys.stdin)['Versions']['Docker']['arvados/jobs'])")
87 arv-keepdocker --pull arvados/jobs \$jobsimg
88 docker tag arvados/jobs:\$jobsimg arvados/jobs:latest
89 arv-keepdocker arvados/jobs latest
92 cat >/tmp/cwltest/arv-cwl-jobs <<EOF2
94 exec arvados-cwl-runner --api=jobs \\\$@
96 chmod +x /tmp/cwltest/arv-cwl-jobs
98 cat >/tmp/cwltest/arv-cwl-containers <<EOF2
100 exec arvados-cwl-runner --api=containers \\\$@
102 chmod +x /tmp/cwltest/arv-cwl-containers
105 exec ./run_test.sh RUNNER=/tmp/cwltest/arv-cwl-containers EXTRA=--compute-checksum $@
110 if test $leave_running = 0 ; then