hotspot/test/Makefile
changeset 29179 8836e3bd543b
parent 29075 ad5e1490d635
child 30267 e35e0c092042
child 30249 faf83ebbf040
equal deleted inserted replaced
29153:874d76e4699d 29179:8836e3bd543b
     1 #
     1 #
     2 # Copyright (c) 1995, 2014, Oracle and/or its affiliates. All rights reserved.
     2 # Copyright (c) 1995, 2015, 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.
     7 # published by the Free Software Foundation.
   141          $(ECHO) "$(ABS_BUILD_ROOT)" ;  \
   141          $(ECHO) "$(ABS_BUILD_ROOT)" ;  \
   142        fi)
   142        fi)
   143 endif
   143 endif
   144 
   144 
   145 # Expect JPRT to set JAVA_ARGS (e.g. -server etc.)
   145 # Expect JPRT to set JAVA_ARGS (e.g. -server etc.)
   146 JAVA_OPTIONS = 
   146 JAVA_OPTIONS =
   147 ifdef JAVA_ARGS
   147 ifdef JAVA_ARGS
   148   JAVA_OPTIONS = $(JAVA_ARGS)
   148   JAVA_OPTIONS = $(JAVA_ARGS)
       
   149 endif
       
   150 
       
   151 # jtreg -nativepath <dir>
       
   152 #
       
   153 # Local make tests will be TEST_IMAGE_DIR and JPRT with jprt.use.reg.test.bundle=true
       
   154 # should be JPRT_TESTNATIVE_PATH
       
   155 ifdef TEST_IMAGE_DIR
       
   156   TESTNATIVE_DIR = $(TEST_IMAGE_DIR)
       
   157 else ifdef JPRT_TESTNATIVE_PATH
       
   158   TESTNATIVE_DIR = $(JPRT_TESTNATIVE_PATH)
       
   159 endif
       
   160 ifdef TESTNATIVE_DIR
       
   161   JTREG_NATIVE_PATH = -nativepath:$(shell $(GETMIXEDPATH) "$(TESTNATIVE_DIR)/hotspot/jtreg/native")
   149 endif
   162 endif
   150 
   163 
   151 # Expect JPRT to set JPRT_ARCHIVE_BUNDLE (path to zip bundle for results)
   164 # Expect JPRT to set JPRT_ARCHIVE_BUNDLE (path to zip bundle for results)
   152 ARCHIVE_BUNDLE = $(ABS_TEST_OUTPUT_DIR)/ARCHIVE_BUNDLE.zip
   165 ARCHIVE_BUNDLE = $(ABS_TEST_OUTPUT_DIR)/ARCHIVE_BUNDLE.zip
   153 ifdef JPRT_ARCHIVE_BUNDLE
   166 ifdef JPRT_ARCHIVE_BUNDLE
   301             $(shell $(GETMIXEDPATH) "$(JTREG)")                              \
   314             $(shell $(GETMIXEDPATH) "$(JTREG)")                              \
   302               $(JTREG_BASIC_OPTIONS)                                         \
   315               $(JTREG_BASIC_OPTIONS)                                         \
   303               -r:$(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)/JTreport")  \
   316               -r:$(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)/JTreport")  \
   304               -w:$(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)/JTwork")    \
   317               -w:$(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)/JTwork")    \
   305               -jdk:$(shell $(GETMIXEDPATH) "$(PRODUCT_HOME)")                \
   318               -jdk:$(shell $(GETMIXEDPATH) "$(PRODUCT_HOME)")                \
       
   319               $(JTREG_NATIVE_PATH)                                           \
   306               $(JTREG_EXCLUSIONS)                                            \
   320               $(JTREG_EXCLUSIONS)                                            \
   307               $(JTREG_TEST_OPTIONS)                                          \
   321               $(JTREG_TEST_OPTIONS)                                          \
   308               $(TEST_SELECTION)                                              \
   322               $(TEST_SELECTION)                                              \
   309 	  ) ;                                                                \
   323 	  ) ;                                                                \
   310 	  $(BUNDLE_UP_AND_EXIT)                                              \
   324 	  $(BUNDLE_UP_AND_EXIT)                                              \
   311 	) 2>&1 | $(TEE) $(ABS_TEST_OUTPUT_DIR)/output.txt ; $(TESTEXIT)
   325 	) 2>&1 | $(TEE) $(ABS_TEST_OUTPUT_DIR)/output.txt ; $(TESTEXIT)
   312 
   326 
   313 PHONY_LIST += jtreg_tests
   327 PHONY_LIST += jtreg_tests
   314 
   328 
   315 # flags used to execute java in test targets
   329 # flags used to execute java in test targets
   316 TEST_FLAGS += -version -Xinternalversion -X -help 
   330 TEST_FLAGS += -version -Xinternalversion -X -help
   317 
   331 
   318 sanitytest: prep $(PRODUCT_HOME)
   332 sanitytest: prep $(PRODUCT_HOME)
   319 	@for flag in $(TEST_FLAGS);                                             \
   333 	@for flag in $(TEST_FLAGS);                                             \
   320 	do                                                                      \
   334 	do                                                                      \
   321 	    echo Executing java $(JAVA_OPTIONS) $$flag;                         \
   335 	    echo Executing java $(JAVA_OPTIONS) $$flag;                         \