[Swift-commit] r5295 - branches/release-0.93/tests

wozniak at ci.uchicago.edu wozniak at ci.uchicago.edu
Mon Nov 14 16:20:55 CST 2011


Author: wozniak
Date: 2011-11-14 16:20:55 -0600 (Mon, 14 Nov 2011)
New Revision: 5295

Modified:
   branches/release-0.93/tests/suite.sh
Log:
Use $0 to get the suite directory; whitespace


Modified: branches/release-0.93/tests/suite.sh
===================================================================
--- branches/release-0.93/tests/suite.sh	2011-11-14 20:53:49 UTC (rev 5294)
+++ branches/release-0.93/tests/suite.sh	2011-11-14 22:20:55 UTC (rev 5295)
@@ -34,9 +34,11 @@
 TOTAL_TIME=0
 INDIVIDUAL_TEST_TIME=0
 COLORIZE=0
+# The directory in which is suite.sh (this script)
+SUITE_DIR=$( dirname $0 )
 # The directory in which to start:
-TOPDIR=`readlink -f $PWD/../../../..`
-CRTDIR=`pwd`
+TOPDIR=$( readlink -f $SUITE_DIR/../../../.. )
+CRTDIR=$( /bin/pwd )
 
 # Disable usage stats in test suite
 export SWIFT_USAGE_STATS=0
@@ -357,7 +359,7 @@
 	LABEL="$2"  # Text on link to output
 	CMD=$3    # Command issued (td title)
 	RESULT=$4 # Passed or Failed
- 
+
 	if [ $TEXTREPORT == 1 ]; then
 		if [ "$TYPE" == "test" ]; then
 			if [ "$RESULT" == "Passed" ]; then
@@ -697,7 +699,7 @@
 
   process_exec $SCRIPT
   RESULT=$( result )
-   
+
   output_report test "$SYMBOL" "$LASTCMD" $RESULT
 
   check_bailout
@@ -707,7 +709,7 @@
 	GROUP=$1
 	NAME=$2
 	RESULT="None"
-	
+
         if [ -f "$GROUP/$NAME.in" ]; then
                 echo "Copying input: $NAME.in"
 		cp -v $GROUP/$NAME.in . 2>&1 >> $OUTPUT
@@ -818,7 +820,7 @@
   TEST_SHOULD_FAIL=0
   OUTPUT=$NAME.check.stdout
   if [ -x $GROUP/$CHECKSCRIPT ]; then
-    cp "$GROUP/$CHECKSCRIPT" .	
+    cp "$GROUP/$CHECKSCRIPT" .
     export TEST_LOG=$NAME.stdout
     script_exec ./$CHECKSCRIPT "√"
   else
@@ -848,7 +850,7 @@
   TIMEOUTFILE=$NAME.timeout
 
   TEST_SHOULD_FAIL=0
-  
+
   OUTPUT=$NAME.setup.stdout
   if [ -x $GROUP/$SETUPSCRIPT ]; then
     script_exec $GROUP/$SETUPSCRIPT "S"
@@ -962,7 +964,7 @@
   else
      TEMPLATE="$TESTDIR/sites/localhost.xml"
   fi
-  
+
   # Give default to _WORK_ if undefined in swift.properties
   if [ -z "$WORK" ]
   then
@@ -1072,7 +1074,7 @@
   checkfail "Could not list: $GROUP"
 
   for TEST in $SWIFTS; do
-   
+
     (( SKIP_COUNTER++ < SKIP_TESTS )) && continue
 
 
@@ -1089,7 +1091,7 @@
       ITERS_LOCAL=`cat $GROUP/$SCRIPT_BASENAME.repeat`
     else
       ITERS_LOCAL=1
-    fi    
+    fi
 
     for (( i=0; $i<$ITERS_LOCAL; i=$i+1 )); do
 
@@ -1100,7 +1102,7 @@
        mkdir -p $TESTNAMEDIR
        pushd $TESTNAMEDIR > /dev/null 2>&1
 
-       cp $TEST .    
+       cp $TEST .
        group_swift_properties
        group_sites_xml
        group_tc_data




More information about the Swift-commit mailing list