[Swift-commit] r6429 - branches/release-0.94/tests

yadunandb at ci.uchicago.edu yadunandb at ci.uchicago.edu
Thu Apr 11 15:00:26 CDT 2013


Author: yadunandb
Date: 2013-04-11 15:00:25 -0500 (Thu, 11 Apr 2013)
New Revision: 6429

Modified:
   branches/release-0.94/tests/suite.sh
Log:
Added support for stress levels for stress testing.
Added minor change to override environment variables from setup script



Modified: branches/release-0.94/tests/suite.sh
===================================================================
--- branches/release-0.94/tests/suite.sh	2013-04-09 18:10:41 UTC (rev 6428)
+++ branches/release-0.94/tests/suite.sh	2013-04-11 20:00:25 UTC (rev 6429)
@@ -16,6 +16,7 @@
   printf "\t -t         Tree mode (alias: -a,-c,-g,-p,-s)  \n"
   printf "\t -x         Do not continue after a failure    \n"
   printf "\t -v         Verbose (set -x, HTML comments)    \n"
+  printf "\t -l         Stress level < 1/ 2/ 3/ 4>         \n"
   printf "\t -o output  Location for cog and output        \n"
   printf "\t <GROUP>    GROUP argument                     \n"
 }
@@ -24,6 +25,7 @@
 TEXTREPORT=0
 DEFAULT_TIMEOUT=30 # seconds
 RUN_ANT=1
+STRESS=2
 # If true, run "ant clean"
 CLEAN=1
 SKIP_TESTS=0
@@ -81,6 +83,9 @@
     -x)
       ALWAYS_EXITONFAILURE=1
       shift;;
+    -l)
+      STRESS=$2
+      shift 2;;
     -v)
       VERBOSE=1
       shift;;
@@ -110,7 +115,7 @@
 	GRAY=""
 fi
 
-
+export STRESS="S$STRESS"
 # Iterations per test (may want to run each test multiple times?)
 ITERS_LOCAL=1
 
@@ -398,6 +403,20 @@
 	fi
 }
 
+override_globals() {
+  FILE=$1;
+  index=0;
+  while read line
+  do
+    if echo $line | grep -q "#OVERRIDE_" ; then
+      line=($line)
+      var_lhs=${line[0]#\#OVERRIDE_}
+      var_rhs=${line[1]};
+      eval export $var_lhs=$var_rhs;
+    fi
+  done < $FILE
+}
+
 start_group() {
   G=$1
   echo
@@ -785,16 +804,29 @@
 
   TEST_SHOULD_FAIL=0
   OUTPUT=$NAME.setup.stdout
+
   if [ -x "$GROUP/$SETUPSCRIPT" ]; then
     cp "$GROUP/$SETUPSCRIPT" .
     script_exec ./$SETUPSCRIPT "S"
+    globus_var=`grep "#OVERRIDE_" ./$SETUPSCRIPT`;
+    echo "Globus_var  = $globus_var"
+    if [ $? == 0 ]
+    then
+      globus_var=($globus_var);
+      lhs_var=${globus_var[0]##OVERRIDE_} # Add check here to confirm if GLOBUS_HOSTNAME
+      rhs_val=${globus_var[1]}
+      export GLOBUS_HOSTNAME=$rhs_val
+    fi
   else
     stage_files $GROUP $NAME
   fi
 
   ARGS=""
   if [ -f $GROUP/$ARGSFILE ]; then
-  	ARGS=`cat $GROUP/$ARGSFILE`
+    cp "$GROUP/$ARGSFILE" .
+    ARGS=`cat $GROUP/$ARGSFILE`
+  elif [ -f $ARGSFILE ]; then
+    ARGS=`cat $ARGSFILE`
   fi
 
   CDM=




More information about the Swift-commit mailing list