[Swift-commit] r5182 - in trunk/tests: . language/working language-behaviour/mappers local
davidk at ci.uchicago.edu
davidk at ci.uchicago.edu
Tue Sep 27 16:05:32 CDT 2011
Author: davidk
Date: 2011-09-27 16:05:32 -0500 (Tue, 27 Sep 2011)
New Revision: 5182
Added:
trunk/tests/language-behaviour/mappers/0755-ext-mapper.sh.in
trunk/tests/language/working/061-stdoutinerr.setup.sh
trunk/tests/language/working/062-stdinerrout.setup.sh
Modified:
trunk/tests/language-behaviour/mappers/07511-fixed-array-mapper-input.check.sh
trunk/tests/local/filesysmapper.check.sh
trunk/tests/local/range.check.sh
trunk/tests/suite.sh
Log:
Updates to test suite
Added: trunk/tests/language/working/061-stdoutinerr.setup.sh
===================================================================
--- trunk/tests/language/working/061-stdoutinerr.setup.sh (rev 0)
+++ trunk/tests/language/working/061-stdoutinerr.setup.sh 2011-09-27 21:05:32 UTC (rev 5182)
@@ -0,0 +1 @@
+cp -v $GROUP/test.in .
Property changes on: trunk/tests/language/working/061-stdoutinerr.setup.sh
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/tests/language/working/062-stdinerrout.setup.sh
===================================================================
--- trunk/tests/language/working/062-stdinerrout.setup.sh (rev 0)
+++ trunk/tests/language/working/062-stdinerrout.setup.sh 2011-09-27 21:05:32 UTC (rev 5182)
@@ -0,0 +1 @@
+cp -v $GROUP/test.in .
Property changes on: trunk/tests/language/working/062-stdinerrout.setup.sh
___________________________________________________________________
Added: svn:executable
+ *
Modified: trunk/tests/language-behaviour/mappers/07511-fixed-array-mapper-input.check.sh
===================================================================
--- trunk/tests/language-behaviour/mappers/07511-fixed-array-mapper-input.check.sh 2011-09-27 19:50:12 UTC (rev 5181)
+++ trunk/tests/language-behaviour/mappers/07511-fixed-array-mapper-input.check.sh 2011-09-27 21:05:32 UTC (rev 5182)
@@ -1,6 +1,6 @@
#!/bin/bash
set -x
-cat $TEST_LOG | grep "file: 07511-fixed-array-mapper-input.first.in" || exit 1
-cat $TEST_LOG | grep "file: 07511-fixed-array-mapper-input.second.in" || exit 1
-cat $TEST_LOG | grep "file: 07511-fixed-array-mapper-input.third.in" || exit 1
+cat 07511-fixed-array-mapper-input.stdout | grep "file: 07511-fixed-array-mapper-input.first.in" || exit 1
+cat 07511-fixed-array-mapper-input.stdout | grep "file: 07511-fixed-array-mapper-input.second.in" || exit 1
+cat 07511-fixed-array-mapper-input.stdout | grep "file: 07511-fixed-array-mapper-input.third.in" || exit 1
exit 0
Added: trunk/tests/language-behaviour/mappers/0755-ext-mapper.sh.in
===================================================================
--- trunk/tests/language-behaviour/mappers/0755-ext-mapper.sh.in (rev 0)
+++ trunk/tests/language-behaviour/mappers/0755-ext-mapper.sh.in 2011-09-27 21:05:32 UTC (rev 5182)
@@ -0,0 +1,4 @@
+echo "[0].l 0755-ext-mapper.AAA.out"
+echo "[1].r 0755-ext-mapper.0.3.2.1.out"
+echo "[2].l 0755-ext-mapper.____.out"
+
Property changes on: trunk/tests/language-behaviour/mappers/0755-ext-mapper.sh.in
___________________________________________________________________
Added: svn:executable
+ *
Modified: trunk/tests/local/filesysmapper.check.sh
===================================================================
--- trunk/tests/local/filesysmapper.check.sh 2011-09-27 19:50:12 UTC (rev 5181)
+++ trunk/tests/local/filesysmapper.check.sh 2011-09-27 21:05:32 UTC (rev 5182)
@@ -2,8 +2,8 @@
set -x
-ls stdout.txt || exit 1
-COUNT=$( grep -c "file: [abc].dat" < stdout.txt )
+ls filesysmapper.stdout || exit 1
+COUNT=$( grep -c "file: [abc].dat" < filesysmapper.stdout )
(( $COUNT == 3 )) || exit 1
exit 0
Modified: trunk/tests/local/range.check.sh
===================================================================
--- trunk/tests/local/range.check.sh 2011-09-27 19:50:12 UTC (rev 5181)
+++ trunk/tests/local/range.check.sh 2011-09-27 21:05:32 UTC (rev 5182)
@@ -2,9 +2,9 @@
set -x
-ls stdout.txt || exit 1
+ls range.stdout || exit 1
-COUNT=$( grep -c "num:" stdout.txt )
+COUNT=$( grep -c "num:" range.stdout )
(( $COUNT == 11 )) || exit 1
exit 0
Modified: trunk/tests/suite.sh
===================================================================
--- trunk/tests/suite.sh 2011-09-27 19:50:12 UTC (rev 5181)
+++ trunk/tests/suite.sh 2011-09-27 21:05:32 UTC (rev 5182)
@@ -118,6 +118,7 @@
SEQ=1
DATE=$( date +"%Y-%m-%d" )
TIME=$( date +"%T" )
+HOURMINSEC=$( date +"%H%M%S" )
RUNDIRBASE="run-$DATE"
RUNDIR=$TOPDIR/$RUNDIRBASE
@@ -363,7 +364,7 @@
printf %-10.10s "success">>$REPORT
else
echo -e "${RED}FAILED${GRAY}"
- cat $RUNDIR/$TEST_LOG < /dev/null
+ cat $RUNDIR/$OUTPUT < /dev/null
printf %-10.10s "failure">>$REPORT
fi
@@ -377,17 +378,17 @@
# WIDTH=$( width "$LABEL" )
if [ "$RESULT" == "Passed" ]; then
html_td class "success" width 25 title "$CMD"
- html_a_href $TEST_LOG "$LABEL"
+ html_a_href "$TESTNAMEDIR/$OUTPUT" "$LABEL"
elif [ "$RESULT" == "None" ]; then
html_td width 25
html " "
html_~td
else
echo -e "${RED}FAILED${GRAY}"
- cat $RUNDIR/$TEST_LOG < /dev/null
+ cat $RUNDIR/$OUTPUT < /dev/null
html_td class "failure" width 25 title "$CMD"
- html_a_href $TEST_LOG $LABEL
- fi
+ html_a_href "$TESTNAMEDIR/$OUTPUT" "$LABEL"
+ fi
html_~td
elif [ "$TYPE" == "package" ]; then
BINPACKAGE=$2
@@ -596,8 +597,7 @@
fi
RESULT=$( result )
- test_log
- output_report test $SEQ "$LASTCMD" $RESULT $TEST_LOG
+ output_report test $SEQ "$LASTCMD" $RESULT $OUTPUT
check_bailout
@@ -695,8 +695,7 @@
LASTCMD="$@"
- test_log
- output_report test $SEQ "$LASTCMD" $RESULT $TEST_LOG
+ output_report test $SEQ "$LASTCMD" $RESULT $OUTPUT
check_bailout
@@ -711,7 +710,6 @@
process_exec $SCRIPT
RESULT=$( result )
- test_log
output_report test "$SYMBOL" "$LASTCMD" $RESULT
check_bailout
@@ -723,7 +721,7 @@
RESULT="None"
- if [ -f $GROUP/$NAME.in ]; then
+ if [ -f "$GROUP/$NAME.in" ]; then
echo "Copying input: $NAME.in"
cp -v $GROUP/$NAME.in . 2>&1 >> $OUTPUT
if [ "$?" != 0 ]; then
@@ -800,6 +798,7 @@
ARGSFILE=$NAME.args
TEST_SHOULD_FAIL=0
+ OUTPUT=$NAME.setup.stdout
if [ -x $GROUP/$SETUPSCRIPT ]; then
script_exec $GROUP/$SETUPSCRIPT "S"
else
@@ -818,9 +817,10 @@
TIMEOUT=$( gettimeout $GROUP/$TIMEOUTFILE )
- grep THIS-SCRIPT-SHOULD-FAIL $SWIFTSCRIPT > /dev/null
+ grep THIS-SCRIPT-SHOULD-FAIL $GROUP/$SWIFTSCRIPT > /dev/null
TEST_SHOULD_FAIL=$(( ! $? ))
+ OUTPUT=$NAME.stdout
monitored_exec $TIMEOUT swift \
-wrapperlog.always.transfer true \
-sitedir.keep true \
@@ -831,12 +831,13 @@
TEST_SHOULD_FAIL=0
if [ -x $GROUP/$CHECKSCRIPT ]; then
- export OUTPUT
+ OUTPUT=$NAME.check.stdout
script_exec $GROUP/$CHECKSCRIPT "√"
else
check_outputs $GROUP $NAME
fi
+ OUTPUT=$NAME.clean.stdout
if [ -x $GROUP/$CLEANSCRIPT ]; then
script_exec $GROUP/$CLEANSCRIPT "C"
else
@@ -858,6 +859,7 @@
TIMEOUTFILE=$NAME.timeout
TEST_SHOULD_FAIL=0
+ OUTPUT=$NAME.clean.stdout
if [ -x $GROUP/$SETUPSCRIPT ]; then
script_exec $GROUP/$SETUPSCRIPT "S"
else
@@ -879,6 +881,8 @@
html_~td
fi
+ OUTPUT=$NAME.stdout
+
if [ -x $GROUP/$SHELLSCRIPT ]; then
script_exec $SHELLSCRIPT "X"
else
@@ -887,6 +891,7 @@
html_~td
fi
+ OUTPUT=$NAME.check.stdout
if [ -x $GROUP/$CHECKSCRIPT ]; then
script_exec $GROUP/$CHECKSCRIPT "√"
else
@@ -895,6 +900,7 @@
html_~td
fi
+ OUTPUT=$NAME.clean.stdout
if [ -x $GROUP/$CLEANSCRIPT ]; then
script_exec $GROUP/$CLEANSCRIPT "C"
else
@@ -1075,10 +1081,6 @@
# Execute all tests in current GROUP
test_group() {
- group_sites_xml
- group_tc_data
- group_fs_data
- group_swift_properties
SWIFTS=$( echo $GROUP/*.swift )
checkfail "Could not list: $GROUP"
@@ -1087,8 +1089,6 @@
(( SKIP_COUNTER++ < SKIP_TESTS )) && continue
- TESTNAME=$( basename $TEST )
-
echo
echo
echo "/--------------------------------------------------------------"
@@ -1096,21 +1096,34 @@
echo "\--------------------------------------------------------------"
echo
- cp $GROUP/$TESTNAME .
TESTLINK=$TESTNAME
# Use repeat.txt to determine number of test iterations
SCRIPT_BASENAME=`basename $TESTNAME .swift`
+ TESTLINK="$TESTNAMEDIR/$TESTNAME"
if [ -f "$GROUP/$SCRIPT_BASENAME.repeat" ]; then
ITERS_LOCAL=`cat $GROUP/$SCRIPT_BASENAME.repeat`
fi
for (( i=0; $i<$ITERS_LOCAL; i=$i+1 )); do
+ HOURMINSEC=$( date +"%H%M%S" )
+ TESTNAME=$( basename $TEST )
+ TESTNAMEDIR=`basename $TESTNAME .swift`-$HOURMINSEC
+ TESTLINK="$TESTNAMEDIR/$TESTNAME"
+ mkdir -p $TESTNAMEDIR
+ pushd $TESTNAMEDIR > /dev/null 2>&1
+
+ cp $TEST .
+ group_swift_properties
+ group_sites_xml
+ group_tc_data
+ group_fs_data
start_row
swift_test_case $TESTNAME
(( $TESTCOUNT >= $NUMBER_OF_TESTS )) && return
(( $SHUTDOWN )) && return
end_row
+ popd > /dev/null 2>&1
done
done
group_statistics
@@ -1125,11 +1138,12 @@
for TEST in $SCRIPTS; do
(( SKIP_COUNTER++ < SKIP_TESTS )) && continue
-
+ HOURMINSEC=$( date +"%H%M%S" )
TESTNAME=$( basename $TEST )
+ TESTNAMEDIR=`basename $TESTNAME .swift`-$HOURMINSEC
+ mkdir -p $TESTNAMEDIR
+ pushd $TESTNAMEDIR > /dev/null 2>&1
cp -v $GROUP/$TESTNAME .
- TESTLINK=$TESTNAME
-
start_row
for ((i=0; $i<$ITERS_LOCAL; i=$i+1)); do
script_test_case $TESTNAME
@@ -1178,6 +1192,7 @@
start_group "Build"
TESTLINK=
EXITONFAILURE=true
+OUTPUT=checkout.stdout
if [ "$SKIP_CHECKOUT" != "1" ]; then
TESTNAME="Checkout CoG"
start_row
@@ -1195,6 +1210,7 @@
TESTNAME="Compile"
start_row
+OUTPUT=compile.stdout
# Exit early if the Swift directory is not there
if [[ ! -d $TOPDIR/cog/modules/swift ]]
then
@@ -1212,7 +1228,7 @@
test_exec ant -quiet dist
fi
SWIFT_HOME=$TOPDIR/cog/modules/swift/dist/swift-svn
-
+OUTPUT=compile.stdout
if [ $BUILD_PACKAGE = "1" ]; then
build_package
fi
@@ -1246,6 +1262,7 @@
(( $SHUTDOWN )) && break
done
+footer
exit 0
# Local Variables:
More information about the Swift-commit
mailing list