1 #
   2 # Copyright (c) 1995, 2011, 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
  23 # questions.
  24 #
  25 
  26 #
  27 # Makefile to run various jdk tests
  28 #
  29 
  30 # Empty these to get rid of some default rules
  31 .SUFFIXES:
  32 .SUFFIXES: .java
  33 CO=
  34 GET=
  35 
  36 # Utilities used
  37 AWK       = awk
  38 CAT       = cat
  39 CD        = cd
  40 CHMOD     = chmod
  41 CP        = cp
  42 CUT       = cut
  43 DIRNAME   = dirname
  44 ECHO      = echo
  45 EGREP     = egrep
  46 EXPAND    = expand
  47 FIND      = find
  48 MKDIR     = mkdir
  49 PWD       = pwd
  50 SED       = sed
  51 SORT      = sort
  52 TEE       = tee
  53 UNAME     = uname
  54 UNIQ      = uniq
  55 WC        = wc
  56 ZIP       = zip
  57 
  58 # Get OS name from uname
  59 UNAME_S := $(shell $(UNAME) -s)
  60 
  61 # Commands to run on paths to make mixed paths for java on windows
  62 GETMIXEDPATH=$(ECHO)
  63 
  64 # Location of developer shared files
  65 SLASH_JAVA = /java
  66 
  67 # Platform specific settings
  68 ifeq ($(UNAME_S), SunOS)
  69   OS_NAME     = solaris
  70   OS_ARCH    := $(shell $(UNAME) -p)
  71   OS_VERSION := $(shell $(UNAME) -r)
  72 endif
  73 ifeq ($(UNAME_S), Linux)
  74   OS_NAME     = linux
  75   OS_ARCH    := $(shell $(UNAME) -m)
  76   # Check for unknown arch, try uname -p if uname -m says unknown
  77   ifeq ($(OS_ARCH),unknown)
  78     OS_ARCH    := $(shell $(UNAME) -p)
  79   endif
  80   OS_VERSION := $(shell $(UNAME) -r)
  81 endif
  82 ifeq ($(OS_NAME),)
  83   OS_NAME = windows
  84   # GNU Make or MKS overrides $(PROCESSOR_ARCHITECTURE) to always
  85   # return "x86". Use the first word of $(PROCESSOR_IDENTIFIER) instead.
  86   ifeq ($(PROCESSOR_IDENTIFIER),)
  87     PROC_ARCH:=$(shell $(UNAME) -m)
  88   else
  89     PROC_ARCH:=$(word 1, $(PROCESSOR_IDENTIFIER))
  90   endif
  91   OS_ARCH:=$(PROC_ARCH)
  92   SLASH_JAVA = J:
  93   EXESUFFIX = .exe
  94   # These need to be different depending on MKS or CYGWIN
  95   ifeq ($(findstring cygdrive,$(shell ($(CD) C:/ && $(PWD)))), )
  96     GETMIXEDPATH  = dosname -s
  97     OS_VERSION   := $(shell $(UNAME) -r)
  98   else
  99     GETMIXEDPATH  = cygpath -m -s
 100     OS_VERSION   := $(shell $(UNAME) -s | $(CUT) -d'-' -f2)
 101   endif
 102 endif
 103 
 104 # Only want major and minor numbers from os version
 105 OS_VERSION := $(shell $(ECHO) "$(OS_VERSION)" | $(CUT) -d'.' -f1,2)
 106 
 107 # Name to use for x86_64 arch (historically amd64, but should change someday)
 108 OS_ARCH_X64_NAME:=amd64
 109 #OS_ARCH_X64_NAME:=x64
 110 
 111 # Alternate arch names (in case this arch is known by a second name)
 112 #   PROBLEM_LISTS may use either name.
 113 OS_ARCH2-amd64:=x64
 114 #OS_ARCH2-x64:=amd64
 115 
 116 # Try and use the arch names consistently
 117 OS_ARCH:=$(patsubst x64,$(OS_ARCH_X64_NAME),$(OS_ARCH))
 118 OS_ARCH:=$(patsubst X64,$(OS_ARCH_X64_NAME),$(OS_ARCH))
 119 OS_ARCH:=$(patsubst AMD64,$(OS_ARCH_X64_NAME),$(OS_ARCH))
 120 OS_ARCH:=$(patsubst amd64,$(OS_ARCH_X64_NAME),$(OS_ARCH))
 121 OS_ARCH:=$(patsubst x86_64,$(OS_ARCH_X64_NAME),$(OS_ARCH))
 122 OS_ARCH:=$(patsubst 8664,$(OS_ARCH_X64_NAME),$(OS_ARCH))
 123 OS_ARCH:=$(patsubst EM64T,$(OS_ARCH_X64_NAME),$(OS_ARCH))
 124 OS_ARCH:=$(patsubst em64t,$(OS_ARCH_X64_NAME),$(OS_ARCH))
 125 OS_ARCH:=$(patsubst intel64,$(OS_ARCH_X64_NAME),$(OS_ARCH))
 126 OS_ARCH:=$(patsubst Intel64,$(OS_ARCH_X64_NAME),$(OS_ARCH))
 127 OS_ARCH:=$(patsubst INTEL64,$(OS_ARCH_X64_NAME),$(OS_ARCH))
 128 OS_ARCH:=$(patsubst IA64,ia64,$(OS_ARCH))
 129 OS_ARCH:=$(patsubst X86,i586,$(OS_ARCH))
 130 OS_ARCH:=$(patsubst x86,i586,$(OS_ARCH))
 131 OS_ARCH:=$(patsubst i386,i586,$(OS_ARCH))
 132 OS_ARCH:=$(patsubst i486,i586,$(OS_ARCH))
 133 OS_ARCH:=$(patsubst i686,i586,$(OS_ARCH))
 134 OS_ARCH:=$(patsubst 386,i586,$(OS_ARCH))
 135 OS_ARCH:=$(patsubst 486,i586,$(OS_ARCH))
 136 OS_ARCH:=$(patsubst 586,i586,$(OS_ARCH))
 137 OS_ARCH:=$(patsubst 686,i586,$(OS_ARCH))
 138 
 139 # Default  ARCH_DATA_MODEL settings
 140 ARCH_DATA_MODEL-i586 = 32
 141 ARCH_DATA_MODEL-$(OS_ARCH_X64_NAME) = 64
 142 ARCH_DATA_MODEL-ia64 = 64
 143 ARCH_DATA_MODEL-sparc = 32
 144 ARCH_DATA_MODEL-sparcv9 = 64
 145 
 146 # If ARCH_DATA_MODEL is not defined, try and pick a reasonable default
 147 ifndef ARCH_DATA_MODEL
 148   ARCH_DATA_MODEL:=$(ARCH_DATA_MODEL-$(OS_ARCH))
 149 endif
 150 ifndef ARCH_DATA_MODEL
 151   ARCH_DATA_MODEL=32
 152 endif
 153 
 154 # Platform directory name
 155 PLATFORM_OS = $(OS_NAME)-$(OS_ARCH)
 156 
 157 # Check ARCH_DATA_MODEL, adjust OS_ARCH accordingly on solaris
 158 ARCH_DATA_MODEL_ERROR= \
 159   ARCH_DATA_MODEL=$(ARCH_DATA_MODEL) cannot be used with $(PLATFORM_OS)
 160 ifeq ($(ARCH_DATA_MODEL),64)
 161   ifeq ($(PLATFORM_OS),solaris-i586)
 162     OS_ARCH=$(OS_ARCH_X64_NAME)
 163   endif
 164   ifeq ($(PLATFORM_OS),solaris-sparc)
 165     OS_ARCH=sparcv9
 166   endif
 167   ifeq ($(OS_ARCH),i586)
 168     x:=$(warning "WARNING: $(ARCH_DATA_MODEL_ERROR)")
 169   endif
 170   ifeq ($(OS_ARCH),sparc)
 171     x:=$(warning "WARNING: $(ARCH_DATA_MODEL_ERROR)")
 172   endif
 173 else
 174   ifeq ($(ARCH_DATA_MODEL),32)
 175     ifeq ($(OS_ARCH),$(OS_ARCH_X64_NAME))
 176       x:=$(warning "WARNING: $(ARCH_DATA_MODEL_ERROR)")
 177     endif
 178     ifeq ($(OS_ARCH),ia64)
 179       x:=$(warning "WARNING: $(ARCH_DATA_MODEL_ERROR)")
 180     endif
 181     ifeq ($(OS_ARCH),sparcv9)
 182       x:=$(warning "WARNING: $(ARCH_DATA_MODEL_ERROR)")
 183     endif
 184   else
 185     x:=$(warning "WARNING: $(ARCH_DATA_MODEL_ERROR)")
 186   endif
 187 endif
 188 
 189 # Alternate OS_ARCH name (defaults to OS_ARCH)
 190 OS_ARCH2:=$(OS_ARCH2-$(OS_ARCH))
 191 ifeq ($(OS_ARCH2),)
 192   OS_ARCH2:=$(OS_ARCH)
 193 endif
 194 
 195 # Root of this test area (important to use full paths in some places)
 196 TEST_ROOT := $(shell $(PWD))
 197 
 198 # Root of all test results
 199 ifdef ALT_OUTPUTDIR
 200   ABS_OUTPUTDIR = $(ALT_OUTPUTDIR)
 201 else
 202   ABS_OUTPUTDIR = $(TEST_ROOT)/../build/$(PLATFORM_OS)
 203 endif
 204 ABS_PLATFORM_BUILD_ROOT = $(ABS_OUTPUTDIR)
 205 ABS_TEST_OUTPUT_DIR := $(ABS_PLATFORM_BUILD_ROOT)/testoutput/$(UNIQUE_DIR)
 206 
 207 # Expect JPRT to set PRODUCT_HOME (the product or jdk in this case to test)
 208 ifndef PRODUCT_HOME
 209   # Try to use j2sdk-image or jdk-module-image if it exists
 210   ABS_JDK_LEGACY_IMAGE = $(ABS_PLATFORM_BUILD_ROOT)/j2sdk-image
 211   ABS_JDK_MODULE_IMAGE = $(ABS_PLATFORM_BUILD_ROOT)/jdk-module-image
 212   PRODUCT_HOME :=                                       \
 213     $(shell                                             \
 214        if [ -d $(ABS_JDK_MODULE_IMAGE) ] ; then         \
 215          $(ECHO) "$(ABS_JDK_MODULE_IMAGE)";             \
 216        elif [ -d $(ABS_JDK_LEGACY_IMAGE) ] ; then       \
 217          $(ECHO) "$(ABS_JDK_LEGACY_IMAGE)";             \
 218        else                                             \
 219          $(ECHO) "$(ABS_PLATFORM_BUILD_ROOT)";          \
 220        fi)
 221   PRODUCT_HOME := $(PRODUCT_HOME)
 222 endif
 223 
 224 MODULE_BUILD :=                                         \
 225     $(shell                                             \
 226       if [ -d $(PRODUCT_HOME)/lib/modules ] ; then      \
 227         $(ECHO) "true";                                 \
 228       else                                              \
 229         $(ECHO) "false";                                \
 230       fi)
 231 
 232 # Expect JPRT to set JPRT_PRODUCT_ARGS (e.g. -server etc.)
 233 #   Should be passed into 'java' only.
 234 #   Could include: -d64 -server -client OR any java option
 235 ifdef JPRT_PRODUCT_ARGS
 236   JAVA_ARGS = $(JPRT_PRODUCT_ARGS)
 237 endif
 238 
 239 # Expect JPRT to set JPRT_PRODUCT_VM_ARGS (e.g. -Xcomp etc.)
 240 #   Should be passed into anything running the vm (java, javac, javadoc, ...).
 241 ifdef JPRT_PRODUCT_VM_ARGS
 242   JAVA_VM_ARGS = $(JPRT_PRODUCT_VM_ARGS)
 243 endif
 244 
 245 # Check JAVA_ARGS arguments based on ARCH_DATA_MODEL etc.
 246 ifeq ($(OS_NAME),solaris)
 247   D64_ERROR_MESSAGE=Mismatch between ARCH_DATA_MODEL=$(ARCH_DATA_MODEL) and use of -d64 in JAVA_ARGS=$(JAVA_ARGS)
 248   ifeq ($(ARCH_DATA_MODEL),32)
 249     ifneq ($(findstring -d64,$(JAVA_ARGS)),)
 250       x:=$(warning "WARNING: $(D64_ERROR_MESSAGE)")
 251     endif
 252   endif
 253   ifeq ($(ARCH_DATA_MODEL),64)
 254     ifeq ($(findstring -d64,$(JAVA_ARGS)),)
 255       x:=$(warning "WARNING: $(D64_ERROR_MESSAGE)")
 256     endif
 257   endif
 258 endif
 259 
 260 # Macro to run make and set the shared library permissions
 261 define SharedLibraryPermissions
 262 $(MAKE) SHARED_LIBRARY_DIR=$1 UNIQUE_DIR=$@ shared_library_permissions
 263 endef
 264 
 265 # Expect JPRT to set JPRT_ARCHIVE_BUNDLE (path to zip bundle for results)
 266 ARCHIVE_BUNDLE = $(ABS_TEST_OUTPUT_DIR)/ARCHIVE_BUNDLE.zip
 267 ifdef JPRT_ARCHIVE_BUNDLE
 268   ARCHIVE_BUNDLE = $(JPRT_ARCHIVE_BUNDLE)
 269 endif
 270 
 271 # How to create the test bundle (pass or fail, we want to create this)
 272 #   Follow command with ";$(BUNDLE_UP_AND_EXIT)", so it always gets executed.
 273 ZIP_UP_RESULTS = ( $(MKDIR) -p `$(DIRNAME) $(ARCHIVE_BUNDLE)`     \
 274                    && $(CD) $(ABS_TEST_OUTPUT_DIR)             \
 275                    && $(CHMOD) -R a+r . \
 276                    && $(ZIP) -q -r $(ARCHIVE_BUNDLE) . )
 277 SUMMARY_TXT = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/JTreport/text/summary.txt
 278 STATS_TXT_NAME = Stats.txt
 279 STATS_TXT = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/$(STATS_TXT_NAME)
 280 RUNLIST   = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/runlist.txt
 281 PASSLIST  = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/passlist.txt
 282 FAILLIST  = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/faillist.txt
 283 EXITCODE  = $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/exitcode.txt
 284 
 285 TESTEXIT = \
 286   if [ ! -s $(EXITCODE) ] ; then \
 287     $(ECHO) "ERROR: EXITCODE file not filled in."; \
 288     $(ECHO) "1" > $(EXITCODE); \
 289   fi ; \
 290   testExitCode=`$(CAT) $(EXITCODE)`; \
 291   $(ECHO) "EXIT CODE: $${testExitCode}"; \
 292   exit $${testExitCode}
 293 
 294 BUNDLE_UP_AND_EXIT = \
 295 ( \
 296   jtregExitCode=$$? && \
 297   _summary="$(SUMMARY_TXT)"; \
 298   $(RM) -f $(STATS_TXT) $(RUNLIST) $(PASSLIST) $(FAILLIST) $(EXITCODE); \
 299   $(ECHO) "$${jtregExitCode}" > $(EXITCODE); \
 300   if [ -r "$${_summary}" ] ; then \
 301     $(ECHO) "Summary: $(UNIQUE_DIR)" > $(STATS_TXT); \
 302     $(EXPAND) $${_summary} | $(EGREP) -v ' Not run\.' > $(RUNLIST); \
 303     $(EGREP) ' Passed\.' $(RUNLIST) \
 304       | $(EGREP) -v ' Error\.' \
 305       | $(EGREP) -v ' Failed\.' > $(PASSLIST); \
 306     ( $(EGREP) ' Failed\.' $(RUNLIST); \
 307       $(EGREP) ' Error\.' $(RUNLIST); \
 308       $(EGREP) -v ' Passed\.' $(RUNLIST) ) \
 309       | $(SORT) | $(UNIQ) > $(FAILLIST); \
 310     if [ $${jtregExitCode} != 0 -o -s $(FAILLIST) ] ; then \
 311       $(EXPAND) $(FAILLIST) \
 312         | $(CUT) -d' ' -f1 \
 313         | $(SED) -e 's@^@FAILED: @' >> $(STATS_TXT); \
 314       if [ $${jtregExitCode} = 0 ] ; then \
 315         jtregExitCode=1; \
 316       fi; \
 317     fi; \
 318     runc="`$(CAT) $(RUNLIST)      | $(WC) -l | $(AWK) '{print $$1;}'`"; \
 319     passc="`$(CAT) $(PASSLIST)    | $(WC) -l | $(AWK) '{print $$1;}'`"; \
 320     failc="`$(CAT) $(FAILLIST)    | $(WC) -l | $(AWK) '{print $$1;}'`"; \
 321     exclc="`$(CAT) $(EXCLUDELIST) | $(WC) -l | $(AWK) '{print $$1;}'`"; \
 322     $(ECHO) "TEST STATS: name=$(UNIQUE_DIR)  run=$${runc}  pass=$${passc}  fail=$${failc}  excluded=$${exclc}" \
 323       >> $(STATS_TXT); \
 324   else \
 325     $(ECHO) "Missing file: $${_summary}" >> $(STATS_TXT); \
 326   fi; \
 327   if [ -f $(STATS_TXT) ] ; then \
 328     $(CAT) $(STATS_TXT); \
 329   fi; \
 330   $(ZIP_UP_RESULTS) ; \
 331   $(TESTEXIT) \
 332 )
 333 
 334 ################################################################
 335 
 336 # Default make rule (runs default jdk tests)
 337 all: jdk_default
 338         @$(ECHO) "Testing completed successfully"
 339 
 340 # Prep for output
 341 prep: clean
 342         @$(MKDIR) -p $(ABS_TEST_OUTPUT_DIR)
 343         @$(MKDIR) -p `$(DIRNAME) $(ARCHIVE_BUNDLE)`
 344 
 345 # Cleanup
 346 clean:
 347         $(RM) -r $(ABS_TEST_OUTPUT_DIR)
 348         $(RM) $(ARCHIVE_BUNDLE)
 349 
 350 ################################################################
 351 
 352 # jtreg tests
 353 
 354 # Expect JT_HOME to be set for jtreg tests. (home for jtreg)
 355 ifndef JT_HOME
 356   JT_HOME = $(SLASH_JAVA)/re/jtreg/4.1/promoted/latest/binaries/jtreg
 357   ifdef JPRT_JTREG_HOME
 358     JT_HOME = $(JPRT_JTREG_HOME)
 359   endif
 360 endif
 361 
 362 # Expect JPRT to set TESTDIRS to the jtreg test dirs
 363 ifndef TESTDIRS
 364   TESTDIRS = demo
 365 endif
 366 
 367 # Agentvm settings (default is false)
 368 ifndef USE_JTREG_AGENTVM
 369   USE_JTREG_AGENTVM=false
 370 endif
 371 # With agentvm, you cannot use -javaoptions?
 372 ifeq ($(USE_JTREG_AGENTVM),true)
 373   JTREG_AGENTVM_OPTION = -agentvm
 374   EXTRA_JTREG_OPTIONS += $(JTREG_AGENTVM_OPTION) $(JAVA_ARGS) $(JAVA_ARGS:%=-vmoption:%)
 375   JTREG_TEST_OPTIONS = $(JAVA_VM_ARGS:%=-vmoption:%)
 376 else
 377   JTREG_TEST_OPTIONS = $(JAVA_ARGS:%=-javaoptions:%) $(JAVA_VM_ARGS:%=-vmoption:%)
 378 endif
 379 
 380 ifdef CONCURRENCY
 381   EXTRA_JTREG_OPTIONS += -concurrency:$(CONCURRENCY)
 382 endif
 383 
 384 # exclude modules test when testing legacy image
 385 ifeq ($(MODULE_BUILD),false)
 386   JTREG_TEST_OPTIONS += -k:\!modules
 387 endif
 388 
 389 # Some tests annoy me and fail frequently
 390 PROBLEM_LIST=ProblemList.txt
 391 PROBLEM_LISTS=$(PROBLEM_LIST) $(wildcard closed/$(PROBLEM_LIST))
 392 EXCLUDELIST=$(ABS_TEST_OUTPUT_DIR)/excludelist.txt
 393 
 394 MODULE_IMAGE_PROBLEM_LIST=ModulesProblemList.txt
 395 ifeq ($(MODULE_BUILD),true)
 396 ifndef NO_EXCLUDES_MODULES
 397 PROBLEM_LISTS += $(MODULE_IMAGE_PROBLEM_LIST)
 398 endif
 399 endif
 400 
 401 # Create exclude list for this platform and arch
 402 ifdef NO_EXCLUDES
 403 $(EXCLUDELIST): $(PROBLEM_LISTS) $(TEST_DEPENDENCIES)
 404         @$(ECHO) "NOTHING_EXCLUDED" > $@
 405 else
 406 $(EXCLUDELIST): $(PROBLEM_LISTS) $(TEST_DEPENDENCIES)
 407         @$(RM) $@ $@.temp1 $@.temp2
 408         @(($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- '$(OS_NAME)-all'          ) ;\
 409           ($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- '$(PLATFORM_OS)'          ) ;\
 410           ($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- '$(OS_NAME)-$(OS_ARCH2)'  ) ;\
 411           ($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- '$(OS_NAME)-$(OS_VERSION)') ;\
 412           ($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- 'generic-$(OS_ARCH)'      ) ;\
 413           ($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- 'generic-$(OS_ARCH2)'     ) ;\
 414           ($(CAT) $(PROBLEM_LISTS) | $(EGREP) -- 'generic-all'             ) ;\
 415           ($(ECHO) "#") ;\
 416         ) | $(SED) -e 's@^[\ ]*@@' \
 417           | $(EGREP) -v '^#' > $@.temp1
 418         for tdir in $(TESTDIRS) SOLARIS_10_SH_BUG_NO_EMPTY_FORS ; do \
 419           ( ( $(CAT) $@.temp1 | $(EGREP) "^$${tdir}" ) ; $(ECHO) "#" ) >> $@.temp2 ; \
 420         done
 421         @$(ECHO) "# at least one line" >> $@.temp2
 422         @( $(EGREP) -v '^#' $@.temp2 ; true ) > $@
 423         @$(ECHO) "Excluding list contains `$(EXPAND) $@ | $(WC) -l` items"
 424 endif
 425 
 426 # Select list of directories that exist
 427 define TestDirs
 428 $(foreach i,$1,$(wildcard ${i})) $(foreach i,$1,$(wildcard closed/${i}))
 429 endef
 430 # Running batches of tests with or without agentvm
 431 define RunAgentvmBatch
 432 $(ECHO) "Running tests in agentvm mode: $?"
 433 $(MAKE) TEST_DEPENDENCIES="$?" TESTDIRS="$?" USE_JTREG_AGENTVM=true  UNIQUE_DIR=$@ jtreg_tests
 434 endef
 435 define RunOthervmBatch
 436 $(ECHO) "Running tests in othervm mode: $?"
 437 $(MAKE) TEST_DEPENDENCIES="$?" TESTDIRS="$?" USE_JTREG_AGENTVM=false UNIQUE_DIR=$@ jtreg_tests
 438 endef
 439 define SummaryInfo
 440 $(ECHO) "########################################################"
 441 $(CAT) $(?:%=$(ABS_TEST_OUTPUT_DIR)/%/$(STATS_TXT_NAME))
 442 $(ECHO) "########################################################"
 443 endef
 444 
 445 # ------------------------------------------------------------------
 446 
 447 # Batches of tests (somewhat arbitrary assigments to jdk_* targets)
 448 JDK_DEFAULT_TARGETS =
 449 JDK_ALL_TARGETS =
 450 
 451 # Stable othervm testruns (minus items from PROBLEM_LIST)
 452 #   Using agentvm has problems, and doesn't help performance as much as others.
 453 JDK_ALL_TARGETS += jdk_awt
 454 jdk_awt: $(call TestDirs, com/sun/awt java/awt sun/awt \
 455          javax/imageio javax/print sun/pisces)
 456         $(call RunOthervmBatch)
 457 
 458 # Stable agentvm testruns (minus items from PROBLEM_LIST)
 459 JDK_ALL_TARGETS += jdk_beans1
 460 JDK_DEFAULT_TARGETS += jdk_beans1
 461 jdk_beans1: $(call TestDirs, \
 462             java/beans/beancontext java/beans/PropertyChangeSupport \
 463             java/beans/Introspector java/beans/Performance \
 464             java/beans/VetoableChangeSupport java/beans/Statement)
 465         $(call RunAgentvmBatch)
 466 
 467 # Stable othervm testruns (minus items from PROBLEM_LIST)
 468 #   Using agentvm has serious problems with these tests
 469 JDK_ALL_TARGETS += jdk_beans2
 470 jdk_beans2: $(call TestDirs, \
 471             java/beans/Beans java/beans/EventHandler java/beans/XMLDecoder \
 472             java/beans/PropertyEditor)
 473         $(call RunOthervmBatch)
 474 
 475 # Stable othervm testruns (minus items from PROBLEM_LIST)
 476 #   Using agentvm has serious problems with these tests
 477 JDK_ALL_TARGETS += jdk_beans3
 478 jdk_beans3: $(call TestDirs, java/beans/XMLEncoder)
 479         $(call RunOthervmBatch)
 480 
 481 # All beans tests
 482 jdk_beans: jdk_beans1 jdk_beans2 jdk_beans3
 483         @$(SummaryInfo)
 484 
 485 # Stable agentvm testruns (minus items from PROBLEM_LIST)
 486 JDK_ALL_TARGETS += jdk_io
 487 JDK_DEFAULT_TARGETS += jdk_io
 488 jdk_io: $(call TestDirs, java/io)
 489         $(call RunAgentvmBatch)
 490 
 491 # Stable agentvm testruns (minus items from PROBLEM_LIST)
 492 JDK_ALL_TARGETS += jdk_lang
 493 JDK_DEFAULT_TARGETS += jdk_lang
 494 jdk_lang: $(call TestDirs, java/lang)
 495         $(call RunAgentvmBatch)
 496 
 497 # Stable othervm testruns (minus items from PROBLEM_LIST)
 498 #   Using agentvm has serious problems with these tests
 499 JDK_ALL_TARGETS += jdk_management1
 500 jdk_management1: $(call TestDirs, javax/management)
 501         $(call RunOthervmBatch)
 502 
 503 # Stable othervm testruns (minus items from PROBLEM_LIST)
 504 #   Using agentvm has serious problems with these tests
 505 JDK_ALL_TARGETS += jdk_management2
 506 jdk_management2: $(call TestDirs, com/sun/jmx com/sun/management sun/management)
 507         $(call RunOthervmBatch)
 508 
 509 # All management tests
 510 jdk_management: jdk_management1 jdk_management2
 511         @$(SummaryInfo)
 512 
 513 # Stable agentvm testruns (minus items from PROBLEM_LIST)
 514 JDK_ALL_TARGETS += jdk_math
 515 JDK_DEFAULT_TARGETS += jdk_math
 516 jdk_math: $(call TestDirs, java/math)
 517         $(call RunAgentvmBatch)
 518 
 519 # Stable agentvm testruns (minus items from PROBLEM_LIST)
 520 JDK_ALL_TARGETS += jdk_misc
 521 JDK_DEFAULT_TARGETS += jdk_misc
 522 jdk_misc: $(call TestDirs, \
 523           demo/jvmti demo/zipfs javax/naming javax/script \
 524           javax/smartcardio com/sun/jndi com/sun/xml sun/misc)
 525         $(call RunAgentvmBatch)
 526 
 527 # Stable agentvm testruns (minus items from PROBLEM_LIST)
 528 JDK_ALL_TARGETS += jdk_net
 529 JDK_DEFAULT_TARGETS += jdk_net
 530 jdk_net: $(call TestDirs, com/sun/net java/net sun/net)
 531         $(call RunAgentvmBatch)
 532 
 533 # Stable agentvm testruns (minus items from PROBLEM_LIST)
 534 JDK_ALL_TARGETS += jdk_nio1
 535 JDK_DEFAULT_TARGETS += jdk_nio1
 536 jdk_nio1: $(call TestDirs, java/nio/file)
 537         $(call RunAgentvmBatch)
 538 
 539 # Stable agentvm testruns (minus items from PROBLEM_LIST)
 540 JDK_ALL_TARGETS += jdk_nio2
 541 JDK_DEFAULT_TARGETS += jdk_nio2
 542 jdk_nio2: $(call TestDirs, java/nio/Buffer java/nio/ByteOrder \
 543           java/nio/channels java/nio/MappedByteBuffer)
 544         $(call SharedLibraryPermissions,java/nio/channels)
 545         $(call RunAgentvmBatch)
 546 
 547 # Stable agentvm testruns (minus items from PROBLEM_LIST)
 548 JDK_ALL_TARGETS += jdk_nio3
 549 JDK_DEFAULT_TARGETS += jdk_nio3
 550 jdk_nio3: $(call TestDirs, sun/nio)
 551         $(call RunAgentvmBatch)
 552 
 553 # All nio tests
 554 jdk_nio: jdk_nio1 jdk_nio2 jdk_nio3
 555         @$(SummaryInfo)
 556 
 557 # Stable agentvm testruns (minus items from PROBLEM_LIST)
 558 jdk_sctp: $(call TestDirs, com/sun/nio/sctp)
 559         $(call RunAgentvmBatch)
 560 
 561 # Stable othervm testruns (minus items from PROBLEM_LIST)
 562 #   Using agentvm has serious problems with these tests
 563 JDK_ALL_TARGETS += jdk_rmi
 564 jdk_rmi: $(call TestDirs, java/rmi javax/rmi sun/rmi)
 565         $(call RunOthervmBatch)
 566 
 567 # Stable agentvm testruns (minus items from PROBLEM_LIST)
 568 JDK_ALL_TARGETS += jdk_security1
 569 JDK_DEFAULT_TARGETS += jdk_security1
 570 jdk_security1: $(call TestDirs, java/security)
 571         $(call RunAgentvmBatch)
 572 
 573 # Stable agentvm testruns (minus items from PROBLEM_LIST)
 574 JDK_ALL_TARGETS += jdk_security2
 575 jdk_security2: $(call TestDirs, javax/crypto javax/xml/crypto com/sun/crypto)
 576         $(call RunAgentvmBatch)
 577 
 578 # Stable agentvm testruns (minus items from PROBLEM_LIST)
 579 JDK_ALL_TARGETS += jdk_security3
 580 jdk_security3: $(call TestDirs, com/sun/security lib/security javax/security \
 581         sun/security com/sun/org/apache/xml/internal/security \
 582         com/oracle/secrity/ucrypto)
 583         $(call SharedLibraryPermissions,sun/security)
 584         $(call RunAgentvmBatch)
 585 
 586 # All security tests
 587 jdk_security: jdk_security1 jdk_security2 jdk_security3
 588         @$(SummaryInfo)
 589 
 590 # Stable agentvm testruns (minus items from PROBLEM_LIST)
 591 JDK_ALL_TARGETS += jdk_sound
 592 jdk_sound: $(call TestDirs, javax/sound)
 593         $(call RunAgentvmBatch)
 594 
 595 # Stable othervm testruns (minus items from PROBLEM_LIST)
 596 #   Using agentvm has problems, and doesn't help performance as much as others.
 597 JDK_ALL_TARGETS += jdk_swing
 598 jdk_swing: $(call TestDirs, javax/swing sun/java2d \
 599            demo/jfc com/sun/java/swing)
 600         $(call RunOthervmBatch)
 601 
 602 # Stable agentvm testruns (minus items from PROBLEM_LIST)
 603 JDK_ALL_TARGETS += jdk_text
 604 JDK_DEFAULT_TARGETS += jdk_text
 605 jdk_text: $(call TestDirs, java/text sun/text)
 606         $(call RunAgentvmBatch)
 607 
 608 # Stable agentvm testruns (minus items from PROBLEM_LIST)
 609 JDK_ALL_TARGETS += jdk_tools1
 610 jdk_tools1: $(call TestDirs, com/sun/jdi)
 611         $(call RunAgentvmBatch)
 612 
 613 # Stable othervm testruns (minus items from PROBLEM_LIST)
 614 #   Using agentvm has serious problems with these tests
 615 JDK_ALL_TARGETS += jdk_tools2
 616 jdk_tools2: $(call TestDirs, \
 617             com/sun/tools sun/jvmstat sun/tools tools vm \
 618             com/sun/servicetag com/sun/tracing)
 619         $(call SharedLibraryPermissions,tools/launcher)
 620         $(call RunAgentvmBatch)
 621 
 622 # All tools tests
 623 jdk_tools: jdk_tools1 jdk_tools2
 624         @$(SummaryInfo)
 625 
 626 # Stable agentvm testruns (minus items from PROBLEM_LIST)
 627 JDK_ALL_TARGETS += jdk_util
 628 JDK_DEFAULT_TARGETS += jdk_util
 629 jdk_util: $(call TestDirs, java/util sun/util)
 630         $(call RunAgentvmBatch)
 631 
 632 # jdk_jigsaw is included in jprt.properties but we only want to
 633 # run them when testing the jdk-module-image. 
 634 # java/lang/module and java/lang/reflect/Module tests are tagged
 635 # with the "modules" keyword so that they are excluded when testing
 636 # legacy image.
 637 ifeq ($(MODULE_BUILD),true)
 638   JIGSAW_TESTS = org/openjdk/jigsaw
 639 endif
 640 
 641 JDK_ALL_TARGETS += jdk_jigsaw
 642 JDK_DEFAULT_TARGETS += jdk_jigsaw
 643 jdk_jigsaw: java/lang/module $(JIGSAW_TESTS)
 644         $(call RunOthervmBatch)
 645 
 646 # ------------------------------------------------------------------
 647 
 648 # Run default tests
 649 jdk_default: $(JDK_DEFAULT_TARGETS)
 650         @$(SummaryInfo)
 651 
 652 # Run all tests
 653 jdk_all: $(JDK_ALL_TARGETS)
 654 ifeq ($(MODULE_BUILD),false)
 655    FILTER_OUT_LIST+=jdk_jigsaw
 656 endif
 657 
 658         @$(SummaryInfo)
 659 
 660 # These are all phony targets
 661 PHONY_LIST += $(JDK_ALL_TARGETS)
 662 
 663 # ------------------------------------------------------------------
 664 
 665 # Default JTREG to run (win32 script works for everybody)
 666 JTREG = $(JT_HOME)/win32/bin/jtreg
 667 # Add any extra options (agentvm etc.)
 668 JTREG_BASIC_OPTIONS += $(EXTRA_JTREG_OPTIONS)
 669 # Only run automatic tests
 670 JTREG_BASIC_OPTIONS += -a
 671 # Always turn on assertions
 672 JTREG_ASSERT_OPTION = -ea -esa
 673 JTREG_BASIC_OPTIONS += $(JTREG_ASSERT_OPTION)
 674 # Report details on all failed or error tests, times too
 675 JTREG_BASIC_OPTIONS += -v:fail,error,time
 676 # Retain all files for failing tests
 677 JTREG_BASIC_OPTIONS += -retain:fail,error
 678 # Ignore tests are not run and completely silent about it
 679 JTREG_IGNORE_OPTION = -ignore:quiet
 680 JTREG_BASIC_OPTIONS += $(JTREG_IGNORE_OPTION)
 681 # Multiple by 4 the timeout numbers
 682 JTREG_TIMEOUT_OPTION =  -timeoutFactor:4
 683 JTREG_BASIC_OPTIONS += $(JTREG_TIMEOUT_OPTION)
 684 # Boost the max memory for jtreg to avoid gc thrashing
 685 JTREG_MEMORY_OPTION = -J-Xmx512m
 686 JTREG_BASIC_OPTIONS += $(JTREG_MEMORY_OPTION)
 687 
 688 # Make sure jtreg exists
 689 $(JTREG): $(JT_HOME)
 690 
 691 # Run jtreg
 692 jtreg_tests: prep $(PRODUCT_HOME) $(JTREG) $(EXCLUDELIST)
 693         @$(EXPAND) $(EXCLUDELIST) \
 694             | $(CUT) -d' ' -f1 \
 695             | $(SED) -e 's@^@Excluding: @'
 696         (                                                                    \
 697           ( JT_HOME=$(shell $(GETMIXEDPATH) "$(JT_HOME)");                   \
 698             export JT_HOME;                                                  \
 699             $(shell $(GETMIXEDPATH) "$(JTREG)")                              \
 700               $(JTREG_BASIC_OPTIONS)                                         \
 701               -r:$(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/JTreport  \
 702               -w:$(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/JTwork    \
 703               -jdk:$(shell $(GETMIXEDPATH) "$(PRODUCT_HOME)")                \
 704               -exclude:$(shell $(GETMIXEDPATH) "$(EXCLUDELIST)")             \
 705               $(JTREG_TEST_OPTIONS)                                          \
 706               $(TESTDIRS)                                                    \
 707           ) ; $(BUNDLE_UP_AND_EXIT)                                          \
 708         ) 2>&1 | $(TEE) $(ABS_TEST_OUTPUT_DIR)/output.txt ; $(TESTEXIT)
 709 
 710 # Rule that may change execute permissions on shared library files.
 711 #  Files in repositories should never have execute permissions, but there
 712 #  are some tests that have pre-built shared libraries, and these windows
 713 #  dll files must have execute permission. Adding execute permission
 714 #  may happen automatically on windows when using certain versions of mercurial
 715 #  but it cannot be guaranteed. And blindly adding execute permission might
 716 #  be seen as a mercurial 'change', so we avoid adding execute permission to
 717 #  repository files. But testing from a plain source tree needs the chmod a+rx.
 718 #  Used on select directories and applying the chmod to all shared libraries
 719 #  not just dll files. On windows, this may not work with MKS if the files
 720 #  were installed with CYGWIN unzip or untar (MKS chmod may not do anything).
 721 #  And with CYGWIN and sshd service, you may need CYGWIN=ntsec for this to work.
 722 #
 723 shared_library_permissions: $(SHARED_LIBRARY_DIR)
 724         if [ ! -d $(TEST_ROOT)/../.hg ] ; then                          \
 725           $(FIND) $< \( -name \*.dll -o -name \*.DLL -o -name \*.so \)  \
 726                 -exec $(CHMOD) a+rx {} \; ;                             \
 727         fi
 728 
 729 PHONY_LIST += jtreg_tests shared_library_permissions
 730 
 731 ################################################################
 732 
 733 # packtest
 734 
 735 # Expect JPRT to set JPRT_PACKTEST_HOME.
 736 PACKTEST_HOME = /net/jprt-web.sfbay.sun.com/jprt/allproducts/packtest
 737 ifdef JPRT_PACKTEST_HOME
 738   PACKTEST_HOME = $(JPRT_PACKTEST_HOME)
 739 endif
 740 
 741 packtest: prep $(PACKTEST_HOME)/ptest $(PRODUCT_HOME)
 742         ( $(CD) $(PACKTEST_HOME) &&            \
 743             $(PACKTEST_HOME)/ptest             \
 744                  -t "$(PRODUCT_HOME)"          \
 745                  $(PACKTEST_STRESS_OPTION)     \
 746                  $(EXTRA_PACKTEST_OPTIONS)     \
 747                  -W $(ABS_TEST_OUTPUT_DIR)     \
 748                  $(JAVA_ARGS:%=-J %)           \
 749                  $(JAVA_VM_ARGS:%=-J %)        \
 750          ) ; $(BUNDLE_UP_AND_EXIT)
 751 
 752 packtest_stress: PACKTEST_STRESS_OPTION=-s
 753 packtest_stress: packtest
 754 
 755 PHONY_LIST += packtest packtest_stress
 756 
 757 ################################################################
 758 
 759 # perftest to collect statistics
 760 
 761 # Expect JPRT to set JPRT_PACKTEST_HOME.
 762 PERFTEST_HOME = $(TEST_ROOT)/perf
 763 ifdef JPRT_PERFTEST_HOME
 764   PERFTEST_HOME = $(JPRT_PERFTEST_HOME)
 765 endif
 766 
 767 perftest: ( $(PERFTEST_HOME)/perftest          \
 768                  -t $(shell $(GETMIXEDPATH) "$(PRODUCT_HOME)")               \
 769                  -w $(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)") \
 770                  -h $(PERFTEST_HOME) \
 771          ) ; $(BUNDLE_UP_AND_EXIT)
 772 
 773 
 774 PHONY_LIST += perftest
 775 
 776 ################################################################
 777 
 778 # vmsqe tests
 779 
 780 # Expect JPRT to set JPRT_VMSQE_HOME.
 781 VMSQE_HOME = $(SLASH_JAVA)/sqe/comp/vm/testbase/sqe/vm/current/build/latest/vm
 782 ifdef JPRT_VMSQE_HOME
 783   VMSQE_HOME = $(JPRT_VMSQE_HOME)
 784 endif
 785 
 786 # Expect JPRT to set JPRT_RUNVMSQE_HOME.
 787 RUNVMSQE_HOME = /net/jprt-web.sfbay.sun.com/jprt/allproducts/runvmsqe
 788 ifdef JPRT_RUNVMSQE_HOME
 789   RUNVMSQE_HOME = $(JPRT_RUNVMSQE_HOME)
 790 endif
 791 
 792 # Expect JPRT to set JPRT_TONGA3_HOME.
 793 TONGA3_HOME = $(SLASH_JAVA)/sqe/tools/gtee/harness/tonga
 794 ifdef JPRT_TONGA3_HOME
 795   TONGA3_HOME = $(JPRT_TONGA3_HOME)
 796 endif
 797 
 798 RUNVMSQE_BIN = $(RUNVMSQE_HOME)/bin/runvmsqe
 799 
 800 vmsqe_tests: prep $(VMSQE_HOME)/vm $(TONGA3_HOME) $(RUNVMSQE_BIN) $(PRODUCT_HOME)
 801         $(RM) -r $(ABS_TEST_OUTPUT_DIR)/vmsqe
 802         ( $(CD) $(ABS_TEST_OUTPUT_DIR) &&          \
 803             $(RUNVMSQE_BIN)                        \
 804                  -jdk "$(PRODUCT_HOME)"            \
 805                  -o "$(ABS_TEST_OUTPUT_DIR)/vmsqe" \
 806                  -testbase "$(VMSQE_HOME)/vm"      \
 807                  -tonga "$(TONGA3_HOME)"           \
 808                  -tongajdk "$(ALT_BOOTDIR)"        \
 809                  $(JAVA_ARGS)                      \
 810                  $(JAVA_VM_ARGS)                   \
 811                  $(RUNVMSQE_TEST_OPTION)           \
 812                  $(EXTRA_RUNVMSQE_OPTIONS)         \
 813          ) ; $(BUNDLE_UP_AND_EXIT)
 814 
 815 vmsqe_jdwp: RUNVMSQE_TEST_OPTION=-jdwp
 816 vmsqe_jdwp: vmsqe_tests
 817 
 818 vmsqe_jdi: RUNVMSQE_TEST_OPTION=-jdi
 819 vmsqe_jdi: vmsqe_tests
 820 
 821 vmsqe_jdb: RUNVMSQE_TEST_OPTION=-jdb
 822 vmsqe_jdb: vmsqe_tests
 823 
 824 vmsqe_quick-jdi: RUNVMSQE_TEST_OPTION=-quick-jdi
 825 vmsqe_quick-jdi: vmsqe_tests
 826 
 827 vmsqe_sajdi: RUNVMSQE_TEST_OPTION=-sajdi
 828 vmsqe_sajdi: vmsqe_tests
 829 
 830 vmsqe_jvmti: RUNVMSQE_TEST_OPTION=-jvmti
 831 vmsqe_jvmti: vmsqe_tests
 832 
 833 vmsqe_hprof: RUNVMSQE_TEST_OPTION=-hprof
 834 vmsqe_hprof: vmsqe_tests
 835 
 836 vmsqe_monitoring: RUNVMSQE_TEST_OPTION=-monitoring
 837 vmsqe_monitoring: vmsqe_tests
 838 
 839 PHONY_LIST += vmsqe_jdwp vmsqe_jdi vmsqe_jdb vmsqe_quick-jdi vmsqe_sajdi \
 840               vmsqe_jvmti vmsqe_hprof vmsqe_monitoring vmsqe_tests
 841 
 842 ################################################################
 843 
 844 # jck tests
 845 
 846 # Default is to use jck 7 from /java/re
 847 JCK7_DEFAULT_HOME = $(SLASH_JAVA)/re/jck/7/promoted/latest/binaries
 848 
 849 # Expect JPRT to set JPRT_JCK7COMPILER_HOME.
 850 JCK7COMPILER_HOME = $(JCK7_DEFAULT_HOME)/JCK-compiler-7
 851 ifdef JPRT_JCK7COMPILER_HOME
 852   JCK7COMPILER_HOME = $(JPRT_JCK7COMPILER_HOME)/JCK-compiler-7
 853 endif
 854 
 855 # Expect JPRT to set JPRT_JCK7RUNTIME_HOME.
 856 JCK7RUNTIME_HOME = $(JCK7_DEFAULT_HOME)/JCK-runtime-7
 857 ifdef JPRT_JCK7RUNTIME_HOME
 858   JCK7RUNTIME_HOME = $(JPRT_JCK7RUNTIME_HOME)/JCK-runtime-7
 859 endif
 860 
 861 # Expect JPRT to set JPRT_JCK7DEVTOOLS_HOME.
 862 JCK7DEVTOOLS_HOME = $(JCK7_DEFAULT_HOME)/JCK-devtools-7
 863 ifdef JPRT_JCK7DEVTOOLS_HOME
 864   JCK7DEVTOOLS_HOME = $(JPRT_JCK7DEVTOOLS_HOME)/JCK-devtools-7
 865 endif
 866 
 867 # The jtjck.jar utility to use to run the tests
 868 JTJCK_JAR = $(JCK_HOME)/lib/jtjck.jar
 869 JTJCK_JAVA_ARGS =  -XX:MaxPermSize=256m -Xmx512m
 870 JTJCK_OPTIONS = -headless -v
 871 
 872 # Default tests to run
 873 ifndef JCK_COMPILER_TESTS
 874   JCK_COMPILER_TESTS =
 875 endif
 876 ifndef JCK_RUNTIME_TESTS
 877   JCK_RUNTIME_TESTS  =
 878 endif
 879 ifndef JCK_DEVTOOLS_TESTS
 880   JCK_DEVTOOLS_TESTS =
 881 endif
 882 
 883 # Generic rule used to run jck tests
 884 _generic_jck_tests: prep $(PRODUCT_HOME) $(EXCLUDELIST)
 885         @$(EXPAND) $(EXCLUDELIST) \
 886             | $(CUT) -d' ' -f1 \
 887             | $(SED) -e 's@^@Excluding: @'
 888         ( $(CD) $(ABS_TEST_OUTPUT_DIR) &&                                  \
 889           $(PRODUCT_HOME)/bin/java $(JTJCK_JAVA_ARGS)                      \
 890             -jar "$(JTJCK_JAR)"                                            \
 891             $(JTJCK_OPTIONS)                                               \
 892             -r:$(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/JTreport  \
 893             -w:$(shell $(GETMIXEDPATH) "$(ABS_TEST_OUTPUT_DIR)")/JTwork    \
 894             -jdk:$(shell $(GETMIXEDPATH) "$(PRODUCT_HOME)")                \
 895             $(TESTDIRS)                                                    \
 896         ) ; $(BUNDLE_UP_AND_EXIT)
 897 
 898 # JCK7 compiler tests
 899 jck7compiler:
 900         $(MAKE) UNIQUE_DIR=$@ \
 901                 JCK_HOME=$(JCK7COMPILER_HOME) \
 902                 TESTDIRS="$(JCK_COMPILER_TESTS)" \
 903                 _generic_jck_tests
 904 
 905 # JCK7 runtime tests
 906 jck7runtime:
 907         $(MAKE) UNIQUE_DIR=$@ \
 908                 JCK_HOME=$(JCK7RUNTIME_HOME) \
 909                 TESTDIRS="$(JCK_RUNTIME_TESTS)" \
 910                 _generic_jck_tests
 911 
 912 # JCK7 devtools tests
 913 jck7devtools:
 914         $(MAKE) UNIQUE_DIR=$@ \
 915                 JCK_HOME=$(JCK7DEVTOOLS_HOME) \
 916                 TESTDIRS="$(JCK_DEVTOOLS_TESTS)" \
 917                 _generic_jck_tests
 918 
 919 # Run all 3 sets of JCK7 tests
 920 jck_all: jck7runtime jck7devtools jck7compiler
 921 
 922 PHONY_LIST += jck_all _generic_jck_tests \
 923               jck7compiler jck7runtime jck7devtools
 924 
 925 ################################################################
 926 
 927 # Phony targets (e.g. these are not filenames)
 928 .PHONY: all clean prep $(PHONY_LIST)
 929 
 930 ################################################################
 931