[test-suite] r246035 - Add CC_Hash to simple report, containing a hash of the binary.
Kristof Beyls via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 26 08:07:16 PDT 2015
Author: kbeyls
Date: Wed Aug 26 10:07:16 2015
New Revision: 246035
URL: http://llvm.org/viewvc/llvm-project?rev=246035&view=rev
Log:
Add CC_Hash to simple report, containing a hash of the binary.
Now also with special casing to work around difference of strip command line syntax between linux and Darwin platforms.
Modified:
test-suite/trunk/Makefile.programs
test-suite/trunk/TEST.simple.Makefile
test-suite/trunk/TEST.simple.report
Modified: test-suite/trunk/Makefile.programs
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/Makefile.programs?rev=246035&r1=246034&r2=246035&view=diff
==============================================================================
--- test-suite/trunk/Makefile.programs (original)
+++ test-suite/trunk/Makefile.programs Wed Aug 26 10:07:16 2015
@@ -545,6 +545,18 @@ ifdef PROGRAM_OUTPUT_FILTER
$(PROGRAM_OUTPUT_FILTER) $@
endif
+ifeq ($(TARGET_OS),Darwin)
+ STRIP_BINARY_FOR_HASH_CMD=echo
+else
+ STRIP_BINARY_FOR_HASH_CMD=strip --remove-section=.comment --remove-section='.note*'
+endif
+
+$(PROGRAMS_TO_TEST:%=Output/%.simple-hash): \
+Output/%.simple-hash: Output/%.simple
+ cp $< $@; \
+ $(STRIP_BINARY_FOR_HASH_CMD) $@; \
+ $(PROGDIR)/HashProgramOutput.sh $@
+
$(PROGRAMS_TO_TEST:%=Output/%.out-lli): \
Output/%.out-lli: Output/%.llvm.bc $(LLI)
$(RUNSAFELY) $(STDIN_FILENAME) $@ $(LLI) -info-output-file=$(CURDIR)/$@.info $(STATS) $(LLI_OPTS) $< $(RUN_OPTIONS)
Modified: test-suite/trunk/TEST.simple.Makefile
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/TEST.simple.Makefile?rev=246035&r1=246034&r2=246035&view=diff
==============================================================================
--- test-suite/trunk/TEST.simple.Makefile (original)
+++ test-suite/trunk/TEST.simple.Makefile Wed Aug 26 10:07:16 2015
@@ -19,11 +19,12 @@ REPORTS_SUFFIX := $(addsuffix .report.tx
# -grep "^program" Output/$*.simple.compile.time >> $@
$(PROGRAMS_TO_TEST:%=Output/%.simple.compile.report.txt): \
-Output/%.simple.compile.report.txt: Output/%.out-simple
+Output/%.simple.compile.report.txt: Output/%.out-simple Output/%.simple-hash
@echo > $@
@-if test -f Output/$*.simple; then \
echo "TEST-PASS: compile $(RELDIR)/$*" >> $@; \
echo "TEST-RESULT-compile-success: pass" >> $@;\
+ echo "TEST-RESULT-compile-hash: `cat Output/$*.simple-hash`" >> $@;\
else \
echo "TEST-FAIL: compile $(RELDIR)/$*" >> $@; \
fi
Modified: test-suite/trunk/TEST.simple.report
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/TEST.simple.report?rev=246035&r1=246034&r2=246035&view=diff
==============================================================================
--- test-suite/trunk/TEST.simple.report (original)
+++ test-suite/trunk/TEST.simple.report Wed Aug 26 10:07:16 2015
@@ -26,6 +26,7 @@ sub FormatTime {
["CC" , 'TEST-RESULT-compile-success: (pass|fail|xfail)'],
["CC_Time" , 'TEST-RESULT-compile-time: user\s*([.0-9m:]+)', \&FormatTime],
["CC_Real_Time", 'TEST-RESULT-compile-real-time: real\s*([.0-9m:]+)', \&FormatTime],
+ ["CC_Hash", 'TEST-RESULT-compile-hash: (.*)'],
["Exec" , 'TEST-RESULT-exec-success: (pass|fail|xfail)'],
["Exec_Time", 'TEST-RESULT-exec-time: user\s*([.0-9m:]+)', \&FormatTime],
["Exec_Real_Time", 'TEST-RESULT-exec-real-time: real\s*([.0-9m:]+)', \&FormatTime],
More information about the llvm-commits
mailing list