6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
authorohair
Fri, 24 Sep 2010 14:03:33 -0700
changeset 6623 b2e02fea81b0
parent 6410 42a9ca2788e9
child 6624 fa178c8f3c83
6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target Reviewed-by: mchung
Makefile
--- a/Makefile	Tue Sep 07 15:51:45 2010 -0700
+++ b/Makefile	Fri Sep 24 14:03:33 2010 -0700
@@ -558,9 +558,12 @@
 # rule to test
 ################################################################
 
-.NOTPARALLEL: test
+.NOTPARALLEL: test_run
 
-test: test_clean test_start test_summary
+test:
+	$(MAKE) test_run
+
+test_run: test_clean test_start test_summary
 
 test_start:
 	@$(ECHO) "Tests started at `$(DATE)`"
@@ -586,7 +589,7 @@
 # Get failure list from log
 $(OUTPUTDIR)/test_failures.txt: $(OUTPUTDIR)/test_log.txt
 	@$(RM) $@
-	@( $(EGREP) '^FAILED:' $< || $(ECHO) "" ) > $@
+	@( $(EGREP) '^FAILED:' $< || $(ECHO) "" ) | $(NAWK) 'length>0' > $@
 
 # Get log file of all tests run
 JDK_TO_TEST := $(shell 							\
@@ -598,10 +601,11 @@
     $(ECHO) "$(PRODUCT_HOME)"; 						\
   fi 									\
 )
+TEST_TARGETS=all
 $(OUTPUTDIR)/test_log.txt:
 	$(RM) $@
-	( $(CD) test &&                                     \
-          $(MAKE) NO_STOPPING=- PRODUCT_HOME=$(JDK_TO_TEST) \
+	( $(CD) test &&                                                     \
+          $(MAKE) NO_STOPPING=- PRODUCT_HOME=$(JDK_TO_TEST) $(TEST_TARGETS) \
         ) | tee $@
 
 ################################################################
@@ -614,7 +618,7 @@
 #  PHONY
 ################################################################
 
-.PHONY: all  test test_start test_summary test_clean \
+.PHONY: all  test test_run test_start test_summary test_clean \
 	generic_build_repo_series \
 	what clobber insane \
         dev dev-build dev-sanity dev-clobber \