[llvm-commits] CVS: llvm/test/Programs/Makefile.programs RunSafely.sh
Chris Lattner
lattner at cs.uiuc.edu
Sat May 31 18:17:01 PDT 2003
Changes in directory llvm/test/Programs:
Makefile.programs updated: 1.51 -> 1.52
RunSafely.sh updated: 1.4 -> 1.5
---
Log message:
Add optional STDIN_FILENAME support
---
Diffs of the changes:
Index: llvm/test/Programs/Makefile.programs
diff -u llvm/test/Programs/Makefile.programs:1.51 llvm/test/Programs/Makefile.programs:1.52
--- llvm/test/Programs/Makefile.programs:1.51 Sat May 17 17:32:40 2003
+++ llvm/test/Programs/Makefile.programs Sat May 31 18:16:10 2003
@@ -225,28 +225,33 @@
JIT_OPTS = -force-interpreter=false $(EXTRA_LLI_OPTS)
ifndef PROGRAMS_HAVE_CUSTOM_RUN_RULES
+
+ifndef STDIN_FILENAME
+STDIN_FILENAME = /dev/null
+endif
+
# Rules to build the test output...
ifndef USE_PRECOMPILED_BYTECODE
$(PROGRAMS_TO_TEST:%=Output/%.out-nat): \
Output/%.out-nat: Output/%.native
- -$(RUNSAFELY) $@ $< $(RUN_OPTIONS)
+ -$(RUNSAFELY) $(STDIN_FILENAME) $@ $< $(RUN_OPTIONS)
endif
$(PROGRAMS_TO_TEST:%=Output/%.out-lli): \
Output/%.out-lli: Output/%.llvm.bc $(LLI)
- -$(RUNSAFELY) $@ $(LLI) $(LLI_OPTS) $< $(RUN_OPTIONS)
+ -$(RUNSAFELY) $(STDIN_FILENAME) $@ $(LLI) $(LLI_OPTS) $< $(RUN_OPTIONS)
$(PROGRAMS_TO_TEST:%=Output/%.out-jit): \
Output/%.out-jit: Output/%.llvm.bc $(LLI)
- -$(RUNSAFELY) $@ $(LLI) $(JIT_OPTS) $< $(RUN_OPTIONS)
+ -$(RUNSAFELY) $(STDIN_FILENAME) $@ $(LLI) $(JIT_OPTS) $< $(RUN_OPTIONS)
$(PROGRAMS_TO_TEST:%=Output/%.out-llc): \
Output/%.out-llc: Output/%.llc
- -$(RUNSAFELY) $@ $< $(RUN_OPTIONS)
+ -$(RUNSAFELY) $(STDIN_FILENAME) $@ $< $(RUN_OPTIONS)
$(PROGRAMS_TO_TEST:%=Output/%.out-cbe): \
Output/%.out-cbe: Output/%.cbe
- -$(RUNSAFELY) $@ $< $(RUN_OPTIONS)
+ -$(RUNSAFELY) $(STDIN_FILENAME) $@ $< $(RUN_OPTIONS)
endif
#
Index: llvm/test/Programs/RunSafely.sh
diff -u llvm/test/Programs/RunSafely.sh:1.4 llvm/test/Programs/RunSafely.sh:1.5
--- llvm/test/Programs/RunSafely.sh:1.4 Sat May 17 17:32:40 2003
+++ llvm/test/Programs/RunSafely.sh Sat May 31 18:16:10 2003
@@ -11,10 +11,12 @@
# first argument specified, and outputs a <outputfile>.time file which
# contains a timing of the program.
#
-# Syntax: ./RunSafely.sh <ulimit> <outputfile> <program> <arguments>
+# Syntax: ./RunSafely.sh <ulimit> <stdinfile> <stdoutfile> <program> <args...>
#
ULIMIT=$1
shift
+INFILE=$1
+shift
OUTFILE=$1
shift
PROGRAM=$1
@@ -23,7 +25,7 @@
ulimit -t $ULIMIT
rm -f core core.*
ulimit -c unlimited
-(time -p $PROGRAM $* > $OUTFILE) 2> $OUTFILE.time
+(time -p $PROGRAM $* > $OUTFILE < $INFILE) 2> $OUTFILE.time
if ls | egrep "^core" > /dev/null
then
corefile=`ls core* | head -1`
More information about the llvm-commits
mailing list