annotate test/Makefile @ 49578:7c82bb507446

8190333: sun/security/ssl/X509KeyManager/PreferredKey.java failed with "Failed to get the preferable key aliases" Reviewed-by: mullan
author amjiang
date Tue, 10 Apr 2018 18:16:12 -0700
parents 3b201865d5c1
children 9341b077bd55
rev   line source
ohair@4947 1 #
ehelin@34594 2 # Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
ohair@4947 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
ohair@4947 4 #
ohair@4947 5 # This code is free software; you can redistribute it and/or modify it
ohair@4947 6 # under the terms of the GNU General Public License version 2 only, as
ohair@5499 7 # published by the Free Software Foundation. Oracle designates this
ohair@4947 8 # particular file as subject to the "Classpath" exception as provided
ohair@5499 9 # by Oracle in the LICENSE file that accompanied this code.
ohair@4947 10 #
ohair@4947 11 # This code is distributed in the hope that it will be useful, but WITHOUT
ohair@4947 12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
ohair@4947 13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
ohair@4947 14 # version 2 for more details (a copy is included in the LICENSE file that
ohair@4947 15 # accompanied this code).
ohair@4947 16 #
ohair@4947 17 # You should have received a copy of the GNU General Public License version
ohair@4947 18 # 2 along with this work; if not, write to the Free Software Foundation,
ohair@4947 19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
ohair@4947 20 #
ohair@5499 21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
ohair@5499 22 # or visit www.oracle.com if you need additional information or have any
ohair@5499 23 # questions.
ohair@4947 24 #
ohair@4947 25
ohair@4947 26 #
ohair@4947 27 # Makefile to run tests from multiple sibling directories
ohair@4947 28 #
ohair@4947 29
ohair@4947 30 # Macro to run a test target in a subdir
ohair@4947 31 define SUBDIR_TEST # subdirectory target
ohair@4947 32 if [ -d $1 ] ; then \
erikj@47218 33 if [ -r $1/Makefile ] ; then \
erikj@47218 34 $(MAKE) --no-print-directory -k -C $1 $2 ; \
ohair@4947 35 else \
erikj@47218 36 echo "ERROR: File does not exist: $1/Makefile"; \
ohair@5115 37 exit 1; \
ohair@4947 38 fi; \
ohair@4947 39 else \
ohair@4947 40 echo "WARNING: No testing done, directory does not exist: $1"; \
ohair@4947 41 fi
ohair@4947 42 endef
ohair@4947 43
mduigou@15577 44 # Default test target (core)
joehw@28006 45 default: jdk_core langtools_jtreg jaxp_all
ohair@11242 46
ohair@11242 47 # All testing
joehw@28006 48 all: jdk_all langtools_all jaxp_all
ohair@4947 49
ehelin@34594 50 ifeq ($(TEST_JOBS), 0)
ihse@47938 51 JDK_TEST_JOBS=$(JOBS)
ehelin@34594 52 else
ehelin@34594 53 JDK_TEST_JOBS=$(TEST_JOBS)
ehelin@34594 54 endif
ohair@4947 55 # Test targets
mduigou@19520 56 langtools_% :
erikj@47221 57 @$(NO_STOPPING)$(call SUBDIR_TEST, langtools, \
erikj@47221 58 $(if $(JDK_TEST_JOBS), CONCURRENCY=$(JDK_TEST_JOBS)) \
erikj@47218 59 JT_JAVA=$(PRODUCT_HOME) JTREG_HOME=$(JT_HOME) \
erikj@47218 60 TEST="$(subst langtools_,,$@)" $(subst langtools_,,$@))
mduigou@15577 61
alanb@21760 62 jdk_% core_%s svc_%:
erikj@47221 63 @$(NO_STOPPING)$(call SUBDIR_TEST, jdk, \
erikj@47221 64 $(if $(JDK_TEST_JOBS), CONCURRENCY=$(JDK_TEST_JOBS)) TEST="$@" $@)
ohair@4947 65
joehw@28006 66 jaxp_%:
erikj@47221 67 @$(NO_STOPPING)$(call SUBDIR_TEST, jaxp, \
erikj@47221 68 $(if $(JDK_TEST_JOBS), CONCURRENCY=$(JDK_TEST_JOBS)) TEST="$@" $@)
erikj@47218 69
erikj@47218 70 nashorn_%:
erikj@47221 71 @$(NO_STOPPING)$(call SUBDIR_TEST, nashorn, \
erikj@47221 72 $(if $(JDK_TEST_JOBS), CONCURRENCY=$(JDK_TEST_JOBS)) TEST="$@" $@)
joehw@28006 73
ctornqvi@41648 74 SUB_MAKE_ARGS :=
ctornqvi@41648 75 ifneq ($(TEST_JOBS), 0)
ctornqvi@41648 76 ifneq ($(TEST_JOBS), )
ctornqvi@41648 77 SUB_MAKE_ARGS += CONCURRENCY=$(TEST_JOBS)
ctornqvi@41648 78 endif
ehelin@34594 79 endif
mikael@24419 80 hotspot_%:
erikj@47218 81 @$(NO_STOPPING)$(call SUBDIR_TEST, hotspot/jtreg, $(SUB_MAKE_ARGS) TEST="$@" $@)
mikael@24419 82
mikael@25461 83 #
mikael@25461 84 # jtreg_tests
mikael@25461 85 #
mikael@25461 86 # Invocation:
mikael@25461 87 #
sla@37863 88 # make jtreg_tests TESTDIRS=<test-dirs> TEST_SELECTION=<path to test or jtreg group> TEST_OUTPUT_DIR=<path>
mikael@25461 89 #
mikael@25461 90 # where <test-dirs> is something like '../<component>/test/runtime',
mikael@25461 91 # <component> in turn being one of the top level directories (for
mikael@25461 92 # example 'hotspot').
mikael@25461 93 #
mikael@25461 94 # The below will strip the path prefix and delegate to the
mikael@25461 95 # corresponding ../<component>/test/Makefile.
mikael@25461 96
mikael@25461 97 ifneq ($(TESTDIRS),)
erikj@47218 98 # Extract the component from ../test/<component>/...
erikj@47218 99 TESTDIRS_NORM := $(patsubst test/%, %, $(patsubst ../%, %, $(TESTDIRS)))
erikj@47218 100 COMPONENT := $(word 1,$(subst /, ,$(TESTDIRS_NORM)))
mikael@25461 101
erikj@47218 102 # Strip off the ../<component>/test prefix and pass the rest as TESTDIRS
erikj@47218 103 # to the delegate Makefile
erikj@47218 104 # The hotspot tests are in a subdir "java". Accept paths both including
erikj@47218 105 # and excluding this extra subdir
erikj@47218 106 TESTDIRS_TESTS := $(patsubst $(COMPONENT)/%,%,$(patsubst hotspot/jtreg/%,%, \
erikj@47218 107 $(patsubst ../%, %, $(TESTDIRS_NORM))))
mikael@25461 108 endif
mikael@25461 109
mikael@25461 110 jtreg_tests:
erikj@47218 111 $(MAKE) --no-print-directory TESTDIRS=$(TESTDIRS_TESTS) \
erikj@47218 112 $(COMPONENT)_jtreg_tests
mikael@25461 113
ohair@4947 114 ################################################################
ohair@4947 115
ohair@4947 116 # Phony targets (e.g. these are not filenames)
mduigou@19520 117 .PHONY: all clean
ohair@4947 118
ohair@4947 119 ################################################################