[llvm-commits] CVS: llvm-test/RunSafely.sh
Lauro Ramos Venancio
lauro.venancio at gmail.com
Fri May 4 14:25:00 PDT 2007
Changes in directory llvm-test:
RunSafely.sh updated: 1.28 -> 1.29
---
Log message:
bugfix: wrong return value on remote test.
bugfix: RUNTIMELIMIT doesn't work on remote test.
---
Diffs of the changes: (+9 -8)
RunSafely.sh | 17 +++++++++--------
1 files changed, 9 insertions(+), 8 deletions(-)
Index: llvm-test/RunSafely.sh
diff -u llvm-test/RunSafely.sh:1.28 llvm-test/RunSafely.sh:1.29
--- llvm-test/RunSafely.sh:1.28 Thu May 3 16:32:39 2007
+++ llvm-test/RunSafely.sh Fri May 4 16:24:42 2007
@@ -62,24 +62,25 @@
shift 5
SYSTEM=`uname -s`
+ULIMITCMD=""
case $SYSTEM in
CYGWIN*)
;;
Darwin*)
# Disable core file emission, the script doesn't find it anyway because it is put
# into /cores.
- ulimit -c 0
- ulimit -t $ULIMIT
+ ULIMITCMD="$ULIMITCMD ulimit -c 0;"
+ ULIMITCMD="$ULIMITCMD ulimit -t $ULIMIT;"
# 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
+ ULIMITCMD="$ULIMITCMD ulimit -f 10485760;"
;;
*)
- ulimit -t $ULIMIT
- ulimit -c unlimited
+ ULIMITCMD="$ULIMITCMD ulimit -t $ULIMIT;"
+ ULIMITCMD="$ULIMITCMD 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
+ ULIMITCMD="$ULIMITCMD ulimit -f 10485760;"
esac
rm -f core core.*
@@ -101,7 +102,7 @@
fi
if [ "x$RHOST" = x ] ; then
- ( time -p sh -c "$COMMAND >$OUTFILE 2>&1 < $INFILE" ; echo exit $? ) 2>&1 \
+ ( time -p sh -c "$ULIMITCMD $COMMAND >$OUTFILE 2>&1 < $INFILE" ; echo exit $? ) 2>&1 \
| awk -- '\
BEGIN { cpu = 0.0; }
/^user/ { cpu += $2; print; }
@@ -109,7 +110,7 @@
!/^user/ && !/^sys/ { print; }
END { printf("program %f\n", cpu); }' > $OUTFILE.time
else
- ( rsh -l $RUSER $RHOST "cd $PWD; time -p $COMMAND >$OUTFILE.remote 2>&1 < $INFILE" ; echo exit $? ) 2>&1 \
+ ( rsh -l $RUSER $RHOST "$ULIMITCMD cd $PWD; time -p $COMMAND >$OUTFILE.remote 2>&1 < $INFILE; echo exit \$?" ) 2>&1 \
| awk -- '\
BEGIN { cpu = 0.0; }
/^user/ { cpu += $2; print; }
More information about the llvm-commits
mailing list