United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6960335 Add top level 'make test' rule that uses test/Makefile, runs all test batches
JDK-6960335 : Add top level 'make test' rule that uses test/Makefile, runs all test batches

Details
Type:
Bug
Submit Date:
2010-06-10
Status:
Resolved
Updated Date:
2014-03-03
Project Name:
JDK
Resolved Date:
2010-06-11
Component:
infrastructure
OS:
generic
Sub-Component:
build
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
7
Fixed Versions:
OpenJDK6 (b20)

Related Reports
Backport:
Backport:

Sub Tasks

Description
The test/Makefile doesn't really know where the build is, and will not continue test batches if a batch fails (by design).
A top level Makefile test rule can supply the test/Makefile the build being tested, and also allow for all the test targets to keep going or not stop on any one failure, then summarize all the results.

                                    

Comments
EVALUATION

Trying this:

 ################################################################
+# rule to test
+################################################################
+
+test: test_clean test_summary
+
+test_clean:
+	$(RM)  $(OUTPUTDIR)/test_failures.txt $(OUTPUTDIR)/test_log.txt
+
+test_summary: $(OUTPUTDIR)/test_failures.txt
+	@$(ECHO) "#################################################"
+	@$(ECHO) "Testing has completed"
+	@( $(EGREP) '^TEST STATS:' $< )
+	@$(ECHO) "For complete details see: $<"
+	@$(ECHO) "#################################################"
+	@if [ -s $@ ] ; then                                           \
+	  $(ECHO) "ERROR: Test failure count: `$(CAT) $@ | $(WC) -l`"; \
+	  $(CAT) $@;                                                   \
+	  exit 1;                                                      \
+	else							       \
+	  $(ECHO) "Success! No failures detected";		       \
+	fi
+
+# Get failure list from log
+$(OUTPUTDIR)/test_failures.txt: $(OUTPUTDIR)/test_log.txt
+	@$(RM) $@
+	@( $(EGREP) '^FAILED:' $< ) > $@
+
+# Get log file of all tests run
+$(OUTPUTDIR)/test_log.txt:
+	$(RM) $@
+	( $(CD) test &&                                                   \
+	  $(MAKE) NO_STOPPING=- PRODUCT_HOME=$(ABS_OUTPUTDIR)/j2sdk-image \
+	) | tee $@
+
                                     
2010-06-10
EVALUATION

http://hg.openjdk.java.net/jdk6/jdk6/rev/d6d46e2d0fc8
                                     
2010-06-11
EVALUATION

Also:  http://hg.openjdk.java.net/jdk6/jdk6/rev/e79c0d2e6512
                                     
2010-06-11
EVALUATION

http://hg.openjdk.java.net/jdk6/jdk6/jdk/rev/7488f648939d
                                     
2010-06-11



Hardware and Software, Engineered to Work Together