[llvm-commits] CVS: llvm-test/RunSafely.sh

Reid Spencer reid at x10sys.com
Mon Nov 27 23:17:00 PST 2006



Changes in directory llvm-test:

RunSafely.sh updated: 1.23 -> 1.24
---
Log message:

Make the script always output an "exit <retval>" line to the end of the
program's output. This will make differences in the return val show up
when the reference and test outputs are diff'd.


---
Diffs of the changes:  (+9 -9)

 RunSafely.sh |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)


Index: llvm-test/RunSafely.sh
diff -u llvm-test/RunSafely.sh:1.23 llvm-test/RunSafely.sh:1.24
--- llvm-test/RunSafely.sh:1.23	Sun Nov 26 01:14:16 2006
+++ llvm-test/RunSafely.sh	Tue Nov 28 01:16:45 2006
@@ -88,17 +88,17 @@
 !/^user/ && !/^sys/  { print; }
 END       { printf("program %f\n", cpu); }' > $OUTFILE.time
 
+exitval=`grep '^exit ' $OUTFILE.time | sed -e 's/^exit //'`
+if [ -z "$exitval" ] ; then
+  exitval=99
+  echo "TEST $PROGRAM FAILED:  CAN'T GET EXIT CODE!"
+fi
+echo "exit $exitval" >> $OUTFILE
+
 if [ "$EXITOK" -ne 0 ] ; then
-  exitval=`grep '^exit ' $OUTFILE.time | sed -e 's/^exit //'`
-  if [ -z "$exitval" ] ; then
-    exitval=99
-    echo "TEST $PROGRAM FAILED:  CAN'T GET EXIT CODE!"
-  else
-    if test "$exitval" -ne 0 ; then
-      echo "TEST $PROGRAM FAILED:  EXIT != 0"
-    fi
+  if test "$exitval" -ne 0 ; then
+    echo "TEST $PROGRAM FAILED:  EXIT != 0"
   fi
-  echo "exit $exitval" >> $OUTFILE
 else
   exitval=0
 fi






More information about the llvm-commits mailing list