jdk/test/Makefile

Print this page
rev 8663 : 8020779: Improve detection and handling of jtreg executable path
8026988: Makefile is confused if JT_HOME is a different location than jtreg executable
Reviewed-by: duke

*** 52,61 **** --- 52,62 ---- SED = sed SORT = sort TEE = tee UNAME = uname UNIQ = uniq + WHICH = which WC = wc ZIP = zip # Get OS name from uname (Cygwin inexplicably adds _NT-5.1) UNAME_S := $(shell $(UNAME) -s | $(CUT) -f1 -d_)
*** 83,93 **** endif 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) ifndef PRODUCT_HOME # Try to use j2sdk-image if it exists ABS_JDK_IMAGE = $(ABS_PLATFORM_BUILD_ROOT)/images/j2sdk-image PRODUCT_HOME := \ $(shell \ --- 84,94 ---- endif ABS_PLATFORM_BUILD_ROOT = $(ABS_OUTPUTDIR) ABS_TEST_OUTPUT_DIR := $(ABS_PLATFORM_BUILD_ROOT)/testoutput/$(UNIQUE_DIR) ! # 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 PRODUCT_HOME := \ $(shell \
*** 186,196 **** ################################################################ # Default make rule (runs default jdk tests) all: jdk_default ! @$(ECHO) "Testing completed successfully" # Prep for output # Change execute permissions on shared library files. # Files in repositories should never have execute permissions, but # there are some tests that have pre-built shared libraries, and these --- 187,197 ---- ################################################################ # Default make rule (runs default jdk tests) all: jdk_default ! @$(ECHO) "Testing completed" # Prep for output # Change execute permissions on shared library files. # Files in repositories should never have execute permissions, but # there are some tests that have pre-built shared libraries, and these
*** 217,231 **** ################################################################ # 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) endif endif # Problematic tests to be excluded PROBLEM_LISTS=$(call MixedDirs,$(wildcard ProblemList.txt closed/ProblemList.txt)) --- 218,235 ---- ################################################################ # jtreg tests ! # 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 # Problematic tests to be excluded PROBLEM_LISTS=$(call MixedDirs,$(wildcard ProblemList.txt closed/ProblemList.txt))
*** 260,271 **** ifdef CONCURRENCY 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 JTREG_BASIC_OPTIONS += -a # Always turn on assertions --- 264,273 ----
*** 294,311 **** # Set the max memory for jtreg target test vms JTREG_TESTVM_MEMORY_OPTION = -vmoption:-Xmx512m JTREG_TEST_OPTIONS += $(JTREG_TESTVM_MEMORY_OPTION) # Make sure jtreg exists ! $(JTREG): $(JT_HOME) # Run jtreg jtreg_tests: prep $(PRODUCT_HOME) $(JTREG) ( \ ! ( JT_HOME=$(shell $(GETMIXEDPATH) "$(JT_HOME)"); \ ! export JT_HOME; \ ! $(shell $(GETMIXEDPATH) "$(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) \ --- 296,311 ---- # Set the max memory for jtreg target test vms JTREG_TESTVM_MEMORY_OPTION = -vmoption:-Xmx512m JTREG_TEST_OPTIONS += $(JTREG_TESTVM_MEMORY_OPTION) # Make sure jtreg exists ! $(JTREG): # Run jtreg jtreg_tests: prep $(PRODUCT_HOME) $(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) \
*** 313,325 **** $(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) ################################################################ --- 313,323 ---- $(TEST_SELECTION) \ ) ; \ $(BUNDLE_UP_AND_EXIT) \ ) 2>&1 | $(TEE) $(ABS_TEST_OUTPUT_DIR)/output.txt ; $(TESTEXIT) ################################################################ # Phony targets (e.g. these are not filenames) ! .PHONY: all clean prep jtreg_tests ################################################################