[Swift-commit] r3516 - trunk/tests

noreply at svn.ci.uchicago.edu noreply at svn.ci.uchicago.edu
Tue Aug 10 16:14:36 CDT 2010


Author: wozniak
Date: 2010-08-10 16:14:36 -0500 (Tue, 10 Aug 2010)
New Revision: 3516

Modified:
   trunk/tests/nightly.sh
Log:
Start using test GROUPs


Modified: trunk/tests/nightly.sh
===================================================================
--- trunk/tests/nightly.sh	2010-08-10 21:13:25 UTC (rev 3515)
+++ trunk/tests/nightly.sh	2010-08-10 21:14:36 UTC (rev 3516)
@@ -14,6 +14,8 @@
 # *.setup.sh, *.check.sh, and/or *.clean.sh script
 # These may setup and inspect files in RUNDIR including swift.out
 
+# Tests are GROUPed into directories
+
 # OUTPUT is the stdout of the current test
 # stdout.txt retains stdout from the previous test (for *.clean.sh)
 # output_*.txt is the HTML-linked permanent output from a test
@@ -289,7 +291,7 @@
       html "<td class=\"failure\" $WIDTH title=\"$CMD\">"
       html_a_href $TLOG $LABEL
     fi
-    html "</td>"
+    html_~td
 
   elif [ "$TYPE" == "package" ]; then
     BINPACKAGE=$2
@@ -448,15 +450,15 @@
   SETUPSCRIPT=${SWIFTSCRIPT%.swift}.setup.sh
   CHECKSCRIPT=${SWIFTSCRIPT%.swift}.check.sh
   CLEANSCRIPT=${SWIFTSCRIPT%.swift}.clean.sh
-  if [ -x $TESTDIR/$SETUPSCRIPT ]; then
-    script_exec $TESTDIR/$SETUPSCRIPT "S"
+  if [ -x $GROUP/$SETUPSCRIPT ]; then
+    script_exec $GROUP/$SETUPSCRIPT "S"
   fi
   pexec swift -sites.file sites.xml -tc.file tc.data $SWIFTSCRIPT
-  if [ -x $TESTDIR/$CHECKSCRIPT ]; then
-    script_exec $TESTDIR/$CHECKSCRIPT "√"
+  if [ -x $GROUP/$CHECKSCRIPT ]; then
+    script_exec $GROUP/$CHECKSCRIPT "√"
   fi
-  if [ -x $TESTDIR/$CLEANSCRIPT ]; then
-    script_exec $TESTDIR/$CLEANSCRIPT "C"
+  if [ -x $GROUP/$CLEANSCRIPT ]; then
+    script_exec $GROUP/$CLEANSCRIPT "C"
   fi
 }
 
@@ -492,6 +494,28 @@
   out package "swift-$DATE.tar.gz"
 }
 
+test_group() {
+
+  sed "s at _DIR_@$GROUP@" < $GROUP/tc.template.data > tc.data
+
+  J=0
+  for TEST in $( ls $GROUP/*.swift ); do
+
+    (( J++ < SKIP_TESTS )) && continue
+
+    TESTNAME=$( basename $TEST)
+    cp -uv $GROUP/$TESTNAME .
+    TESTLINK=$TESTNAME
+
+    start_row
+    for ((i=0; $i<$ITERS_LOCAL; i=$i+1)); do
+      swift_test $TESTNAME
+    done
+    end_row
+  done
+}
+
+
 date > $LOG
 
 header
@@ -537,7 +561,6 @@
 PATH=$SWIFT_HOME/bin:$PATH
 cd $TOPDIR
 which swift
-TESTDIR=$TOPDIR/cog/modules/swift/tests
 cd $RUNDIR
 
 end_row
@@ -546,27 +569,17 @@
   EXITONFAILURE=false
 fi
 
+TESTDIR=$TOPDIR/cog/modules/swift/tests
 sed "s at _WORK_@$PWD/work@" < $TESTDIR/sites/localhost.xml > sites.xml
-sed "s at _DIR_@$TESTDIR@"   < $TESTDIR/tc.template.data    > tc.data
 
-start_part "Part II: Local Tests"
+#start_part "Part II: Working Tests"
+#GROUP=$TESTDIR/language/working
+#test_group
 
-J=0
-for TEST in $( ls $TESTDIR/*.swift ); do
+start_part "Part III: Local Tests"
+GROUP=$TESTDIR/local
+test_group
 
-  (( J++ < SKIP_TESTS )) && continue
-
-  TESTNAME=$( basename $TEST)
-  cp -uv $TESTDIR/$TESTNAME .
-  TESTLINK=$TESTNAME
-
-  start_row
-  for ((i=0; $i<$ITERS_LOCAL; i=$i+1)); do
-    swift_test $TESTNAME
-  done
-  end_row
-done
-
 if [ $GRID_TESTS == "0" ]; then
   exit
 fi




More information about the Swift-commit mailing list