< prev index next >

jdk/test/Makefile

Print this page


   1 #
   2 # Copyright (c) 1995, 2014, Oracle and/or its affiliates. All rights reserved.
   3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4 #
   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
   7 # published by the Free Software Foundation.  Oracle designates this
   8 # particular file as subject to the "Classpath" exception as provided
   9 # by Oracle in the LICENSE file that accompanied this code.
  10 #
  11 # This code is distributed in the hope that it will be useful, but WITHOUT
  12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14 # version 2 for more details (a copy is included in the LICENSE file that
  15 # accompanied this code).
  16 #
  17 # You should have received a copy of the GNU General Public License version
  18 # 2 along with this work; if not, write to the Free Software Foundation,
  19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20 #
  21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22 # or visit www.oracle.com if you need additional information or have any


  95          $(ECHO) "$(ABS_JDK_IMAGE)";                    \
  96        else                                             \
  97          $(ECHO) "$(ABS_PLATFORM_BUILD_ROOT)";          \
  98        fi)
  99   PRODUCT_HOME := $(PRODUCT_HOME)
 100 endif
 101 
 102 # Expect JPRT to set JPRT_PRODUCT_ARGS (e.g. -server etc.)
 103 #   Should be passed into 'java' only.
 104 #   Could include: -d64 -server -client OR any java option
 105 ifdef JPRT_PRODUCT_ARGS
 106   JAVA_ARGS = $(JPRT_PRODUCT_ARGS)
 107 endif
 108 
 109 # Expect JPRT to set JPRT_PRODUCT_VM_ARGS (e.g. -Xcomp etc.)
 110 #   Should be passed into anything running the vm (java, javac, javadoc, ...).
 111 ifdef JPRT_PRODUCT_VM_ARGS
 112   JAVA_VM_ARGS = $(JPRT_PRODUCT_VM_ARGS)
 113 endif
 114 













 115 # Expect JPRT to set JPRT_ARCHIVE_BUNDLE (path to zip bundle for results)
 116 ifdef JPRT_ARCHIVE_BUNDLE
 117   ARCHIVE_BUNDLE = $(JPRT_ARCHIVE_BUNDLE)
 118 else
 119   ARCHIVE_BUNDLE = $(ABS_TEST_OUTPUT_DIR)/ARCHIVE_BUNDLE.zip
 120 endif
 121 
 122 # How to create the test bundle (pass or fail, we want to create this)
 123 #   Follow command with ";$(BUNDLE_UP_AND_EXIT)", so it always gets executed.
 124 ZIP_UP_RESULTS = ( $(MKDIR) -p `$(DIRNAME) $(ARCHIVE_BUNDLE)`     \
 125                    && $(CD) $(ABS_TEST_OUTPUT_DIR)             \
 126                    && $(CHMOD) -R a+r . \
 127                    && $(ZIP) -q -r $(ARCHIVE_BUNDLE) . )
 128 
 129 # important results files
 130 SUMMARY_TXT = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)/JTreport/text/summary.txt")
 131 STATS_TXT_NAME = Stats.txt
 132 STATS_TXT = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)/$(STATS_TXT_NAME)")
 133 RUNLIST   = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)/runlist.txt")
 134 PASSLIST  = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)/passlist.txt")


 296 # Set the GC options for test vms
 297 #JTREG_GC_OPTION = -vmoption:-XX:+UseSerialGC
 298 #JTREG_TEST_OPTIONS += $(JTREG_GC_OPTION)
 299 # Set the max memory for jtreg target test vms
 300 JTREG_TESTVM_MEMORY_OPTION = -vmoption:-Xmx512m
 301 JTREG_TEST_OPTIONS += $(JTREG_TESTVM_MEMORY_OPTION)
 302 
 303 # Make sure jtreg exists
 304 $(JTREG): $(JT_HOME)
 305 
 306 # Run jtreg
 307 jtreg_tests: prep $(PRODUCT_HOME) $(JTREG)
 308         (                                                                    \
 309           ( JT_HOME=$(shell $(GETMIXEDPATH) "$(JT_HOME)");                   \
 310             export JT_HOME;                                                  \
 311             $(shell $(GETMIXEDPATH) "$(JTREG)")                              \
 312               $(JTREG_BASIC_OPTIONS)                                         \
 313               -r:$(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)/JTreport")  \
 314               -w:$(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)/JTwork")    \
 315               -jdk:$(shell $(GETMIXEDPATH) "$(PRODUCT_HOME)")                \

 316               $(JTREG_EXCLUSIONS)                                            \
 317               $(JTREG_TEST_OPTIONS)                                          \
 318               $(TEST_SELECTION)                                                    \
 319           ) ;                                                                \
 320           $(BUNDLE_UP_AND_EXIT)                                              \
 321         ) 2>&1 | $(TEE) $(ABS_TEST_OUTPUT_DIR)/output.txt ; $(TESTEXIT)
 322 
 323 PHONY_LIST += jtreg_tests
 324 
 325 ################################################################
 326 
 327 # Phony targets (e.g. these are not filenames)
 328 .PHONY: all clean prep $(PHONY_LIST)
 329 
 330 ################################################################
   1 #
   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.
   4 #
   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
   7 # published by the Free Software Foundation.  Oracle designates this
   8 # particular file as subject to the "Classpath" exception as provided
   9 # by Oracle in the LICENSE file that accompanied this code.
  10 #
  11 # This code is distributed in the hope that it will be useful, but WITHOUT
  12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14 # version 2 for more details (a copy is included in the LICENSE file that
  15 # accompanied this code).
  16 #
  17 # You should have received a copy of the GNU General Public License version
  18 # 2 along with this work; if not, write to the Free Software Foundation,
  19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20 #
  21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22 # or visit www.oracle.com if you need additional information or have any


  95          $(ECHO) "$(ABS_JDK_IMAGE)";                    \
  96        else                                             \
  97          $(ECHO) "$(ABS_PLATFORM_BUILD_ROOT)";          \
  98        fi)
  99   PRODUCT_HOME := $(PRODUCT_HOME)
 100 endif
 101 
 102 # Expect JPRT to set JPRT_PRODUCT_ARGS (e.g. -server etc.)
 103 #   Should be passed into 'java' only.
 104 #   Could include: -d64 -server -client OR any java option
 105 ifdef JPRT_PRODUCT_ARGS
 106   JAVA_ARGS = $(JPRT_PRODUCT_ARGS)
 107 endif
 108 
 109 # Expect JPRT to set JPRT_PRODUCT_VM_ARGS (e.g. -Xcomp etc.)
 110 #   Should be passed into anything running the vm (java, javac, javadoc, ...).
 111 ifdef JPRT_PRODUCT_VM_ARGS
 112   JAVA_VM_ARGS = $(JPRT_PRODUCT_VM_ARGS)
 113 endif
 114 
 115 # jtreg -nativepath <dir>
 116 #
 117 # Local make tests will be TEST_IMAGE_DIR and JPRT with jprt.use.reg.test.bundle=true
 118 # should be JPRT_TESTNATIVE_PATH
 119 ifdef TEST_IMAGE_DIR
 120   TESTNATIVE_DIR = $(TEST_IMAGE_DIR)
 121 else ifdef JPRT_TESTNATIVE_PATH
 122   TESTNATIVE_DIR = $(JPRT_TESTNATIVE_PATH)
 123 endif
 124 ifdef TESTNATIVE_DIR
 125   JTREG_NATIVE_PATH = -nativepath:$(shell $(GETMIXEDPATH) "$(TESTNATIVE_DIR)/jdk/jtreg/native")
 126 endif
 127 
 128 # Expect JPRT to set JPRT_ARCHIVE_BUNDLE (path to zip bundle for results)
 129 ifdef JPRT_ARCHIVE_BUNDLE
 130   ARCHIVE_BUNDLE = $(JPRT_ARCHIVE_BUNDLE)
 131 else
 132   ARCHIVE_BUNDLE = $(ABS_TEST_OUTPUT_DIR)/ARCHIVE_BUNDLE.zip
 133 endif
 134 
 135 # How to create the test bundle (pass or fail, we want to create this)
 136 #   Follow command with ";$(BUNDLE_UP_AND_EXIT)", so it always gets executed.
 137 ZIP_UP_RESULTS = ( $(MKDIR) -p `$(DIRNAME) $(ARCHIVE_BUNDLE)`     \
 138                    && $(CD) $(ABS_TEST_OUTPUT_DIR)             \
 139                    && $(CHMOD) -R a+r . \
 140                    && $(ZIP) -q -r $(ARCHIVE_BUNDLE) . )
 141 
 142 # important results files
 143 SUMMARY_TXT = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)/JTreport/text/summary.txt")
 144 STATS_TXT_NAME = Stats.txt
 145 STATS_TXT = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)/$(STATS_TXT_NAME)")
 146 RUNLIST   = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)/runlist.txt")
 147 PASSLIST  = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)/passlist.txt")


 309 # Set the GC options for test vms
 310 #JTREG_GC_OPTION = -vmoption:-XX:+UseSerialGC
 311 #JTREG_TEST_OPTIONS += $(JTREG_GC_OPTION)
 312 # Set the max memory for jtreg target test vms
 313 JTREG_TESTVM_MEMORY_OPTION = -vmoption:-Xmx512m
 314 JTREG_TEST_OPTIONS += $(JTREG_TESTVM_MEMORY_OPTION)
 315 
 316 # Make sure jtreg exists
 317 $(JTREG): $(JT_HOME)
 318 
 319 # Run jtreg
 320 jtreg_tests: prep $(PRODUCT_HOME) $(JTREG)
 321         (                                                                    \
 322           ( JT_HOME=$(shell $(GETMIXEDPATH) "$(JT_HOME)");                   \
 323             export JT_HOME;                                                  \
 324             $(shell $(GETMIXEDPATH) "$(JTREG)")                              \
 325               $(JTREG_BASIC_OPTIONS)                                         \
 326               -r:$(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)/JTreport")  \
 327               -w:$(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)/JTwork")    \
 328               -jdk:$(shell $(GETMIXEDPATH) "$(PRODUCT_HOME)")                \
 329               $(JTREG_NATIVE_PATH)                                           \
 330               $(JTREG_EXCLUSIONS)                                            \
 331               $(JTREG_TEST_OPTIONS)                                          \
 332               $(TEST_SELECTION)                                                    \
 333           ) ;                                                                \
 334           $(BUNDLE_UP_AND_EXIT)                                              \
 335         ) 2>&1 | $(TEE) $(ABS_TEST_OUTPUT_DIR)/output.txt ; $(TESTEXIT)
 336 
 337 PHONY_LIST += jtreg_tests
 338 
 339 ################################################################
 340 
 341 # Phony targets (e.g. these are not filenames)
 342 .PHONY: all clean prep $(PHONY_LIST)
 343 
 344 ################################################################
< prev index next >