[Swift-commit] r7141 - in trunk/tests: . language-behaviour/IO
davidk at ci.uchicago.edu
davidk at ci.uchicago.edu
Mon Oct 7 15:14:22 CDT 2013
Author: davidk
Date: 2013-10-07 15:14:21 -0500 (Mon, 07 Oct 2013)
New Revision: 7141
Added:
trunk/tests/language-behaviour/IO/readStructured01.in
trunk/tests/language-behaviour/IO/readStructured02.in
trunk/tests/language-behaviour/IO/readStructured03.in
Removed:
trunk/tests/language-behaviour/IO/readStructured.in
trunk/tests/language-behaviour/IO/readStructured3.in
Modified:
trunk/tests/language-behaviour/IO/readStructured01.swift
trunk/tests/language-behaviour/IO/readStructured02.swift
trunk/tests/language-behaviour/IO/readStructured03.swift
trunk/tests/suite.sh
Log:
Applying fixes to test suite that were in 0.94 branch
Fixes for running test suite on mac, broken inputs to readStructured, properly kill hung processes, fix for ability to repeat tests N times
Deleted: trunk/tests/language-behaviour/IO/readStructured.in
===================================================================
--- trunk/tests/language-behaviour/IO/readStructured.in 2013-10-07 02:22:49 UTC (rev 7140)
+++ trunk/tests/language-behaviour/IO/readStructured.in 2013-10-07 20:14:21 UTC (rev 7141)
@@ -1,2 +0,0 @@
-rows[0] = "hello"
-rows[1] = "World!"
Copied: trunk/tests/language-behaviour/IO/readStructured01.in (from rev 7050, trunk/tests/language-behaviour/IO/readStructured.in)
===================================================================
--- trunk/tests/language-behaviour/IO/readStructured01.in (rev 0)
+++ trunk/tests/language-behaviour/IO/readStructured01.in 2013-10-07 20:14:21 UTC (rev 7141)
@@ -0,0 +1,2 @@
+rows[0] = "hello"
+rows[1] = "World!"
Modified: trunk/tests/language-behaviour/IO/readStructured01.swift
===================================================================
--- trunk/tests/language-behaviour/IO/readStructured01.swift 2013-10-07 02:22:49 UTC (rev 7140)
+++ trunk/tests/language-behaviour/IO/readStructured01.swift 2013-10-07 20:14:21 UTC (rev 7141)
@@ -3,5 +3,4 @@
}
matrix m;
-m = readStructured("readStructured.in");
-
+m = readStructured("readStructured01.in");
Added: trunk/tests/language-behaviour/IO/readStructured02.in
===================================================================
--- trunk/tests/language-behaviour/IO/readStructured02.in (rev 0)
+++ trunk/tests/language-behaviour/IO/readStructured02.in 2013-10-07 20:14:21 UTC (rev 7141)
@@ -0,0 +1,2 @@
+rows[0] = "hello"
+rows[1] = "World!"
Modified: trunk/tests/language-behaviour/IO/readStructured02.swift
===================================================================
--- trunk/tests/language-behaviour/IO/readStructured02.swift 2013-10-07 02:22:49 UTC (rev 7140)
+++ trunk/tests/language-behaviour/IO/readStructured02.swift 2013-10-07 20:14:21 UTC (rev 7141)
@@ -3,8 +3,8 @@
}
matrix m;
-m = readStructured("readStructured.in");
+m = readStructured("readStructured02.in");
foreach item,index in m.rows {
tracef("Row[%i] : %s \n", index, item);
-}
\ No newline at end of file
+}
Copied: trunk/tests/language-behaviour/IO/readStructured03.in (from rev 7050, trunk/tests/language-behaviour/IO/readStructured3.in)
===================================================================
--- trunk/tests/language-behaviour/IO/readStructured03.in (rev 0)
+++ trunk/tests/language-behaviour/IO/readStructured03.in 2013-10-07 20:14:21 UTC (rev 7141)
@@ -0,0 +1,6 @@
+rows[0].columns[0] = 0
+rows[0].columns[1] = 2
+rows[0].columns[2] = 4
+rows[1].columns[0] = 1
+rows[1].columns[1] = 3
+rows[1].columns[2] = 5
\ No newline at end of file
Modified: trunk/tests/language-behaviour/IO/readStructured03.swift
===================================================================
--- trunk/tests/language-behaviour/IO/readStructured03.swift 2013-10-07 02:22:49 UTC (rev 7140)
+++ trunk/tests/language-behaviour/IO/readStructured03.swift 2013-10-07 20:14:21 UTC (rev 7141)
@@ -6,4 +6,4 @@
}
matrix m;
-m = readStructured("readStructured3.in");
+m = readStructured("readStructured03.in");
Deleted: trunk/tests/language-behaviour/IO/readStructured3.in
===================================================================
--- trunk/tests/language-behaviour/IO/readStructured3.in 2013-10-07 02:22:49 UTC (rev 7140)
+++ trunk/tests/language-behaviour/IO/readStructured3.in 2013-10-07 20:14:21 UTC (rev 7141)
@@ -1,6 +0,0 @@
-rows[0].columns[0] = 0
-rows[0].columns[1] = 2
-rows[0].columns[2] = 4
-rows[1].columns[0] = 1
-rows[1].columns[1] = 3
-rows[1].columns[2] = 5
\ No newline at end of file
Modified: trunk/tests/suite.sh
===================================================================
--- trunk/tests/suite.sh 2013-10-07 02:22:49 UTC (rev 7140)
+++ trunk/tests/suite.sh 2013-10-07 20:14:21 UTC (rev 7141)
@@ -39,8 +39,8 @@
INDIVIDUAL_TEST_TIME=0
COLORIZE=0
# The directory in which to start:
-TOPDIR=`readlink -f $PWD/../../../..`
-CRTDIR=`pwd`
+TOPDIR=$( cd ../../../.. && echo $PWD )
+CRTDIR=$PWD
# Disable usage stats in test suite
export SWIFT_USAGE_STATS=0
@@ -544,8 +544,15 @@
process_trap() {
PROCESS_INTERNAL_PID=$1
echo "process_trap: killing: $PROCESS_INTERNAL_PID"
- # ps -H
- kill -TERM -$PROCESS_INTERNAL_PID
+ ps -o "pid,ppid"|sed 1d | while read PROC
+ do
+ PROC_PID=$( echo $PROC | awk '{print $1}' )
+ PROC_PPID=$( echo $PROC | awk '{print $2}' )
+ if [ $PROC_PPID == $PROCESS_INTERNAL_PID ]
+ then
+ kill $PROC_PID
+ fi
+ done
}
# Execute process in the background
@@ -633,7 +640,7 @@
wait
[ $? != 0 ] && verbose "monitor($V) cancelled" && return 0
- if ps | grep $PID
+ if ps | grep $PID > /dev/null 2>&1
then
echo "monitor: killing test process $PID"
touch killed_test
@@ -679,8 +686,11 @@
# If the test was killed, monitor() may have work to do
rm killed_test > /dev/null 2>&1 && sleep 5
- verbose "killing monitor: $MONITOR_PID..."
- kill $MONITOR_PID
+ if ps -p $MONITOR_PID > /dev/null 2>&1
+ then
+ verbose "killing monitor: $MONITOR_PID..."
+ kill $MONITOR_PID
+ fi
INDIVIDUAL_TEST_TIME=$(( STOP-START ))
TOTAL_TIME=$(( INDIVIDUAL_TEST_TIME+TOTAL_TIME ))
@@ -807,7 +817,6 @@
cp "$GROUP/$SOURCESCRIPT" .
source ./$SOURCESCRIPT
fi
- echo "GLOBUS_HOSTNAME : $GLOBUS_HOSTNAME"
if [ -x "$GROUP/$SETUPSCRIPT" ]; then
cp "$GROUP/$SETUPSCRIPT" .
@@ -972,17 +981,6 @@
output_report package "swift-$DATE.tar.gz"
}
-# Setup coasters variables
-if which ifconfig > /dev/null 2>&1; then
- IFCONFIG=ifconfig
-else
- IFCONFIG=/sbin/ifconfig
-fi
-$IFCONFIG > /dev/null 2>&1 || crash "Cannot run ifconfig!"
-export GLOBUS_HOSTNAME=$( $IFCONFIG | grep inet | head -1 | cut -d ':' -f 2 | \
- awk '{print $1}' )
-[ $? != 0 ] && crash "Could not obtain GLOBUS_HOSTNAME!"
-
# Generate sites.xml
group_sites_xml() {
@@ -1105,12 +1103,12 @@
for TEST in $SWIFTS; do
(( SKIP_COUNTER++ < SKIP_TESTS )) && continue
-
- # Use repeat.txt to determine number of test iterations
- SCRIPT_BASENAME=`basename $TESTNAME .swift`
+ # Use scriptname.repeat to determine number of test iterations
+ SCRIPT_BASENAME=`basename $TEST .swift`
TESTLINK="$TESTNAMEDIR/$TESTNAME"
+ GROUP_DIRNAME=$( dirname $GROUP )
if [ -f "$GROUP/$SCRIPT_BASENAME.repeat" ]; then
- ITERS_LOCAL=`cat $GROUP/$SCRIPT_BASENAME.repeat`
+ ITERS_LOCAL=$( cat $GROUP/$SCRIPT_BASENAME.repeat )
else
ITERS_LOCAL=1
fi
More information about the Swift-commit
mailing list