1 # |
1 # |
2 # Copyright (c) 1995, 2009, Oracle and/or its affiliates. All rights reserved. |
2 # Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved. |
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 # |
4 # |
5 # This code is free software; you can redistribute it and/or modify it |
5 # This code is free software; you can redistribute it and/or modify it |
6 # under the terms of the GNU General Public License version 2 only, as |
6 # under the terms of the GNU General Public License version 2 only, as |
7 # published by the Free Software Foundation. Oracle designates this |
7 # published by the Free Software Foundation. Oracle designates this |
177 # which will install in the debug or fastdebug subdirectory of the |
173 # which will install in the debug or fastdebug subdirectory of the |
178 # normal product install area. |
174 # normal product install area. |
179 # The install process needs to know what the DEBUG_NAME is, so |
175 # The install process needs to know what the DEBUG_NAME is, so |
180 # look for INSTALL_DEBUG_NAME in the install rules. |
176 # look for INSTALL_DEBUG_NAME in the install rules. |
181 # |
177 # |
|
178 # NOTE: On windows, do not use $(ABS_BOOTDIR_OUTPUTDIR)-$(DEBUG_NAME). |
|
179 # Due to the use of short paths in $(ABS_OUTPUTDIR), this may |
|
180 # not be the same location. |
|
181 # |
182 |
182 |
183 # Location of fresh bootdir output |
183 # Location of fresh bootdir output |
184 ABS_BOOTDIR_OUTPUTDIR=$(ABS_OUTPUTDIR)/bootjdk |
184 ABS_BOOTDIR_OUTPUTDIR=$(ABS_OUTPUTDIR)/bootjdk |
185 FRESH_BOOTDIR=$(ABS_BOOTDIR_OUTPUTDIR)/j2sdk-image |
185 FRESH_BOOTDIR=$(ABS_BOOTDIR_OUTPUTDIR)/j2sdk-image |
186 FRESH_DEBUG_BOOTDIR=$(ABS_BOOTDIR_OUTPUTDIR)-$(DEBUG_NAME)/j2sdk-image |
186 FRESH_DEBUG_BOOTDIR=$(ABS_BOOTDIR_OUTPUTDIR)/../$(PLATFORM)-$(ARCH)-$(DEBUG_NAME)/j2sdk-image |
187 |
187 |
188 create_fresh_product_bootdir: FRC |
188 create_fresh_product_bootdir: FRC |
189 @$(START_ECHO) |
189 @$(START_ECHO) |
190 $(MAKE) ALT_OUTPUTDIR=$(ABS_BOOTDIR_OUTPUTDIR) \ |
190 $(MAKE) ALT_OUTPUTDIR=$(ABS_BOOTDIR_OUTPUTDIR) \ |
191 GENERATE_DOCS=false \ |
191 GENERATE_DOCS=false \ |
246 SKIP_DEBUG_BUILD=true \ |
246 SKIP_DEBUG_BUILD=true \ |
247 $(BOOT_CYCLE_SETTINGS) \ |
247 $(BOOT_CYCLE_SETTINGS) \ |
248 generic_build_repo_series |
248 generic_build_repo_series |
249 @$(FINISH_ECHO) |
249 @$(FINISH_ECHO) |
250 |
250 |
|
251 # NOTE: On windows, do not use $(ABS_OUTPUTDIR)-$(DEBUG_NAME). |
|
252 # Due to the use of short paths in $(ABS_OUTPUTDIR), this may |
|
253 # not be the same location. |
|
254 |
251 generic_debug_build: |
255 generic_debug_build: |
252 @$(START_ECHO) |
256 @$(START_ECHO) |
253 $(MAKE) \ |
257 $(MAKE) \ |
254 ALT_OUTPUTDIR=$(ABS_OUTPUTDIR)-$(DEBUG_NAME) \ |
258 ALT_OUTPUTDIR=$(ABS_OUTPUTDIR)/../$(PLATFORM)-$(ARCH)-$(DEBUG_NAME) \ |
255 DEBUG_NAME=$(DEBUG_NAME) \ |
259 DEBUG_NAME=$(DEBUG_NAME) \ |
256 GENERATE_DOCS=false \ |
260 GENERATE_DOCS=false \ |
257 $(BOOT_CYCLE_DEBUG_SETTINGS) \ |
261 $(BOOT_CYCLE_DEBUG_SETTINGS) \ |
258 generic_build_repo_series |
262 generic_build_repo_series |
259 @$(FINISH_ECHO) |
263 @$(FINISH_ECHO) |
549 ifeq ($(BUNDLE_RULES_AVAILABLE), true) |
553 ifeq ($(BUNDLE_RULES_AVAILABLE), true) |
550 include $(BUNDLE_RULES) |
554 include $(BUNDLE_RULES) |
551 endif |
555 endif |
552 |
556 |
553 ################################################################ |
557 ################################################################ |
|
558 # rule to test |
|
559 ################################################################ |
|
560 |
|
561 .NOTPARALLEL: test |
|
562 |
|
563 test: test_clean test_start test_summary |
|
564 |
|
565 test_start: |
|
566 @$(ECHO) "Tests started at `$(DATE)`" |
|
567 |
|
568 test_clean: |
|
569 $(RM) $(OUTPUTDIR)/test_failures.txt $(OUTPUTDIR)/test_log.txt |
|
570 |
|
571 test_summary: $(OUTPUTDIR)/test_failures.txt |
|
572 @$(ECHO) "#################################################" |
|
573 @$(ECHO) "Tests completed at `$(DATE)`" |
|
574 @( $(EGREP) '^TEST STATS:' $(OUTPUTDIR)/test_log.txt \ |
|
575 || $(ECHO) "No TEST STATS seen in log" ) |
|
576 @$(ECHO) "For complete details see: $(OUTPUTDIR)/test_log.txt" |
|
577 @$(ECHO) "#################################################" |
|
578 @if [ -s $< ] ; then \ |
|
579 $(ECHO) "ERROR: Test failure count: `$(CAT) $< | $(WC) -l`"; \ |
|
580 $(CAT) $<; \ |
|
581 exit 1; \ |
|
582 else \ |
|
583 $(ECHO) "Success! No failures detected"; \ |
|
584 fi |
|
585 |
|
586 # Get failure list from log |
|
587 $(OUTPUTDIR)/test_failures.txt: $(OUTPUTDIR)/test_log.txt |
|
588 @$(RM) $@ |
|
589 @( $(EGREP) '^FAILED:' $< || $(ECHO) "" ) > $@ |
|
590 |
|
591 # Get log file of all tests run |
|
592 JDK_TO_TEST := $(shell \ |
|
593 if [ -d "$(ABS_OUTPUTDIR)/j2sdk-image" ] ; then \ |
|
594 $(ECHO) "$(ABS_OUTPUTDIR)/j2sdk-image"; \ |
|
595 elif [ -d "$(ABS_OUTPUTDIR)/bin" ] ; then \ |
|
596 $(ECHO) "$(ABS_OUTPUTDIR)"; \ |
|
597 elif [ "$(PRODUCT_HOME)" != "" -a -d "$(PRODUCT_HOME)/bin" ] ; then \ |
|
598 $(ECHO) "$(PRODUCT_HOME)"; \ |
|
599 fi \ |
|
600 ) |
|
601 $(OUTPUTDIR)/test_log.txt: |
|
602 $(RM) $@ |
|
603 ( $(CD) test && \ |
|
604 $(MAKE) NO_STOPPING=- PRODUCT_HOME=$(JDK_TO_TEST) \ |
|
605 ) | tee $@ |
|
606 |
|
607 ################################################################ |
554 # JPRT rule to build |
608 # JPRT rule to build |
555 ################################################################ |
609 ################################################################ |
556 |
610 |
557 include ./make/jprt.gmk |
611 include ./make/jprt.gmk |
558 |
612 |
559 ################################################################ |
613 ################################################################ |
560 # PHONY |
614 # PHONY |
561 ################################################################ |
615 ################################################################ |
562 |
616 |
563 .PHONY: all \ |
617 .PHONY: all test test_start test_summary test_clean \ |
564 generic_build_repo_series \ |
618 generic_build_repo_series \ |
565 what clobber insane \ |
619 what clobber insane \ |
566 dev dev-build dev-sanity dev-clobber \ |
620 dev dev-build dev-sanity dev-clobber \ |
567 product_build \ |
621 product_build \ |
568 fastdebug_build \ |
622 fastdebug_build \ |