Fresco/Fresco-Test/scripts run_tests.sh,1.1,1.2

Nathaniel Smith <[email protected]>
Newsgroups gmane.comp.video.fresco.cvs
Message-ID <[email protected]>
Update of /cvs/fresco/Fresco/Fresco-Test/scripts
In directory purcel:/tmp/cvs-serv22262

Modified Files:
	run_tests.sh 
Log Message:
Several little cleanups to this script.


Index: run_tests.sh
===================================================================
RCS file: /cvs/fresco/Fresco/Fresco-Test/scripts/run_tests.sh,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- run_tests.sh	5 Apr 2003 22:37:35 -0000	1.1
+++ run_tests.sh	5 Apr 2003 23:21:56 -0000	1.2
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # This script runs all tests given on the commandline and returns an
-# exitcode of 0 if all tests passed or 1 if or more tests failed.
+# exitcode of 0 if all tests passed or 1 if one or more tests failed.
 #
 # It is meant as a quick and dirty way to run our tests from a Makefile
 # without needing to register all tests with qmtest manually.
@@ -12,8 +12,8 @@
 {
     TESTPROG="$1"
     for TEST in `$TESTPROG list` ; do
-        if ! $TESTPROG run $TEST | grep -q 'Result: PASS'; then
-            echo "Test $TEST in $TESTPROG did not pass!"
+        if ! $TESTPROG run $TEST | egrep -q '^Result:[[:space:]]+PASS'; then
+            echo "Test $TEST in $TESTPROG FAILED!"
             ALL_PASSED=0;
 	else
 	    echo "Test $TEST in $TESTPROG passed."
@@ -21,7 +21,7 @@
     done
 }
 
-for CURRENT in $* ; do
+for CURRENT in "$@"; do
     run_test "$CURRENT"
 done
 
@@ -29,4 +29,4 @@
     exit 1
 fi
 
-exit 0
\ No newline at end of file
+exit 0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.