[RFC PATCH 2/3] xfstests: use an intermediate check.log file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Use an intermediate check.log file for each test run so that it can be
uploaded to a central location by a subsequent patch in this series.
The intermediate file is appended to $RESULTS_DIR/check.log a the end of
each run.

Signed-off-by: Ben Myers <bpm@xxxxxxx>

---
 check |   21 ++++++++++++---------
 1 file changed, 12 insertions(+), 9 deletions(-)

Index: xfstests.new2/check
===================================================================
--- xfstests.new2.orig/check
+++ xfstests.new2/check
@@ -314,11 +314,11 @@ END	{ if (NR > 0) {
 	    mv $tmp.out $check.time
 	fi
 
-	echo "" >>$check.log
-	date >>$check.log
-	cat /tmp/check.desc >>$check.log
-	echo $list | fmt | sed -e 's/^/    /' -e "s;$SRC_DIR/;;g" >>$check.log
-	$interrupt && echo "Interrupted!" >>$check.log
+	echo "" >>/tmp/check.log
+	date >>/tmp/check.log
+	cat /tmp/check.desc >>/tmp/check.log
+	echo $list | fmt | sed -e 's/^/    /' -e "s;$SRC_DIR/;;g" >>/tmp/check.log
+	$interrupt && echo "Interrupted!" >>/tmp/check.log
         
         if [ ! -z "$n_try" -a $n_try != 0 ]
 	then
@@ -328,20 +328,22 @@ END	{ if (NR > 0) {
 	if [ ! -z "$notrun" ]
 	then
 	    echo "Not run:$notrun"
-	    echo "Not run:$notrun" >>$check.log
+	    echo "Not run:$notrun" >>/tmp/check.log
 	fi
 
         if [ ! -z "$n_bad" -a $n_bad != 0 ]
 	then
 	    echo "Failures:$bad"
 	    echo "Failed $n_bad of $n_try tests"
-	    echo "Failures:$bad" | fmt >>$check.log
-	    echo "Failed $n_bad of $n_try tests" >>$check.log
+	    echo "Failures:$bad" | fmt >>/tmp/check.log
+	    echo "Failed $n_bad of $n_try tests" >>/tmp/check.log
 	else
 	    echo "Passed all $n_try tests"
-	    echo "Passed all $n_try tests" >>$check.log
+	    echo "Passed all $n_try tests" >>/tmp/check.log
 	fi
 	needwrap=false
+        cat /tmp/check.log >> $check.log
+	rm -f /tmp/check.log
     fi
 
     rm -f /tmp/*.rawout /tmp/*.out /tmp/*.err /tmp/*.time

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs




[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux