55881
|
1 |
#
|
|
2 |
# Copyright (c) 2016, 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 |
# In Cygwin, the MAKE variable gets prepended with the current directory if the
|
|
27 |
# make executable is called using a Windows mixed path (c:/cygwin/bin/make.exe).
|
|
28 |
ifneq ($(findstring :, $(MAKE)), )
|
|
29 |
MAKE := $(patsubst $(CURDIR)%, %, $(patsubst $(CURDIR)/%, %, $(MAKE)))
|
|
30 |
endif
|
|
31 |
|
|
32 |
# Locate this Makefile
|
|
33 |
ifeq ($(filter /%, $(lastword $(MAKEFILE_LIST))),)
|
|
34 |
makefile_path := $(CURDIR)/$(strip $(lastword $(MAKEFILE_LIST)))
|
|
35 |
else
|
|
36 |
makefile_path := $(lastword $(MAKEFILE_LIST))
|
|
37 |
endif
|
|
38 |
topdir := $(strip $(patsubst %/make/, %, $(dir $(makefile_path))))
|
|
39 |
|
|
40 |
# Determine if we need a fake spec
|
|
41 |
available_specs := $(wildcard $(topdir)/build/*/*.gmk)
|
|
42 |
ifeq ($(words $(available_specs)), 1)
|
|
43 |
# We found exactly one spec, assume we should use it
|
|
44 |
spec := $(strip $(patsubst $(topdir)/%, %, $(available_specs)))
|
|
45 |
$(info Using SPEC from configuration located at $(strip $(patsubst %/spec.gmk, %, $(spec))))
|
|
46 |
else
|
|
47 |
ifeq ($(available_specs), )
|
|
48 |
$(info No configurations found, using fake spec)
|
|
49 |
spec := make/FakeSpecForLegacyTests.gmk
|
|
50 |
else
|
|
51 |
$(info Warning: Multiple configurations found, using fake spec instead!)
|
|
52 |
$(info Please use top-level Makefile to properly select configuration)
|
|
53 |
spec := make/FakeSpecForLegacyTests.gmk
|
|
54 |
endif
|
|
55 |
endif
|
|
56 |
|
|
57 |
default: all
|
|
58 |
|
|
59 |
# Legacy control variables for jtreg/testing:
|
|
60 |
# SLASH_JAVA
|
|
61 |
# TEST_OUTPUT_DIR
|
|
62 |
# ALT_OUTPUTDIR
|
|
63 |
# PRODUCT_HOME
|
|
64 |
# JAVA_ARGS
|
|
65 |
# JPRT_PRODUCT_ARGS
|
|
66 |
# JPRT_PRODUCT_VM_ARGS
|
|
67 |
# TESTNATIVE_DIR
|
|
68 |
# JPRT_ARCHIVE_BUNDLE
|
|
69 |
# JT_HOME
|
|
70 |
# TESTDIRS # When called from JPRT the TESTDIRS variable is set to the jtreg tests to run (=> sets this in TEST_SELECTION)
|
|
71 |
# CONCURRENCY
|
|
72 |
# EXTRA_JTREG_OPTIONS
|
|
73 |
# JTREG_ASSERT_OPTION
|
|
74 |
# JTREG_VERBOSE
|
|
75 |
# JTREG_IGNORE_OPTION
|
|
76 |
# JTREG_TIMEOUT_OPTION
|
|
77 |
# JTREG_MEMORY_OPTION
|
|
78 |
# JTREG_TESTVM_MEMORY_OPTION
|
|
79 |
# JTREG_KEY_OPTION
|
|
80 |
# TEST_SELECTION
|
|
81 |
|
|
82 |
################################################################################
|
|
83 |
|
|
84 |
# Langtools used to remove the prefix "langtools_" from their test names.
|
|
85 |
|
|
86 |
langtools_% :
|
|
87 |
echo TESTS=$(addprefix langtools/test:, $(subst langtools_,,$@))
|
|
88 |
|
|
89 |
jdk_% core_%s svc_%:
|
|
90 |
echo TESTS=$(addprefix jdk/test:, $@)
|
|
91 |
|
|
92 |
jaxp_%:
|
|
93 |
echo TESTS=$(addprefix jaxp/test:, $@)
|
|
94 |
|
|
95 |
hotspot_%:
|
|
96 |
echo TESTS=$(addprefix hotspot/test:, $@)
|
|
97 |
|
|
98 |
runtest:
|
|
99 |
@cd $(topdir) && $(MAKE) -r -R -j 1 -s -I make/common/ \
|
|
100 |
SPEC=$(spec) TOPDIR=$(topdir) \
|
|
101 |
-f make/RunTests.gmk runtest TEST="tier1"
|
|
102 |
|
|
103 |
# If TEST_SELECTION is given, only use TESTDIRS to determine component.
|
|
104 |
# If TEST_SELECTION is not given, use TESTDIRS to determine component and
|
|
105 |
# test in the component.
|
|
106 |
# TESTDIRS must begin with ../<component>/test.
|
|
107 |
# Specifying only TESTDIRS=../<component>/test (with or without trailing slash)
|
|
108 |
# is an error.
|
|
109 |
#
|
|
110 |
COMPONENT=$(word 2,$(subst /, ,$(TESTDIRS)))
|
|
111 |
#ifneq ($(TEST_SELECTION), )
|
|
112 |
# $(addprefix $(COMPONENT)/test:, $(TESTNAMES))
|
|
113 |
|
|
114 |
TESTDIRS_TESTS=$(patsubst ../$(COMPONENT)/test/%,%,$(TESTDIRS))
|
|
115 |
|
|
116 |
jtreg_tests:
|
|
117 |
echo TESTS=$(sort $(TESTDIRS) $(TEST_SELECTION))
|
|
118 |
echo COMPONENT $(COMPONENT) TESTDIRS_TESTS $(TESTDIRS_TESTS)
|
|
119 |
|
|
120 |
all: runtest
|
|
121 |
|
|
122 |
.PHONY: default all
|