projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch '11769-scancel-jobs-only' closes #11769
[arvados.git]
/
sdk
/
cwl
/
test_with_arvbox.sh
diff --git
a/sdk/cwl/test_with_arvbox.sh
b/sdk/cwl/test_with_arvbox.sh
index 5501e2964557fa5346d32ab798aa3e4a2381abb8..8d076093abfe6b6fcbb52ccea421763d76aa38b6 100755
(executable)
--- a/
sdk/cwl/test_with_arvbox.sh
+++ b/
sdk/cwl/test_with_arvbox.sh
@@
-1,5
+1,7
@@
#!/bin/sh
#!/bin/sh
+set -x
+
if ! which arvbox >/dev/null ; then
export PATH=$PATH:$(readlink -f $(dirname $0)/../../tools/arvbox/bin)
fi
if ! which arvbox >/dev/null ; then
export PATH=$PATH:$(readlink -f $(dirname $0)/../../tools/arvbox/bin)
fi
@@
-7,7
+9,7
@@
fi
reset_container=1
leave_running=0
config=dev
reset_container=1
leave_running=0
config=dev
-docker_pull=1
+tag=""
while test -n "$1" ; do
arg="$1"
while test -n "$1" ; do
arg="$1"
@@
-24,12
+26,12
@@
while test -n "$1" ; do
config=$2
shift ; shift
;;
config=$2
shift ; shift
;;
- --
no-docker-pull
)
- docker_pull=0
- shift
+ --
tag
)
+ tag=$2
+ shift
; shift
;;
-h|--help)
;;
-h|--help)
- echo "$0 [--no-reset-container] [--leave-running] [--
no-docker-pull] [--config dev|localdemo
]"
+ echo "$0 [--no-reset-container] [--leave-running] [--
config dev|localdemo] [--tag docker_tag
]"
exit
;;
*)
exit
;;
*)
@@
-46,16
+48,20
@@
if test $reset_container = 1 ; then
arvbox reset -f
fi
arvbox reset -f
fi
-arvbox start $config
+arvbox start $config
$tag
arvbox pipe <<EOF
set -eu -o pipefail
. /usr/local/lib/arvbox/common.sh
arvbox pipe <<EOF
set -eu -o pipefail
. /usr/local/lib/arvbox/common.sh
-cd /usr/src/arvados/sdk/cwl
-python setup.py sdist
-pip_install \$(ls -r dist/arvados-cwl-runner-*.tar.gz | head -n1)
+if test $config = dev ; then
+ cd /usr/src/arvados/sdk/cwl
+ python setup.py sdist
+ pip_install \$(ls -r dist/arvados-cwl-runner-*.tar.gz | head -n1)
+fi
+
+pip install cwltest
mkdir -p /tmp/cwltest
cd /tmp/cwltest
mkdir -p /tmp/cwltest
cd /tmp/cwltest
@@
-68,19
+74,17
@@
export ARVADOS_API_HOST=localhost:8000
export ARVADOS_API_HOST_INSECURE=1
export ARVADOS_API_TOKEN=\$(cat /var/lib/arvados/superuser_token)
export ARVADOS_API_HOST_INSECURE=1
export ARVADOS_API_TOKEN=\$(cat /var/lib/arvados/superuser_token)
-if test $docker_pull = 1 ; then
- arv-keepdocker --pull arvados/jobs
-fi
+arv-keepdocker --pull arvados/jobs latest
cat >/tmp/cwltest/arv-cwl-jobs <<EOF2
#!/bin/sh
cat >/tmp/cwltest/arv-cwl-jobs <<EOF2
#!/bin/sh
-exec arvados-cwl-runner --api=jobs \\\$@
+exec arvados-cwl-runner --api=jobs
--compute-checksum
\\\$@
EOF2
chmod +x /tmp/cwltest/arv-cwl-jobs
cat >/tmp/cwltest/arv-cwl-containers <<EOF2
#!/bin/sh
EOF2
chmod +x /tmp/cwltest/arv-cwl-jobs
cat >/tmp/cwltest/arv-cwl-containers <<EOF2
#!/bin/sh
-exec arvados-cwl-runner --api=containers \\\$@
+exec arvados-cwl-runner --api=containers
--compute-checksum
\\\$@
EOF2
chmod +x /tmp/cwltest/arv-cwl-containers
EOF2
chmod +x /tmp/cwltest/arv-cwl-containers