[llvm-commits] [test-suite] r109118 - in /test-suite/trunk: TEST.optllcdbg.Makefile TEST.optllcdbg.report

Jim Grosbach grosbach at apple.com
Thu Jul 22 09:54:56 PDT 2010


Author: grosbach
Date: Thu Jul 22 11:54:56 2010
New Revision: 109118

URL: http://llvm.org/viewvc/llvm-project?rev=109118&view=rev
Log:
Add report for optllcdbg test. rdar://8212016

Added:
    test-suite/trunk/TEST.optllcdbg.report
Modified:
    test-suite/trunk/TEST.optllcdbg.Makefile

Modified: test-suite/trunk/TEST.optllcdbg.Makefile
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/TEST.optllcdbg.Makefile?rev=109118&r1=109117&r2=109118&view=diff
==============================================================================
--- test-suite/trunk/TEST.optllcdbg.Makefile (original)
+++ test-suite/trunk/TEST.optllcdbg.Makefile Thu Jul 22 11:54:56 2010
@@ -1,7 +1,7 @@
 ##===- TEST.optllcdbg.Makefile -----------------------------*- Makefile -*-===##
 #
 # This test checks whether presence of debug declarations influences
-# the code generator or not. 
+# the code generator or not.
 #
 # If input.bc includes llvm.dbg intrinsics and llvm.dbg variables then
 # the code in first.s and second.s should match. Otherwise debugging information
@@ -14,6 +14,10 @@
 #
 ##===----------------------------------------------------------------------===##
 
+CURDIR  := $(shell cd .; pwd)
+PROGDIR := $(PROJ_SRC_ROOT)
+RELDIR  := $(subst $(PROGDIR),,$(CURDIR))
+
 TESTNAME = $*
 TEST_TARGET_FLAGS = -g -O0
 LLC_DEBUG_FLAGS = -O3 $(LLCFLAGS)
@@ -21,7 +25,21 @@
 .PRECIOUS: Output/%.first.s Output/%.second.s Output/%.t2c.s Output/%.t1c.s Output/%.t2b.bc Output/%.t1b.bc Output/%.t1a.bc Output/%.t2a.bc
 
 $(PROGRAMS_TO_TEST:%=test.$(TEST).%): \
-test.$(TEST).%: Output/%.diff
+test.$(TEST).%: Output/%.$(TEST).report.txt
+	@-cat $<
+
+$(PROGRAMS_TO_TEST:%=Output/%.optllcdbg.report.txt): \
+Output/%.optllcdbg.report.txt: Output/%.report.diff
+	@echo > $@
+	@echo "---------------------------------------------------------------" >> $@
+	@echo ">>> ========= '$(RELDIR)/$*' Program" >> $@
+	@echo "---------------------------------------------------------------" >> $@
+	@echo >> $@
+	@-if test -s Output/$^ ; then \
+	  echo "TEST-FAIL" >> $@;\
+	else \
+	  echo "TEST-PASS" >> $@;\
+	fi
 
 Output/%.t1a.bc: Output/%.linked.rbc Output/.dir $(LOPT)
 	$(LOPT) -strip-debug-declare -strip-nondebug $< -f -o $@
@@ -103,3 +121,7 @@
 	else \
 	 echo "--------- TEST-FAIL: $*"; \
 	fi
+
+Output/%.report.diff: Output/%.first.s Output/%.second.s
+	@diff $^ > $@
+

Added: test-suite/trunk/TEST.optllcdbg.report
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/TEST.optllcdbg.report?rev=109118&view=auto
==============================================================================
--- test-suite/trunk/TEST.optllcdbg.report (added)
+++ test-suite/trunk/TEST.optllcdbg.report Thu Jul 22 11:54:56 2010
@@ -0,0 +1,20 @@
+##=== TEST.optllcdbg.report - Compare codegen w/ dbg info ------*- perl -*-===##
+#
+# This file defines a report to be generated for the optllcdbg test.
+#
+##===----------------------------------------------------------------------===##
+
+# Sort by name
+$SortCol = 1;
+$TrimRepeatedPrefix = 1;
+
+# These are the columns for the report.  The first entry is the header for the
+# column, the second is the regex to use to match the value.  Empty list create
+# seperators, and closures may be put in for custom processing.
+(
+# Name
+ ["Name:" , '\'([^\']+)\' Program'],
+ [],
+ ["Result:", 'TEST-(.*)'],
+ []
+ );





More information about the llvm-commits mailing list