X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/19ab7c19fcd56b05ff2d06f7fb4b66a515c90f4b..4398ef03604ddbc1fd3942246ae0d67d83d33fae:/build/run-tests.sh?ds=sidebyside diff --git a/build/run-tests.sh b/build/run-tests.sh index c35b544275..9614ff5b10 100755 --- a/build/run-tests.sh +++ b/build/run-tests.sh @@ -85,6 +85,7 @@ lib/dispatchcloud/container lib/dispatchcloud/scheduler lib/dispatchcloud/ssh_executor lib/dispatchcloud/worker +lib/service services/api services/arv-git-httpd services/crunchstat @@ -123,6 +124,7 @@ sdk/cwl sdk/R tools/sync-groups tools/crunchstat-summary +tools/crunchstat-summary:py3 tools/keep-exercise tools/keep-rsync tools/keep-block-check @@ -390,6 +392,10 @@ start_services() { && (env | egrep ^ARVADOS) \ || fail=1 deactivate + if [[ $fail = 0 ]] && ! kill -0 "$(cat "$WORKSPACE/tmp/nginx.pid")"; then + echo >&2 "ERROR: nginx seems to have died already" + fail=1 + fi if [[ $fail != 0 ]]; then unset ARVADOS_TEST_API_HOST fi @@ -952,6 +958,7 @@ gostuff=( lib/dispatchcloud/scheduler lib/dispatchcloud/ssh_executor lib/dispatchcloud/worker + lib/service sdk/go/arvados sdk/go/arvadosclient sdk/go/auth @@ -1061,6 +1068,7 @@ test_apps/workbench_profile() { install_deps() { # Install parts needed by test suites do_install env + do_install cmd/arvados-server go do_install sdk/cli do_install sdk/perl do_install sdk/python pip @@ -1146,13 +1154,14 @@ test_all() { help_interactive() { echo "== Interactive commands:" - echo "TARGET (short for 'test DIR')" + echo "TARGET (short for 'test DIR')" echo "test TARGET" - echo "test TARGET:py3 (test with python3)" + echo "test TARGET:py3 (test with python3)" + echo "test TARGET -check.vv (pass arguments to test)" echo "install TARGET" - echo "install env (go/python libs)" - echo "install deps (go/python libs + arvados components needed for integration tests)" - echo "reset (...services used by integration tests)" + echo "install env (go/python libs)" + echo "install deps (go/python libs + arvados components needed for integration tests)" + echo "reset (...services used by integration tests)" echo "exit" echo "== Test targets:" echo "${!testfuncargs[@]}" | tr ' ' '\n' | sort | column @@ -1166,32 +1175,42 @@ for g in "${gostuff[@]}"; do done for p in "${pythonstuff[@]}"; do dir=${p%:py3} - if [[ ${dir} = ${p} ]]; then - testfuncargs[$p]="$dir pip $VENVDIR/bin/" - else - testfuncargs[$p]="$dir pip $VENV3DIR/bin/" - fi + testfuncargs[$dir]="$dir pip $VENVDIR/bin/" + testfuncargs[$dir:py3]="$dir pip $VENV3DIR/bin/" done if [[ -z ${interactive} ]]; then install_all test_all else + skip=() + only=() + only_install=() if [[ -e "$VENVDIR/bin/activate" ]]; then stop_services; fi - setreaddefault() { - readdefault="$verb $target" - if [[ -n "$verb" && "$readdefault" != "install deps" ]]; then + setnextcmd() { + if [[ "$TERM" = dumb ]]; then + # assume emacs, or something, is offering a history buffer + # and pre-populating the command will only cause trouble + nextcmd= + elif [[ "$nextcmd" != "install deps" ]]; then : elif [[ -e "$VENVDIR/bin/activate" ]]; then - readdefault="test lib/cmd" + nextcmd="test lib/cmd" else - readdefault="install deps" + nextcmd="install deps" fi } echo help_interactive - setreaddefault - while read -p 'What next? ' -e -i "${readdefault}" verb target; do + nextcmd="install deps" + setnextcmd + while read -p 'What next? ' -e -i "${nextcmd}" nextcmd; do + read verb target opts <<<"${nextcmd}" + target="${target%/}" + target="${target/\/:/:}" + if [[ -z "${target}" ]]; then + verb=help + fi case "${verb}" in "" | "help") help_interactive @@ -1203,11 +1222,7 @@ else stop_services ;; *) - if [[ -z "${target}" ]]; then - target="${verb}" - verb=test - fi - target="${target%/}" + testargs["$target"]="${opts}" case "$target" in all | deps) ${verb}_${target} @@ -1226,7 +1241,7 @@ else failures=() fi cd "$WORKSPACE" - setreaddefault + setnextcmd done echo fi