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

Chris Lattner lattner at cs.uiuc.edu
Fri May 9 15:45:01 PDT 2003


Changes in directory llvm/test/Programs:

Makefile.programs updated: 1.39 -> 1.40
TEST.nightly.Makefile updated: 1.3 -> 1.4
TEST.nightly.report updated: 1.2 -> 1.3

---
Log message:

Changes to make the nightly tester more reliable, and to report the amount of 
time the CBE version of the program takes.

Now the testing output does not include the entire output of the programs,
which may be very large.  Additionally, we only run each program once in
each configuration instead of twice.


---
Diffs of the changes:

Index: llvm/test/Programs/Makefile.programs
diff -u llvm/test/Programs/Makefile.programs:1.39 llvm/test/Programs/Makefile.programs:1.40
--- llvm/test/Programs/Makefile.programs:1.39	Thu May  8 23:12:12 2003
+++ llvm/test/Programs/Makefile.programs	Fri May  9 15:43:49 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 = $(ULIMIT); $(PROGDIR)/RunSafely.sh
+RUNSAFELY := $(PROGDIR)/RunSafely.sh
 
 #
 # Targets to build for the default target...
@@ -203,25 +203,32 @@
 ifndef USE_PRECOMPILED_BYTECODE
 $(PROGRAMS_TO_TEST:%=Output/%.out-nat): \
 Output/%.out-nat: Output/%.native
-	-$(RUNSAFELY) $< > $@ $(RUN_OPTIONS)
+	-$(ULIMIT); $(RUNSAFELY) $< > $@ $(RUN_OPTIONS)
 endif
 
-LLI_OPTS := -q -abort-on-exception -force-interpreter=true
-JIT_OPTS := -force-interpreter=false
+# 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
 
 $(PROGRAMS_TO_TEST:%=Output/%.out-lli): \
 Output/%.out-lli: Output/%.llvm.bc $(LLI)
-	-$(RUNSAFELY) $(LLI) $(LLI_OPTS) $< > $@ $(RUN_OPTIONS)
-
+	-$(ULIMIT); $(TIME) $(RUNSAFELY) $(LLI) $(LLI_OPTS) $< > $@ $(RUN_OPTIONS)
 $(PROGRAMS_TO_TEST:%=Output/%.out-jit): \
 Output/%.out-jit: Output/%.llvm.bc $(LLI)
-	-$(RUNSAFELY) $(LLI) $(JIT_OPTS) $< > $@ $(RUN_OPTIONS)
+	-$(ULIMIT); $(TIME) $(RUNSAFELY) $(LLI) $(JIT_OPTS) $< > $@ $(RUN_OPTIONS)
 $(PROGRAMS_TO_TEST:%=Output/%.out-llc): \
 Output/%.out-llc: Output/%.llc
-	-$(RUNSAFELY) $< > $@ $(RUN_OPTIONS)
+	-$(ULIMIT); $(TIME) $(RUNSAFELY) $< > $@ $(RUN_OPTIONS)
 $(PROGRAMS_TO_TEST:%=Output/%.out-cbe): \
 Output/%.out-cbe: Output/%.cbe
-	-$(RUNSAFELY) $< > $@ $(RUN_OPTIONS)
+	-$(ULIMIT); $(TIME) $(RUNSAFELY) $< > $@ $(RUN_OPTIONS)
 
 #
 # Rules to diff test output...


Index: llvm/test/Programs/TEST.nightly.Makefile
diff -u llvm/test/Programs/TEST.nightly.Makefile:1.3 llvm/test/Programs/TEST.nightly.Makefile:1.4
--- llvm/test/Programs/TEST.nightly.Makefile:1.3	Wed Jan 22 13:47:03 2003
+++ llvm/test/Programs/TEST.nightly.Makefile	Fri May  9 15:43:49 2003
@@ -12,7 +12,7 @@
 REPORTS_TO_GEN := compile llc cbe lli jit
 REPORTS_SUFFIX := $(addsuffix .report.txt, $(REPORTS_TO_GEN))
 
-TIMEOPT  := -time-passes -stats
+TIMEOPT = -time-passes -stats -info-output-file=$@.info
 
 # Compilation tests
 $(PROGRAMS_TO_TEST:%=Output/%.nightly.compile.report.txt): \
@@ -53,44 +53,53 @@
 # CBE tests
 $(PROGRAMS_TO_TEST:%=Output/%.nightly.cbe.report.txt): \
 Output/%.nightly.cbe.report.txt: Output/%.llvm.bc $(LDIS)
-	-($(MAKE) Output/$*.cbe) > $@ 2>&1
-	@if test -f Output/$*.cbe; then echo "TEST-RESULT-cbe: YES" >> $@; fi\
+	-($(MAKE) TIME_RUN=1 Output/$*.diff-cbe) > $@ 2>&1
+	@if test -f Output/$*.diff-cbe; then \
+          echo "TEST-RESULT-cbe: YES" >> $@;\
+	  echo -n "TEST-RESULT-cbe-time: " >> $@;\
+	  grep "^real" $@ >> $@;\
+	  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/%.diff-lli $(LLI)
+Output/%.nightly.lli.report.txt: Output/%.llvm.bc $(LLI)
+	-($(MAKE) EXTRA_LLI_OPTS='$(TIMEOPT)' TIME_RUN=1 Output/$*.diff-lli) > $@ 2>&1
 	@if test -e Output/$*.diff-lli; then \
-	  ($(ULIMIT); time -p $(LLI) -stats $(LLI_OPTS) $< $(RUN_OPTIONS)) >$@ 2>&1;\
           echo "TEST-PASS: lli $(RELDIR)/$*" >> $@;\
 	  echo -n "TEST-RESULT-lli-time: " >> $@;\
 	  grep "^real" $@ >> $@;\
 	  echo >> $@;\
 	  echo -n "TEST-RESULT-lli-dyninst: " >> $@;\
-	  grep "Number of dynamic inst" $@ >> $@;\
+	  grep "Number of dynamic inst" $@.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/%.diff-jit $(LLI)
-	@echo > $@  # Make sure something ends up in the file...
-	@if test -e Output/$*.diff-jit; then \
-	  ($(ULIMIT); time -p $(LLI) $(JIT_OPTS) $(TIMEOPT) $< $(RUN_OPTIONS)) > $@ 2>&1;\
+Output/%.nightly.jit.report.txt: Output/%.llvm.bc $(LLI)
+	-($(MAKE) EXTRA_LLI_OPTS='$(TIMEOPT)' TIME_RUN=1 Output/$*.diff-jit) > $@ 2>&1
+	@if test -f Output/$*.diff-jit; then \
           echo "TEST-PASS: jit $(RELDIR)/$*" >> $@;\
 	  echo -n "TEST-RESULT-jit-time: " >> $@;\
 	  grep "^real" $@ >> $@;\
 	  echo >> $@;\
 	  echo -n "TEST-RESULT-jit-comptime: " >> $@;\
-	  grep "Total Execution Time" $@ >> $@;\
+	  grep "Total Execution Time" $@.info >> $@;\
 	  echo >> $@;\
 	  echo -n "TEST-RESULT-jit-machcode: " >> $@;\
-	  grep "bytes of machine code compiled" $@ >> $@;\
+	  grep "bytes of machine code compiled" $@.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): \


Index: llvm/test/Programs/TEST.nightly.report
diff -u llvm/test/Programs/TEST.nightly.report:1.2 llvm/test/Programs/TEST.nightly.report:1.3
--- llvm/test/Programs/TEST.nightly.report:1.2	Tue Jan 21 17:07:57 2003
+++ llvm/test/Programs/TEST.nightly.report	Fri May  9 15:43:49 2003
@@ -22,7 +22,7 @@
  ["Instrs"   , 'TEST-RESULT-compile: *([0-9]+).*Number of inst'],
  [],
  ["LLC"      , "TEST-RESULT-llc: $WallTimeRE"],
- ["CBE"      , 'TEST-RESULT-cbe: (YES|NO)'],
+ ["CBE"      , 'TEST-RESULT-cbe-time: real\s*([.0-9m]+)'],
  [],
  ["LLI"      , 'TEST-RESULT-lli-time: real\s*([.0-9m]+)'],
  ["DynInstrs", 'TEST-RESULT-lli-dyninst: *([0-9]+).*Number of dynamic inst'],





More information about the llvm-commits mailing list