[llvm-commits] CVS: llvm/test/Programs/Makefile.programs TEST.nightly.Makefile

Chris Lattner lattner at cs.uiuc.edu
Sun May 11 12:35:06 PDT 2003


Changes in directory llvm/test/Programs:

Makefile.programs updated: 1.42 -> 1.43
TEST.nightly.Makefile updated: 1.6 -> 1.7

---
Log message:

Make the testing results more reliable, working around an apparent make bug


---
Diffs of the changes:

Index: llvm/test/Programs/Makefile.programs
diff -u llvm/test/Programs/Makefile.programs:1.42 llvm/test/Programs/Makefile.programs:1.43
--- llvm/test/Programs/Makefile.programs:1.42	Sat May 10 16:37:33 2003
+++ llvm/test/Programs/Makefile.programs	Sun May 11 12:34:39 2003
@@ -68,7 +68,7 @@
 # stack trace of a core dump.  It always returns "successful" so that tests will
 # continue to be run.
 ULIMIT   := ulimit -t $(RUNTIMELIMIT)
-RUNSAFELY := $(PROGDIR)/RunSafely.sh
+RUNSAFELY := $(ULIMIT); $(PROGDIR)/RunSafely.sh
 
 #
 # Targets to build for the default target...
@@ -205,32 +205,31 @@
 ifndef USE_PRECOMPILED_BYTECODE
 $(PROGRAMS_TO_TEST:%=Output/%.out-nat): \
 Output/%.out-nat: Output/%.native
-	-$(ULIMIT); $(RUNSAFELY) $< > $@ $(RUN_OPTIONS)
+	-$(RUNSAFELY) $@ $< $(RUN_OPTIONS)
 endif
 
 # EXTRA_LLI_OPTS is used by the nightly tester to add arguments to invocations
 # of the JIT and LLI in order to get timing info and statistics.
 EXTRA_LLI_OPTS := 
 
-LLI_OPTS := -q -abort-on-exception -force-interpreter=true $(EXTRA_LLI_OPTS)
-JIT_OPTS := -force-interpreter=false $(EXTRA_LLI_OPTS)
-
-ifdef TIME_RUN
-TIME := time -p
-endif
+LLI_OPTS = -q -abort-on-exception -force-interpreter=true $(EXTRA_LLI_OPTS)
+JIT_OPTS = -force-interpreter=false $(EXTRA_LLI_OPTS)
 
 $(PROGRAMS_TO_TEST:%=Output/%.out-lli): \
 Output/%.out-lli: Output/%.llvm.bc $(LLI)
-	-$(ULIMIT); $(TIME) $(RUNSAFELY) $(LLI) $(LLI_OPTS) $< > $@ $(RUN_OPTIONS)
+	-$(RUNSAFELY) $@ $(LLI) $(LLI_OPTS) $< $(RUN_OPTIONS)
+
 $(PROGRAMS_TO_TEST:%=Output/%.out-jit): \
 Output/%.out-jit: Output/%.llvm.bc $(LLI)
-	-$(ULIMIT); $(TIME) $(RUNSAFELY) $(LLI) $(JIT_OPTS) $< > $@ $(RUN_OPTIONS)
+	-$(RUNSAFELY) $@ $(LLI) $(JIT_OPTS) $< $(RUN_OPTIONS)
+
 $(PROGRAMS_TO_TEST:%=Output/%.out-llc): \
 Output/%.out-llc: Output/%.llc
-	-$(ULIMIT); $(TIME) $(RUNSAFELY) $< > $@ $(RUN_OPTIONS)
+	-$(RUNSAFELY) $@ $< $(RUN_OPTIONS)
+
 $(PROGRAMS_TO_TEST:%=Output/%.out-cbe): \
 Output/%.out-cbe: Output/%.cbe
-	-$(ULIMIT); $(TIME) $(RUNSAFELY) $< > $@ $(RUN_OPTIONS)
+	-$(RUNSAFELY) $@ $< $(RUN_OPTIONS)
 
 #
 # Rules to diff test output...


Index: llvm/test/Programs/TEST.nightly.Makefile
diff -u llvm/test/Programs/TEST.nightly.Makefile:1.6 llvm/test/Programs/TEST.nightly.Makefile:1.7
--- llvm/test/Programs/TEST.nightly.Makefile:1.6	Sat May 10 15:49:18 2003
+++ llvm/test/Programs/TEST.nightly.Makefile	Sun May 11 12:34:39 2003
@@ -13,6 +13,7 @@
 REPORTS_SUFFIX := $(addsuffix .report.txt, $(REPORTS_TO_GEN))
 
 TIMEOPT = -time-passes -stats -info-output-file=$@.info
+EXTRA_LLI_OPTS = $(TIMEOPT)
 
 # Compilation tests
 $(PROGRAMS_TO_TEST:%=Output/%.nightly.compile.report.txt): \
@@ -54,54 +55,51 @@
 
 # CBE tests
 $(PROGRAMS_TO_TEST:%=Output/%.nightly.cbe.report.txt): \
-Output/%.nightly.cbe.report.txt: Output/%.llvm.bc Output/%.out-cbe $(LDIS)
-	-($(MAKE) TIME_RUN=1 Output/$*.diff-cbe) 2>&1 | head -n 100 > $@
+Output/%.nightly.cbe.report.txt: Output/%.llvm.bc Output/%.diff-cbe $(LDIS)
+	-head -n 100 Output/$*.diff-cbe > $@
 	@if test -f Output/$*.diff-cbe; then \
           echo "TEST-RESULT-cbe: YES" >> $@;\
 	  echo -n "TEST-RESULT-cbe-time: " >> $@;\
-	  grep "^real" $@ >> $@;\
+	  grep "^real" Output/$*.out-cbe.time >> $@;\
 	  echo >> $@;\
         else  \
 	  echo "TEST-FAIL: cbe $(RELDIR)/$*" >> $@;\
         fi
 
-
 # LLI tests
 $(PROGRAMS_TO_TEST:%=Output/%.nightly.lli.report.txt): \
-Output/%.nightly.lli.report.txt: Output/%.llvm.bc Output/%.out-cbe $(LLI)
-	-($(MAKE) EXTRA_LLI_OPTS='$(TIMEOPT)' TIME_RUN=1 Output/$*.diff-lli) 2>&1 | head -n 100 > $@
+Output/%.nightly.lli.report.txt: Output/%.llvm.bc Output/%.diff-lli $(LLI)
+	-head -n 100 Output/$*.diff-lli > $@
 	@if test -e Output/$*.diff-lli; then \
           echo "TEST-PASS: lli $(RELDIR)/$*" >> $@;\
 	  echo -n "TEST-RESULT-lli-time: " >> $@;\
-	  grep "^real" $@ >> $@;\
+	  grep "^real" Output/$*.out-jit.time >> $@;\
 	  echo >> $@;\
 	  echo -n "TEST-RESULT-lli-dyninst: " >> $@;\
-	  grep "Number of dynamic inst" $@.info >> $@;\
+	  grep "Number of dynamic inst" Output/$*.out-lli.info >> $@;\
 	  echo >> $@;\
 	else  \
 	  echo "TEST-FAIL: lli $(RELDIR)/$*" >> $@;\
 	fi
-	- at rm -f $@.info
 
 # JIT tests
 $(PROGRAMS_TO_TEST:%=Output/%.nightly.jit.report.txt): \
-Output/%.nightly.jit.report.txt: Output/%.llvm.bc Output/%.out-cbe $(LLI)
-	-($(MAKE) EXTRA_LLI_OPTS='$(TIMEOPT)' TIME_RUN=1 Output/$*.diff-jit) 2>&1 | head -n 100 > $@
+Output/%.nightly.jit.report.txt: Output/%.llvm.bc Output/%.diff-jit $(LLI)
+	-head -n 100 Output/$*.diff-jit > $@
 	@if test -f Output/$*.diff-jit; then \
           echo "TEST-PASS: jit $(RELDIR)/$*" >> $@;\
 	  echo -n "TEST-RESULT-jit-time: " >> $@;\
-	  grep "^real" $@ >> $@;\
+	  grep "^real" Output/$*.out-jit.time >> $@;\
 	  echo >> $@;\
 	  echo -n "TEST-RESULT-jit-comptime: " >> $@;\
-	  grep "Total Execution Time" $@.info >> $@;\
+	  grep "Total Execution Time" Output/$*.out-jit.info >> $@;\
 	  echo >> $@;\
 	  echo -n "TEST-RESULT-jit-machcode: " >> $@;\
-	  grep "bytes of machine code compiled" $@.info >> $@;\
+	  grep "bytes of machine code compiled" Output/$*.out-jit.info >> $@;\
 	  echo >> $@;\
 	else  \
 	  echo "TEST-FAIL: jit $(RELDIR)/$*" >> $@;\
 	fi
-	- at rm -f $@.info
 
 # Overall tests: just run subordinate tests
 $(PROGRAMS_TO_TEST:%=Output/%.$(TEST).report.txt): \





More information about the llvm-commits mailing list