[llvm-commits] [test-suite] r51369 - /test-suite/trunk/RunSafely.sh
Matthijs Kooijman
matthijs at stdin.nl
Wed May 21 03:47:33 PDT 2008
Author: matthijs
Date: Wed May 21 05:47:32 2008
New Revision: 51369
URL: http://llvm.org/viewvc/llvm-project?rev=51369&view=rev
Log:
Run test-suite commands in (another) subshell. This ensures that the output of
the program and the time command is properly separated. This used to work only
on shells that have a builtin "time" command (such as bash). This change makes
things work consistently among different shells (tested on bash, dash and
FreeBSD sh) and should be POSIX compatible.
A similar change is probably needed for the remote execution part, but someone
who is using that should have a look at it.
Modified:
test-suite/trunk/RunSafely.sh
Modified: test-suite/trunk/RunSafely.sh
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/RunSafely.sh?rev=51369&r1=51368&r2=51369&view=diff
==============================================================================
--- test-suite/trunk/RunSafely.sh (original)
+++ test-suite/trunk/RunSafely.sh Wed May 21 05:47:32 2008
@@ -105,7 +105,7 @@
fi
if [ "x$RHOST" = x ] ; then
- ( sh -c "$ULIMITCMD time -p $COMMAND >$OUTFILE 2>&1 < $INFILE; echo exit \$?" ) 2>&1 \
+ ( sh -c "$ULIMITCMD time -p sh -c '$COMMAND >$OUTFILE 2>&1 < $INFILE; echo exit \$?'" ) 2>&1 \
| awk -- '\
BEGIN { cpu = 0.0; }
/^user/ { cpu += $2; print; }
More information about the llvm-commits
mailing list