[llvm-commits] [test-suite] r153018 - /test-suite/trunk/RunSafely.sh

Daniel Dunbar daniel at zuster.org
Sun Mar 18 12:11:54 PDT 2012


Author: ddunbar
Date: Sun Mar 18 14:11:54 2012
New Revision: 153018

URL: http://llvm.org/viewvc/llvm-project?rev=153018&view=rev
Log:
[test-suite] Update RunSafely to use the --redirect-{input,output} options for
timeit; this fixes a bogoism where we were timing the command-to-test + the
shell.

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=153018&r1=153017&r2=153018&view=diff
==============================================================================
--- test-suite/trunk/RunSafely.sh (original)
+++ test-suite/trunk/RunSafely.sh Sun Mar 18 14:11:54 2012
@@ -139,12 +139,12 @@
 TIMEITCMD="$TIMEIT --timeout $TIMELIMIT --chdir $PWD"
 if [ "x$RHOST" = x ] ; then
   rm -f "$OUTFILE.time"
-  sh -c "$ULIMITCMD $TIMEITCMD --summary $OUTFILE.time sh -c '$COMMAND >$OUTFILE 2>&1 < $INFILE'"
+  sh -c "$ULIMITCMD $TIMEITCMD --summary $OUTFILE.time --redirect-input $INFILE --redirect-output $OUTFILE $COMMAND"
 else
   rm -f "$PWD/${PROG}.command"
   rm -f "$PWD/${PROG}.remote"
   rm -f "$PWD/${OUTFILE}.remote.time"
-  echo "$ULIMITCMD cd $PWD; ($TIMEITCMD --summary $PWD/$OUTFILE.remote.time sh -c '($COMMAND > $PWD/${OUTFILE}.remote 2>&1 < $INFILE;)')" > "$PWD/${PROG}.command"
+  echo "$ULIMITCMD cd $PWD; $TIMEITCMD --summary $PWD/$OUTFILE.remote.time --redirect-input $INFILE --redirect-output $PWD/${OUTFILE}.remote $COMMAND" > "$PWD/${PROG}.command"
   chmod +x "$PWD/${PROG}.command"
 
   ( $RCLIENT -l $RUSER $RHOST $RPORT "ls $PWD/${PROG}.command" ) > /dev/null 2>&1





More information about the llvm-commits mailing list