[MLton-commit] r4201

Matthew Fluet MLton@mlton.org
Fri, 11 Nov 2005 16:24:10 -0800


Added -skip-to option to regression script to skip to a particular regression; useful for testing subsets without editting the script
----------------------------------------------------------------------

U   mlton/branches/on-20050822-x86_64-branch/bin/regression

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

Modified: mlton/branches/on-20050822-x86_64-branch/bin/regression
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/bin/regression	2005-11-11 23:29:14 UTC (rev 4200)
+++ mlton/branches/on-20050822-x86_64-branch/bin/regression	2005-11-12 00:24:09 UTC (rev 4201)
@@ -3,12 +3,12 @@
 # This script runs the regression tests in src/regression.
 # It also compiles the tests in benchmark/tests
 
-set -e
+# set -e
 
 name=`basename $0`
 
 usage () {
-        echo >&2 "usage: $name [-cross target] [-run-only target] [-short] [mlton flags ...]"
+        echo >&2 "usage: $name [-cross target] [-run-only target] [-short] [-skip-to reg] [mlton flags ...]"
         exit 1
 }
 
@@ -16,6 +16,7 @@
 fail='false'
 runOnly='false'
 short='false'
+skipTo=''
 while [ "$#" -gt 0 ]; do
         case "$1" in
         -cross)
@@ -44,6 +45,14 @@
                 short='true'
                 shift
                 ;;
+        -skip-to)
+                shift
+                if [ "$#" = 0 ]; then
+                        usage
+                fi
+                skipTo="$1"
+                shift
+                ;;
         *)
                 flags="$@"
                 break
@@ -102,6 +111,14 @@
 
 for f in `ls *.sml`; do
         f=`basename $f .sml`
+        if [ "$skipTo" != "" ]; then
+                if [ "$skipTo" != "$f" ]; then
+                        echo "skipping $f"
+                        continue
+                else
+                        skipTo=''
+                fi
+        fi
         case `host-os` in
         cygwin|mingw)
                 case "$f" in