author | kbarrett |
Wed, 02 May 2018 19:24:52 -0400 | |
changeset 49957 | 746229cc1ab0 |
parent 47932 | 0c22f6b9b5e2 |
child 52342 | 9341b077bd55 |
child 56920 | e0750e33f818 |
permissions | -rw-r--r-- |
44027 | 1 |
# |
2 |
# Copyright (c) 2017, 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 |
ifndef _FIND_TESTS_GMK |
|
27 |
_FIND_TESTS_GMK := 1 |
|
28 |
||
29 |
# Hook to include the corresponding custom file, if present. |
|
47314 | 30 |
$(eval $(call IncludeCustomExtension, common/FindTests.gmk)) |
44027 | 31 |
|
47932
0c22f6b9b5e2
8191820: Fix run-test jtreg test selection and component calculation
ihse
parents:
47314
diff
changeset
|
32 |
# TEST_BASEDIRS might have been set by a custom extension |
0c22f6b9b5e2
8191820: Fix run-test jtreg test selection and component calculation
ihse
parents:
47314
diff
changeset
|
33 |
TEST_BASEDIRS += $(TOPDIR)/test $(TOPDIR) |
0c22f6b9b5e2
8191820: Fix run-test jtreg test selection and component calculation
ihse
parents:
47314
diff
changeset
|
34 |
|
47218 | 35 |
# JTREG_TESTROOTS might have been set by a custom extension |
36 |
JTREG_TESTROOTS += $(addprefix $(TOPDIR)/test/, hotspot/jtreg jdk langtools nashorn jaxp) |
|
44027 | 37 |
|
38 |
################################################################################ |
|
39 |
# Find the Jtreg test groups for the given component. |
|
40 |
# |
|
47218 | 41 |
# Parameter 1 is the jtreg root dir. This name is used as variable prefix. |
44027 | 42 |
# |
43 |
# After this macro has been evaluated, the following variables are defined for |
|
44 |
# the component: |
|
45 |
# JTREG_TESTROOT - The path to the root of the test directory |
|
46 |
# JTREG_GROUP_FILES - The file(s) containing the group definitions |
|
47 |
# JTREG_TEST_GROUPS - The name of the test groups that the component defines |
|
48 |
# |
|
49 |
FindJtregGroups = $(NamedParamsMacroTemplate) |
|
50 |
define FindJtregGroupsBody |
|
47218 | 51 |
ifneq ($$(wildcard $1), ) |
44027 | 52 |
$1_JTREG_GROUP_FILENAMES := $$(shell $$(SED) -n -e 's/\[\(.*\)\]/\1/g' \ |
47218 | 53 |
-e 's/^groups\w*=//p' $1/TEST.ROOT) |
54 |
$1_JTREG_GROUP_FILES := $$(addprefix $1/, $$($1_JTREG_GROUP_FILENAMES)) |
|
44027 | 55 |
$1_JTREG_TEST_GROUPS := $$(strip $$(shell $$(SED) -n \ |
44028 | 56 |
-e 's/\([^ ]*\)\w*=.*/\1/gp' $$(wildcard $$($1_JTREG_GROUP_FILES)) \ |
57 |
| $$(SORT) -u)) |
|
44027 | 58 |
endif |
59 |
endef |
|
60 |
||
61 |
# Configure definitions for all available test components |
|
47218 | 62 |
$(foreach root, $(JTREG_TESTROOTS), $(eval $(call FindJtregGroups, $(root)))) |
44027 | 63 |
|
64 |
# Create a list of all available Jtreg test groups in all components |
|
47218 | 65 |
JTREG_TEST_GROUPS += $(sort $(foreach root, $(JTREG_TESTROOTS), \ |
66 |
$($(root)_JTREG_TEST_GROUPS))) |
|
44027 | 67 |
|
68 |
# Add Jtreg test groups to list of named tests (test groups, test list, etc) |
|
69 |
# ALL_NAMED_TESTS might have been set by a custom extension |
|
70 |
ALL_NAMED_TESTS += $(JTREG_TEST_GROUPS) |
|
71 |
||
72 |
# Add Gtest |
|
73 |
ALL_NAMED_TESTS += gtest |
|
74 |
||
75 |
################################################################################ |
|
76 |
||
77 |
endif # _FIND_TESTS_GMK |