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

Chris Lattner lattner at cs.uiuc.edu
Sun May 11 12:35:01 PDT 2003


Changes in directory llvm/test/Programs:

RunSafely.sh updated: 1.1 -> 1.2

---
Log message:

Capture timing information and stdout/stderr to a file


---
Diffs of the changes:

Index: llvm/test/Programs/RunSafely.sh
diff -u llvm/test/Programs/RunSafely.sh:1.1 llvm/test/Programs/RunSafely.sh:1.2
--- llvm/test/Programs/RunSafely.sh:1.1	Sun Jan 19 12:07:38 2003
+++ llvm/test/Programs/RunSafely.sh	Sun May 11 12:34:14 2003
@@ -7,15 +7,20 @@
 #           like print a stack trace of a core dump.  It always returns
 #           "successful" so that tests will continue to be run.
 #
-# Syntax:  ./RunSafely.sh <program> <arguments>
+#           This script funnels stdout and stderr from the program into the
+#           first argument specified, and outputs a <outputfile>.time file which
+#           contains a timing of the program.
 #
-
+# Syntax:  ./RunSafely.sh <outputfile> <program> <arguments>
+#
+OUTFILE=$1
+shift
 PROGRAM=$1
 shift
 
-rm -f core*
+rm -f core core.*
 ulimit -c hard
-$PROGRAM $*
+(time -p $PROGRAM $* > $OUTFILE 2>&1) 2> $OUTFILE.time
 if ls | egrep "^core" > /dev/null
 then
     corefile=`ls core* | head -1`





More information about the llvm-commits mailing list