14807: Add lib/service test.
[arvados.git] / build / run-tests.sh
index bce3ed5a7aed2698e9224304f3f9a7b83a1fc697..f2c7a3e867fa18e40e97f540dd2618de4f4959ec 100755 (executable)
@@ -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
@@ -952,6 +954,7 @@ gostuff=(
     lib/dispatchcloud/scheduler
     lib/dispatchcloud/ssh_executor
     lib/dispatchcloud/worker
+    lib/service
     sdk/go/arvados
     sdk/go/arvadosclient
     sdk/go/auth
@@ -1061,7 +1064,7 @@ test_apps/workbench_profile() {
 install_deps() {
     # Install parts needed by test suites
     do_install env
-    do_install cmd/arvados-server
+    do_install cmd/arvados-server go
     do_install sdk/cli
     do_install sdk/perl
     do_install sdk/python pip
@@ -1147,13 +1150,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
@@ -1178,21 +1182,25 @@ 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 [[ "$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}"
         case "${verb}" in
             "" | "help")
                 help_interactive
@@ -1204,11 +1212,8 @@ else
                 stop_services
                 ;;
             *)
-                if [[ -z "${target}" ]]; then
-                    target="${verb}"
-                    verb=test
-                fi
                 target="${target%/}"
+                testargs["$target"]="${opts}"
                 case "$target" in
                     all | deps)
                         ${verb}_${target}
@@ -1227,7 +1232,7 @@ else
             failures=()
         fi
         cd "$WORKSPACE"
-        setreaddefault
+        setnextcmd
     done
     echo
 fi