--- old/jdk/test/Makefile 2013-11-06 12:28:57.896322974 -0800 +++ new/jdk/test/Makefile 2013-11-06 12:28:57.600322960 -0800 @@ -54,6 +54,7 @@ TEE = tee UNAME = uname UNIQ = uniq +WHICH = which WC = wc ZIP = zip @@ -85,7 +86,7 @@ ABS_PLATFORM_BUILD_ROOT = $(ABS_OUTPUTDIR) ABS_TEST_OUTPUT_DIR := $(ABS_PLATFORM_BUILD_ROOT)/testoutput/$(UNIQUE_DIR) -# Expect JPRT to set PRODUCT_HOME (the product or jdk in this case to test) +# locate the JDK to be tested. ifndef PRODUCT_HOME # Try to use j2sdk-image if it exists ABS_JDK_IMAGE = $(ABS_PLATFORM_BUILD_ROOT)/images/j2sdk-image @@ -188,7 +189,7 @@ # Default make rule (runs default jdk tests) all: jdk_default - @$(ECHO) "Testing completed successfully" + @$(ECHO) "Testing completed" # Prep for output # Change execute permissions on shared library files. @@ -219,11 +220,14 @@ # jtreg tests -# Expect JT_HOME to be set for jtreg tests. (home for jtreg) -ifndef JT_HOME - JT_HOME = $(SLASH_JAVA)/re/jtreg/4.1/promoted/latest/binaries/jtreg - ifdef JPRT_JTREG_HOME - JT_HOME = $(JPRT_JTREG_HOME) +# Expect JTREG or JT_HOME to be set for jtreg tests. +ifndef JTREG + ifdef JT_HOME + # windows executable works for everybody + JTREG = $(JT_HOME)/win32/bin/jtreg + else + # maybe it's on the path? + JTREG=$(shell $(WHICH) jtreg 2> /dev/null | $(GREP) -v '^no jtreg in') endif endif @@ -262,8 +266,6 @@ EXTRA_JTREG_OPTIONS += -concurrency:$(CONCURRENCY) endif -# Default JTREG to run (win32 script works for everybody) -JTREG = $(JT_HOME)/win32/bin/jtreg # run in agentvm mode JTREG_BASIC_OPTIONS += -agentvm # Only run automatic tests @@ -296,30 +298,26 @@ JTREG_TEST_OPTIONS += $(JTREG_TESTVM_MEMORY_OPTION) # Make sure jtreg exists -$(JTREG): $(JT_HOME) +$(JTREG): # Run jtreg jtreg_tests: prep $(PRODUCT_HOME) $(JTREG) ( \ - ( JT_HOME=$(shell $(GETMIXEDPATH) "$(JT_HOME)"); \ - export JT_HOME; \ - $(shell $(GETMIXEDPATH) "$(JTREG)") \ + ( "$(JTREG)" \ $(JTREG_BASIC_OPTIONS) \ -r:$(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)/JTreport") \ -w:$(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)/JTwork") \ -jdk:$(shell $(GETMIXEDPATH) "$(PRODUCT_HOME)") \ $(JTREG_EXCLUSIONS) \ $(JTREG_TEST_OPTIONS) \ - $(TEST_SELECTION) \ + $(TEST_SELECTION) \ ) ; \ $(BUNDLE_UP_AND_EXIT) \ ) 2>&1 | $(TEE) $(ABS_TEST_OUTPUT_DIR)/output.txt ; $(TESTEXIT) -PHONY_LIST += jtreg_tests - ################################################################ # Phony targets (e.g. these are not filenames) -.PHONY: all clean prep $(PHONY_LIST) +.PHONY: all clean prep jtreg_tests ################################################################