[llvm-commits] CVS: llvm-test/RunSafely.sh
Reid Spencer
reid at x10sys.com
Wed Dec 29 19:10:49 PST 2004
Changes in directory llvm-test:
RunSafely.sh updated: 1.16 -> 1.17
---
Log message:
Permit this script to run correctly on Cygwin where /bin/sh is not the
Bourne Again Shell, just the Bourne Shell. It doesn't support the ulimit
command so we avoid running it.
---
Diffs of the changes: (+12 -6)
Index: llvm-test/RunSafely.sh
diff -u llvm-test/RunSafely.sh:1.16 llvm-test/RunSafely.sh:1.17
--- llvm-test/RunSafely.sh:1.16 Sun Nov 7 15:28:32 2004
+++ llvm-test/RunSafely.sh Wed Dec 29 21:10:38 2004
@@ -18,13 +18,19 @@
OUTFILE=$3
PROGRAM=$4
shift 4
+SYSTEM=`uname -s`
-ulimit -t $ULIMIT
+case $SYSTEM in
+ CYGWIN*)
+ ;;
+ *)
+ ulimit -t $ULIMIT
+ ulimit -c unlimited
+ # To prevent infinite loops which fill up the disk, specify a limit on size of
+ # files being output by the tests. 10 MB should be enough for anybody. ;)
+ ulimit -f 10485760
+esac
rm -f core core.*
-ulimit -c unlimited
-# To prevent infinite loops which fill up the disk, specify a limit on size of
-# files being output by the tests. 10 MB should be enough for anybody. ;)
-ulimit -f 10485760
#
# Run the command, timing its execution.
@@ -36,7 +42,7 @@
# we tell time to launch a shell which in turn executes $PROGRAM with the
# necessary I/O redirection.
#
-(time -p sh -c "$PROGRAM $* > $OUTFILE 2>&1 < $INFILE") 2>&1 | awk -- '\
+( time -p sh -c "$PROGRAM $* > $OUTFILE 2>&1 < $INFILE" ) 2>&1 | awk -- '\
BEGIN { cpu = 0.0; }
/^user/ { cpu += $2; print }
/^sys/ { cpu += $2; print }
More information about the llvm-commits
mailing list