[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.

git-svn-id: https://llvm.org/svn/llvm-project/test-suite/trunk@153018 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Daniel Dunbar 2012-03-18 19:11:54 +00:00
Родитель 63a0282fc7
Коммит a8cdf1d750
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -139,12 +139,12 @@ COMMAND=$(echo "$COMMAND" | sed -e 's#"#\\"#g')
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