hotspot/test/Makefile
changeset 42647 d01f2abf2c65
parent 42429 2435ff181f94
parent 42640 09dba077f1e7
child 42659 b264f522c689
--- a/hotspot/test/Makefile	Thu Dec 08 15:49:29 2016 +0100
+++ b/hotspot/test/Makefile	Thu Dec 08 17:03:45 2016 +0100
@@ -95,6 +95,29 @@
 ALT_MAKE ?= closed
 -include $(ALT_MAKE)/Makefile
 
+# Make sure jtreg exists
+$(JTREG): $(JT_HOME)
+
+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_NATIVE_PATH)                                           \
+              $(JTREG_FAILURE_HANDLER_OPTIONS)                               \
+              $(JTREG_EXCLUSIONS)                                            \
+              $(JTREG_TEST_OPTIONS)                                          \
+              $(TEST_SELECTION)                                              \
+	  ) ;                                                                \
+	  $(BUNDLE_UP_AND_EXIT)                                              \
+	) 2>&1 | $(TEE) $(ABS_TEST_OUTPUT_DIR)/output.txt ; $(TESTEXIT)
+
+PHONY_LIST += jtreg_tests
+
 # flags used to execute java in test targets
 TEST_FLAGS += -version -Xinternalversion -X -help
 
@@ -118,13 +141,8 @@
 # Set up the directory in which the jvm directories live (client/, server/, etc.)
 ifeq ($(PLATFORM),windows)
 JVMS_DIR := $(PRODUCT_HOME)/bin
-else ifeq ($(PLATFORM),bsd)
+else
 JVMS_DIR := $(PRODUCT_HOME)/lib
-else
-# The jvms live in the architecture directory (amd64, sparcv9,
-# etc.). By using a wildcard there's no need to figure out the exact
-# name of that directory.
-JVMS_DIR := $(PRODUCT_HOME)/lib/*
 endif
 
 # Use the existance of a directory as a sign that jvm variant is available