[Swift-commit] r5129 - in trunk/tests: . cdm

wozniak at ci.uchicago.edu wozniak at ci.uchicago.edu
Mon Sep 19 13:18:05 CDT 2011


Author: wozniak
Date: 2011-09-19 13:18:05 -0500 (Mon, 19 Sep 2011)
New Revision: 5129

Modified:
   trunk/tests/USAGENOTES.txt
   trunk/tests/cdm/301-bcast.swift
   trunk/tests/suite.sh
Log:
New SKIP-THIS-TEST feature


Modified: trunk/tests/USAGENOTES.txt
===================================================================
--- trunk/tests/USAGENOTES.txt	2011-09-19 08:12:51 UTC (rev 5128)
+++ trunk/tests/USAGENOTES.txt	2011-09-19 18:18:05 UTC (rev 5129)
@@ -18,19 +18,19 @@
 [width="30%",cols="s,15",options="header"]
 |==============================================
 |Options  |  Output
-|-a       |  Do not run ant dist.               
-|-c       |  Do not remove dist (clean)        
-|-f       |  Generate plain text output file.   
-|-h       |  This table.                      
-|-k <N>   |  Skip first N tests.                
-|-n <N>   |  Run N tests and quit.              
-|-p       |  Do not build the package.          
-|-s       |  Do not do a fresh svn checkout.    
-|-t       |  Tree mode (alias: -a,-c,-g,-p,-s) 
-|-x       |  Do not continue after a failure.   
-|-v       |  Verbose (set -x, HTML comments).    
-|-o output|  Location for cog and output.        
-|<GROUP>  |  GROUP argument.                     
+|-a       |  Do not run ant dist.
+|-c       |  Do not remove dist (clean)
+|-f       |  Generate plain text output file.
+|-h       |  This table.
+|-k <N>   |  Skip first N tests.
+|-n <N>   |  Run N tests and quit.
+|-p       |  Do not build the package.
+|-s       |  Do not do a fresh svn checkout.
+|-t       |  Tree mode (alias: -a,-c,-g,-p,-s)
+|-x       |  Do not continue after a failure.
+|-v       |  Verbose (set -x, HTML comments).
+|-o output|  Location for cog and output.
+|<GROUP>  |  GROUP argument.
 |==============================================
 Assuming your code is in *_/tmp/cog_*, where you
 have the conventional *_cog/modules/swift_* configuration,
@@ -48,7 +48,7 @@
 When something goes wrong, find and check *tests.log* or use *-v*
 
 The script generates by default an HTML report, use *-f* to change
-the output to plain text. 
+the output to plain text.
 
 2. Swift Location
 -----------------
@@ -70,13 +70,13 @@
 -----------------
 Each *.swift* test may be accompanied by a:
 
-- *.setup.sh* 
+- *.setup.sh*
 - *.check.sh*
 - *.clean.sh*
 - *.timeout specifier.*
 
-The scripts may setup and inspect files in *RUNDIR* 
-including *exec.out* which must be accessed in *stdout.txt* 
+The scripts may setup and inspect files in *RUNDIR*
+including *exec.out* which must be accessed in *stdout.txt*
 because the currently running tested process writes to
 *exec.out*; *stdout.txt* is a copy.
 
@@ -150,6 +150,10 @@
 The response of *suite.sh* to the exit code of these Swift
 executions is reversed.
 
+Additionally, some tests may be in a known state of disrepair.  These
+SwiftScripts contain the token *_SKIP-THIS-TEST_* somewhere, which will
+cause the test suite to skip that test.
+
 8. Schedulers
 -------------
 Environment must contain *PROJECT*, *QUEUE*, and *WORK*.
@@ -207,7 +211,7 @@
 The prefix number on each test is simply for sorting
 
 .E.g.,
-****************** 
+******************
  ls *.swift
 ******************
 
@@ -225,7 +229,7 @@
 - Run it!  Report problems to swift-devel.
 - Fix broken tests.
 - Break down test *GROUPs* into smaller, meaningful *GROUPs* ; it would be good to limit *GROUP* sizes to 20 or so tests.
-- Current work has focused on the HTML and stdout output, which is intended to be high-level and clean. 
+- Current work has focused on the HTML and stdout output, which is intended to be high-level and clean.
 
 ***********************************************************************************
 Using -v results in extremely verbose output.

Modified: trunk/tests/cdm/301-bcast.swift
===================================================================
--- trunk/tests/cdm/301-bcast.swift	2011-09-19 08:12:51 UTC (rev 5128)
+++ trunk/tests/cdm/301-bcast.swift	2011-09-19 18:18:05 UTC (rev 5129)
@@ -1,4 +1,6 @@
 
+// SKIP-THIS-TEST
+
 type file;
 
 app (file o) copy (file i)

Modified: trunk/tests/suite.sh
===================================================================
--- trunk/tests/suite.sh	2011-09-19 08:12:51 UTC (rev 5128)
+++ trunk/tests/suite.sh	2011-09-19 18:18:05 UTC (rev 5129)
@@ -24,6 +24,7 @@
 TEXTREPORT=0
 DEFAULT_TIMEOUT=30 # seconds
 RUN_ANT=1
+# If true, run "ant clean"
 CLEAN=1
 SKIP_TESTS=0
 NUMBER_OF_TESTS=1000000 # Run all tests by default
@@ -386,8 +387,8 @@
 	      		html_a_href $TEST_LOG "$LABEL"
 	      	elif [ "$RESULT" == "None" ]; then
 	      		html_td width 25
-		   		html "  "
-   				html_~td
+		   	html "  "
+   			html_~td
 	    	else
 	      		echo -e "${RED}FAILED${GRAY}"
 	      		cat $RUNDIR/$TEST_LOG < /dev/null
@@ -793,6 +794,12 @@
   SWIFTSCRIPT=$1
   NAME=${SWIFTSCRIPT%.swift}
 
+  if grep -q "SKIP-THIS-TEST" $SWIFTSCRIPT ; then
+    echo SKIP-THIS-TEST
+    INDIVIDUAL_TEST_TIME=0
+    return 0
+  fi
+
   SETUPSCRIPT=$NAME.setup.sh
   CHECKSCRIPT=$NAME.check.sh
   CLEANSCRIPT=$NAME.clean.sh




More information about the Swift-commit mailing list