Browse Source

codec: expand options for tests.sh and add a usage/help message

Ugorji Nwoke 9 years ago
parent
commit
9945832959
1 changed files with 23 additions and 1 deletions
  1. 23 1
      codec/tests.sh

+ 23 - 1
codec/tests.sh

@@ -59,7 +59,7 @@ _run() {
 }
 
 # echo ">>>>>>> RUNNING VARIATIONS OF TESTS"    
-if [[ "x$@" = "x" ]]; then
+if [[ "x$@" = "x"  || "x$@" = "x-A" ]]; then
     # All: r, x, g, gu
     _run "-_tcinsed_ml"  # regular
     _run "-_tcinsed_ml_z" # regular with reset
@@ -75,6 +75,28 @@ elif [[ "x$@" = "x-F" ]]; then
     # regular with notfastpath
     _run "-_tcinsed_ml_f"  # regular
     _run "-_tcinsed_ml_zf" # regular with reset
+elif [[ "x$@" = "x-C" ]]; then
+    # codecgen
+    _run "-gx_tcinsed_ml" # codecgen: requires external
+    _run "-gxu_tcinsed_ml" # codecgen + unsafe
+elif [[ "x$@" = "x-X" ]]; then
+    # external
+    _run "-x_tcinsed_ml" # external
+elif [[ "x$@" = "x-h" || "x$@" = "x-?" ]]; then
+    cat <<EOF
+Usage: tests.sh [options...]
+  -A run through all tests (regular, external, codecgen)
+  -Z regular tests only 
+  -F regular tests only (without fastpath, so they run quickly)
+  -C codecgen only 
+  -X external only 
+  -h show help (usage)
+  -? same as -h
+  (no options) 
+      same as -A
+  (unrecognized options)
+      just pass on the options from the command line 
+EOF
 else
     _run "$@"
 fi