[ARVADOS] created: 1.3.0-2590-g8f6f8d5d7

Git user git at public.arvados.org
Tue May 19 20:54:34 UTC 2020


        at  8f6f8d5d727c9b0ae4600c7b546db248e012d203 (commit)


commit 8f6f8d5d727c9b0ae4600c7b546db248e012d203
Author: Ward Vandewege <ward at jhvc.com>
Date:   Tue May 19 16:53:11 2020 -0400

    16451: make it possible to run a test many times in interactive mode.
    
    Arvados-DCO-1.1-Signed-off-by: Ward Vandewege <ward at jhvc.com>

diff --git a/build/run-tests.sh b/build/run-tests.sh
index 0212d1bc0..70aec2aa1 100755
--- a/build/run-tests.sh
+++ b/build/run-tests.sh
@@ -1205,6 +1205,7 @@ help_interactive() {
     echo "== Interactive commands:"
     echo "TARGET                 (short for 'test DIR')"
     echo "test TARGET"
+    echo "10 test TARGET         (run test 10 times)"
     echo "test TARGET:py3        (test with python3)"
     echo "test TARGET -check.vv  (pass arguments to test)"
     echo "install TARGET"
@@ -1265,7 +1266,15 @@ else
     while read -p 'What next? ' -e -i "$nextcmd" nextcmd; do
         history -s "$nextcmd"
         history -w
-        read verb target opts <<<"${nextcmd}"
+        read verb target opt1 opts <<<"${nextcmd}"
+        count=1
+        if [[ "$verb" =~ ^[0-9]+$ ]]; then
+          count=$verb
+          verb=${target}
+          target=$opt1
+        else
+          opts="$opt1 $opts"
+        fi
         target="${target%/}"
         target="${target/\/:/:}"
         case "${verb}" in
@@ -1284,11 +1293,14 @@ else
                         ${verb}_${target}
                         ;;
                     *)
-			argstarget=${target%:py3}
+                        argstarget=${target%:py3}
                         testargs["$argstarget"]="${opts}"
                         tt="${testfuncargs[${target}]}"
                         tt="${tt:-$target}"
-                        do_$verb $tt
+                        while [ $count -gt 0 ]; do
+                          do_$verb $tt
+                          let "count=count-1"
+                        done
                         ;;
                 esac
                 ;;

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list