author | ihse |
Mon, 27 Nov 2017 22:22:03 +0100 | |
changeset 47943 | cece8b7adf10 |
parent 47941 | d91b0d2d45cb |
child 47956 | 72a474c85aee |
child 55897 | 37bbbe941c86 |
permissions | -rw-r--r-- |
44027 | 1 |
# |
2 |
# Copyright (c) 2016, 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 |
default: all |
|
27 |
||
28 |
include $(SPEC) |
|
29 |
include MakeBase.gmk |
|
30 |
include FindTests.gmk |
|
31 |
||
32 |
# We will always run multiple tests serially |
|
33 |
.NOTPARALLEL: |
|
34 |
||
35 |
# Hook to include the corresponding custom file, if present. |
|
47314 | 36 |
$(eval $(call IncludeCustomExtension, RunTests.gmk)) |
44027 | 37 |
|
47253
92fd0e04e0e1
8187544: Replace BUILD_OUTPUT and OUTPUT_ROOT with OUTPUTDIR
ihse
parents:
47218
diff
changeset
|
38 |
TEST_RESULTS_DIR := $(OUTPUTDIR)/test-results |
92fd0e04e0e1
8187544: Replace BUILD_OUTPUT and OUTPUT_ROOT with OUTPUTDIR
ihse
parents:
47218
diff
changeset
|
39 |
TEST_SUPPORT_DIR := $(OUTPUTDIR)/test-support |
47943 | 40 |
TEST_SUMMARY := $(TEST_RESULTS_DIR)/test-summary.txt |
44027 | 41 |
|
47937
c1437939b0d8
8177957: run-test summary lines look bad/misleading with long test names
ihse
parents:
47932
diff
changeset
|
42 |
ifeq ($(CUSTOM_ROOT), ) |
c1437939b0d8
8177957: run-test summary lines look bad/misleading with long test names
ihse
parents:
47932
diff
changeset
|
43 |
JTREG_TOPDIR := $(TOPDIR) |
c1437939b0d8
8177957: run-test summary lines look bad/misleading with long test names
ihse
parents:
47932
diff
changeset
|
44 |
else |
c1437939b0d8
8177957: run-test summary lines look bad/misleading with long test names
ihse
parents:
47932
diff
changeset
|
45 |
JTREG_TOPDIR := $(CUSTOM_ROOT) |
c1437939b0d8
8177957: run-test summary lines look bad/misleading with long test names
ihse
parents:
47932
diff
changeset
|
46 |
endif |
44027 | 47 |
|
48 |
################################################################################ |
|
49 |
# Parse control variables |
|
50 |
################################################################################ |
|
51 |
||
52 |
$(eval $(call ParseKeywordVariable, JTREG, \ |
|
53 |
KEYWORDS := JOBS TIMEOUT TEST_MODE ASSERT VERBOSE RETAIN MAX_MEM, \ |
|
54 |
STRING_KEYWORDS := OPTIONS JAVA_OPTIONS VM_OPTIONS, \ |
|
55 |
)) |
|
56 |
||
57 |
ifneq ($(JTREG), ) |
|
58 |
# Inform the user |
|
59 |
$(info Running tests using JTREG control variable '$(JTREG)') |
|
60 |
endif |
|
61 |
||
62 |
$(eval $(call ParseKeywordVariable, GTEST, \ |
|
63 |
KEYWORDS := REPEAT, \ |
|
64 |
STRING_KEYWORDS := OPTIONS, \ |
|
65 |
)) |
|
66 |
||
67 |
ifneq ($(GTEST), ) |
|
68 |
# Inform the user |
|
69 |
$(info Running tests using GTEST control variable '$(GTEST)') |
|
70 |
endif |
|
71 |
||
72 |
||
73 |
################################################################################ |
|
74 |
# Component-specific Jtreg settings |
|
75 |
################################################################################ |
|
76 |
||
77 |
ifeq ($(TEST_JOBS), 0) |
|
78 |
# If TEST_JOBS is not specified, hotspot fallback default is |
|
79 |
# min(num_cores / 2, 12). |
|
80 |
hotspot_JTREG_JOBS := $(shell $(EXPR) $(NUM_CORES) / 2) |
|
81 |
ifeq ($(hotspot_JTREG_JOBS), 0) |
|
82 |
hotspot_JTREG_JOBS := 1 |
|
83 |
else ifeq ($(shell $(EXPR) $(hotspot_JTREG_JOBS) \> 12), 1) |
|
84 |
hotspot_JTREG_JOBS := 12 |
|
85 |
endif |
|
86 |
endif |
|
87 |
||
88 |
hotspot_JTREG_MAX_MEM := 0 |
|
89 |
hotspot_JTREG_ASSERT := false |
|
90 |
hotspot_JTREG_NATIVEPATH := $(TEST_IMAGE_DIR)/hotspot/jtreg/native |
|
91 |
jdk_JTREG_NATIVEPATH := $(TEST_IMAGE_DIR)/jdk/jtreg/native |
|
92 |
||
47941
d91b0d2d45cb
8179554: make run-test does not respect ProblemList.txt
ihse
parents:
47939
diff
changeset
|
93 |
jdk_JTREG_PROBLEM_LIST += $(TOPDIR)/test/jdk/ProblemList.txt |
d91b0d2d45cb
8179554: make run-test does not respect ProblemList.txt
ihse
parents:
47939
diff
changeset
|
94 |
jaxp_JTREG_PROBLEM_LIST += $(TOPDIR)/test/jaxp/ProblemList.txt |
d91b0d2d45cb
8179554: make run-test does not respect ProblemList.txt
ihse
parents:
47939
diff
changeset
|
95 |
langtools_JTREG_PROBLEM_LIST += $(TOPDIR)/test/langtools/ProblemList.txt |
d91b0d2d45cb
8179554: make run-test does not respect ProblemList.txt
ihse
parents:
47939
diff
changeset
|
96 |
nashorn_JTREG_PROBLEM_LIST += $(TOPDIR)/test/nashorn/ProblemList.txt |
d91b0d2d45cb
8179554: make run-test does not respect ProblemList.txt
ihse
parents:
47939
diff
changeset
|
97 |
hotspot_JTREG_PROBLEM_LIST += $(TOPDIR)/test/hotspot/jtreg/ProblemList.txt |
44027 | 98 |
|
99 |
################################################################################ |
|
100 |
# Parse test selection |
|
101 |
# |
|
102 |
# The user has given a test selection in the TEST variable. We must parse it |
|
103 |
# and determine what that means in terms of actual calls to the test framework. |
|
104 |
# |
|
105 |
# The parse functions take as argument a test specification as given by the |
|
106 |
# user, and returns a fully qualified test descriptor if it was a match, or |
|
107 |
# nothing if not. A single test specification can result in multiple test |
|
108 |
# descriptors being returned. A valid test descriptor must always be accepted |
|
109 |
# and returned identically. |
|
110 |
################################################################################ |
|
111 |
||
112 |
# Helper function to determine if a test specification is a Gtest test |
|
113 |
# |
|
114 |
# It is a Gtest test if it is either "gtest", or "gtest:" followed by an optional |
|
115 |
# test filter string. |
|
116 |
define ParseGtestTestSelection |
|
117 |
$(if $(filter gtest%, $1), \ |
|
118 |
$(if $(filter gtest, $1), \ |
|
119 |
gtest:all \ |
|
120 |
, \ |
|
121 |
$(if $(filter gtest:, $1), \ |
|
122 |
gtest:all \ |
|
123 |
, \ |
|
124 |
$1 \ |
|
125 |
) \ |
|
126 |
) \ |
|
127 |
) |
|
128 |
endef |
|
129 |
||
47937
c1437939b0d8
8177957: run-test summary lines look bad/misleading with long test names
ihse
parents:
47932
diff
changeset
|
130 |
# Helper function that removes the TOPDIR part |
c1437939b0d8
8177957: run-test summary lines look bad/misleading with long test names
ihse
parents:
47932
diff
changeset
|
131 |
CleanupJtregPath = \ |
c1437939b0d8
8177957: run-test summary lines look bad/misleading with long test names
ihse
parents:
47932
diff
changeset
|
132 |
$(strip $(patsubst %/, %, $(subst $(JTREG_TOPDIR)/,, $1))) |
c1437939b0d8
8177957: run-test summary lines look bad/misleading with long test names
ihse
parents:
47932
diff
changeset
|
133 |
|
47932
0c22f6b9b5e2
8191820: Fix run-test jtreg test selection and component calculation
ihse
parents:
47928
diff
changeset
|
134 |
# Take a partial Jtreg root path and return a full, absolute path to that Jtreg |
0c22f6b9b5e2
8191820: Fix run-test jtreg test selection and component calculation
ihse
parents:
47928
diff
changeset
|
135 |
# root. Also support having "hotspot" as an alias for "hotspot/jtreg". |
0c22f6b9b5e2
8191820: Fix run-test jtreg test selection and component calculation
ihse
parents:
47928
diff
changeset
|
136 |
ExpandJtregRoot = \ |
47937
c1437939b0d8
8177957: run-test summary lines look bad/misleading with long test names
ihse
parents:
47932
diff
changeset
|
137 |
$(call CleanupJtregPath, $(wildcard \ |
47932
0c22f6b9b5e2
8191820: Fix run-test jtreg test selection and component calculation
ihse
parents:
47928
diff
changeset
|
138 |
$(if $(filter /%, $1), \ |
47937
c1437939b0d8
8177957: run-test summary lines look bad/misleading with long test names
ihse
parents:
47932
diff
changeset
|
139 |
$(if $(wildcard $(strip $1)/TEST.ROOT), \ |
c1437939b0d8
8177957: run-test summary lines look bad/misleading with long test names
ihse
parents:
47932
diff
changeset
|
140 |
$1 \ |
c1437939b0d8
8177957: run-test summary lines look bad/misleading with long test names
ihse
parents:
47932
diff
changeset
|
141 |
) \ |
47932
0c22f6b9b5e2
8191820: Fix run-test jtreg test selection and component calculation
ihse
parents:
47928
diff
changeset
|
142 |
, \ |
0c22f6b9b5e2
8191820: Fix run-test jtreg test selection and component calculation
ihse
parents:
47928
diff
changeset
|
143 |
$(filter $(addprefix %, $1), $(JTREG_TESTROOTS) $(addsuffix /, $(JTREG_TESTROOTS))) \ |
0c22f6b9b5e2
8191820: Fix run-test jtreg test selection and component calculation
ihse
parents:
47928
diff
changeset
|
144 |
$(filter $(addprefix %, $(strip $1)/jtreg), $(JTREG_TESTROOTS) $(addsuffix /, $(JTREG_TESTROOTS))) \ |
0c22f6b9b5e2
8191820: Fix run-test jtreg test selection and component calculation
ihse
parents:
47928
diff
changeset
|
145 |
) \ |
47937
c1437939b0d8
8177957: run-test summary lines look bad/misleading with long test names
ihse
parents:
47932
diff
changeset
|
146 |
)) |
47932
0c22f6b9b5e2
8191820: Fix run-test jtreg test selection and component calculation
ihse
parents:
47928
diff
changeset
|
147 |
|
0c22f6b9b5e2
8191820: Fix run-test jtreg test selection and component calculation
ihse
parents:
47928
diff
changeset
|
148 |
# Take a partial Jtreg test path and return a full, absolute path to that Jtreg |
0c22f6b9b5e2
8191820: Fix run-test jtreg test selection and component calculation
ihse
parents:
47928
diff
changeset
|
149 |
# test. Also support having "hotspot" as an alias for "hotspot/jtreg". |
0c22f6b9b5e2
8191820: Fix run-test jtreg test selection and component calculation
ihse
parents:
47928
diff
changeset
|
150 |
ExpandJtregPath = \ |
0c22f6b9b5e2
8191820: Fix run-test jtreg test selection and component calculation
ihse
parents:
47928
diff
changeset
|
151 |
$(if $(call ExpandJtregRoot, $1), \ |
0c22f6b9b5e2
8191820: Fix run-test jtreg test selection and component calculation
ihse
parents:
47928
diff
changeset
|
152 |
$(call ExpandJtregRoot, $1) \ |
0c22f6b9b5e2
8191820: Fix run-test jtreg test selection and component calculation
ihse
parents:
47928
diff
changeset
|
153 |
, \ |
47937
c1437939b0d8
8177957: run-test summary lines look bad/misleading with long test names
ihse
parents:
47932
diff
changeset
|
154 |
$(call CleanupJtregPath, $(wildcard \ |
47932
0c22f6b9b5e2
8191820: Fix run-test jtreg test selection and component calculation
ihse
parents:
47928
diff
changeset
|
155 |
$(if $(filter /%, $1), \ |
0c22f6b9b5e2
8191820: Fix run-test jtreg test selection and component calculation
ihse
parents:
47928
diff
changeset
|
156 |
$1 \ |
0c22f6b9b5e2
8191820: Fix run-test jtreg test selection and component calculation
ihse
parents:
47928
diff
changeset
|
157 |
, \ |
0c22f6b9b5e2
8191820: Fix run-test jtreg test selection and component calculation
ihse
parents:
47928
diff
changeset
|
158 |
$(addsuffix /$(strip $1), $(JTREG_TESTROOTS) $(TEST_BASEDIRS)) \ |
0c22f6b9b5e2
8191820: Fix run-test jtreg test selection and component calculation
ihse
parents:
47928
diff
changeset
|
159 |
$(addsuffix $(strip $(patsubst hotspot/%, /hotspot/jtreg/%, $1)), $(JTREG_TESTROOTS) $(TEST_BASEDIRS)) \ |
0c22f6b9b5e2
8191820: Fix run-test jtreg test selection and component calculation
ihse
parents:
47928
diff
changeset
|
160 |
) \ |
47937
c1437939b0d8
8177957: run-test summary lines look bad/misleading with long test names
ihse
parents:
47932
diff
changeset
|
161 |
)) \ |
47932
0c22f6b9b5e2
8191820: Fix run-test jtreg test selection and component calculation
ihse
parents:
47928
diff
changeset
|
162 |
) |
0c22f6b9b5e2
8191820: Fix run-test jtreg test selection and component calculation
ihse
parents:
47928
diff
changeset
|
163 |
|
44027 | 164 |
# Helper function to determine if a test specification is a Jtreg test |
165 |
# |
|
166 |
# It is a Jtreg test if it optionally begins with jtreg:, and then is either |
|
167 |
# an unspecified group name (possibly prefixed by :), or a group in a |
|
47932
0c22f6b9b5e2
8191820: Fix run-test jtreg test selection and component calculation
ihse
parents:
47928
diff
changeset
|
168 |
# specified test root, or a path to a test or test directory, |
0c22f6b9b5e2
8191820: Fix run-test jtreg test selection and component calculation
ihse
parents:
47928
diff
changeset
|
169 |
# either absolute or relative to any of the TEST_BASEDIRS or test roots. |
44027 | 170 |
define ParseJtregTestSelection |
171 |
$(eval TEST_NAME := $(strip $(patsubst jtreg:%, %, $1))) \ |
|
172 |
$(if $(or $(findstring :, $(TEST_NAME)), $(findstring /, $(TEST_NAME))), , \ |
|
173 |
$(eval TEST_NAME := :$(TEST_NAME)) \ |
|
174 |
) \ |
|
175 |
$(if $(findstring :, $(TEST_NAME)), \ |
|
176 |
$(if $(filter :%, $(TEST_NAME)), \ |
|
47932
0c22f6b9b5e2
8191820: Fix run-test jtreg test selection and component calculation
ihse
parents:
47928
diff
changeset
|
177 |
$(eval TEST_GROUP := $(patsubst :%, %, $(TEST_NAME))) \ |
0c22f6b9b5e2
8191820: Fix run-test jtreg test selection and component calculation
ihse
parents:
47928
diff
changeset
|
178 |
$(eval TEST_ROOTS := $(JTREG_TESTROOTS)) \ |
44027 | 179 |
, \ |
47932
0c22f6b9b5e2
8191820: Fix run-test jtreg test selection and component calculation
ihse
parents:
47928
diff
changeset
|
180 |
$(eval TEST_PATH := $(word 1, $(subst :, $(SPACE), $(TEST_NAME)))) \ |
0c22f6b9b5e2
8191820: Fix run-test jtreg test selection and component calculation
ihse
parents:
47928
diff
changeset
|
181 |
$(eval TEST_GROUP := $(word 2, $(subst :, $(SPACE), $(TEST_NAME)))) \ |
0c22f6b9b5e2
8191820: Fix run-test jtreg test selection and component calculation
ihse
parents:
47928
diff
changeset
|
182 |
$(eval TEST_ROOTS := $(call ExpandJtregRoot, $(TEST_PATH))) \ |
0c22f6b9b5e2
8191820: Fix run-test jtreg test selection and component calculation
ihse
parents:
47928
diff
changeset
|
183 |
) \ |
0c22f6b9b5e2
8191820: Fix run-test jtreg test selection and component calculation
ihse
parents:
47928
diff
changeset
|
184 |
$(foreach test_root, $(TEST_ROOTS), \ |
47937
c1437939b0d8
8177957: run-test summary lines look bad/misleading with long test names
ihse
parents:
47932
diff
changeset
|
185 |
$(if $(filter /%, $(test_root)), \ |
47932
0c22f6b9b5e2
8191820: Fix run-test jtreg test selection and component calculation
ihse
parents:
47928
diff
changeset
|
186 |
jtreg:$(test_root):$(TEST_GROUP) \ |
47937
c1437939b0d8
8177957: run-test summary lines look bad/misleading with long test names
ihse
parents:
47932
diff
changeset
|
187 |
, \ |
c1437939b0d8
8177957: run-test summary lines look bad/misleading with long test names
ihse
parents:
47932
diff
changeset
|
188 |
$(if $(filter $(TEST_GROUP), $($(JTREG_TOPDIR)/$(test_root)_JTREG_TEST_GROUPS)), \ |
c1437939b0d8
8177957: run-test summary lines look bad/misleading with long test names
ihse
parents:
47932
diff
changeset
|
189 |
jtreg:$(test_root):$(TEST_GROUP) \ |
c1437939b0d8
8177957: run-test summary lines look bad/misleading with long test names
ihse
parents:
47932
diff
changeset
|
190 |
) \ |
44027 | 191 |
) \ |
192 |
) \ |
|
193 |
, \ |
|
47937
c1437939b0d8
8177957: run-test summary lines look bad/misleading with long test names
ihse
parents:
47932
diff
changeset
|
194 |
$(eval TEST_PATHS := $(call ExpandJtregPath, $(TEST_NAME))) \ |
c1437939b0d8
8177957: run-test summary lines look bad/misleading with long test names
ihse
parents:
47932
diff
changeset
|
195 |
$(foreach test_path, $(TEST_PATHS), \ |
c1437939b0d8
8177957: run-test summary lines look bad/misleading with long test names
ihse
parents:
47932
diff
changeset
|
196 |
jtreg:$(test_path) \ |
44027 | 197 |
) \ |
198 |
) |
|
199 |
endef |
|
200 |
||
201 |
ifeq ($(TEST), ) |
|
202 |
$(info No test selection given in TEST!) |
|
203 |
$(info Please use e.g. 'run-test TEST=tier1' or 'run-test-tier1') |
|
47928
fb62d4519338
8191715: Update documentation pointing to "common" directory
ihse
parents:
47329
diff
changeset
|
204 |
$(info See doc/testing.[md|html] for help) |
44027 | 205 |
$(error Cannot continue) |
206 |
endif |
|
207 |
||
208 |
# Now intelligently convert the test selection given by the user in TEST |
|
209 |
# into a list of fully qualified test descriptors of the tests to run. |
|
210 |
TESTS_TO_RUN := |
|
211 |
$(foreach test, $(TEST), \ |
|
212 |
$(eval PARSED_TESTS := $(call ParseCustomTestSelection, $(test))) \ |
|
213 |
$(if $(strip $(PARSED_TESTS)), , \ |
|
214 |
$(eval PARSED_TESTS += $(call ParseGtestTestSelection, $(test))) \ |
|
215 |
) \ |
|
216 |
$(if $(strip $(PARSED_TESTS)), , \ |
|
217 |
$(eval PARSED_TESTS += $(call ParseJtregTestSelection, $(test))) \ |
|
218 |
) \ |
|
219 |
$(if $(strip $(PARSED_TESTS)), , \ |
|
220 |
$(eval UNKNOWN_TEST := $(test)) \ |
|
221 |
) \ |
|
222 |
$(eval TESTS_TO_RUN += $(PARSED_TESTS)) \ |
|
223 |
) |
|
224 |
||
225 |
ifneq ($(UNKNOWN_TEST), ) |
|
226 |
$(info Unknown test selection: '$(UNKNOWN_TEST)') |
|
47928
fb62d4519338
8191715: Update documentation pointing to "common" directory
ihse
parents:
47329
diff
changeset
|
227 |
$(info See doc/testing.[md|html] for help) |
44027 | 228 |
$(error Cannot continue) |
229 |
endif |
|
230 |
||
231 |
TESTS_TO_RUN := $(strip $(TESTS_TO_RUN)) |
|
232 |
||
233 |
||
234 |
# Present the result of our parsing to the user |
|
235 |
$(info Test selection '$(TEST)', will run:) |
|
236 |
$(foreach test, $(TESTS_TO_RUN), $(info * $(test))) |
|
237 |
||
238 |
||
239 |
################################################################################ |
|
240 |
# Functions for setting up rules for running the selected tests |
|
241 |
# |
|
242 |
# The SetupRun*Test functions all have the same interface: |
|
243 |
# |
|
244 |
# Parameter 1 is the name of the rule. This is the test id, based on the test |
|
245 |
# descriptor, and this is also used as variable prefix, and the targets |
|
246 |
# generated are listed in a variable by that name. |
|
247 |
# |
|
248 |
# Remaining parameters are named arguments. Currently this is only: |
|
249 |
# TEST -- The properly formatted fully qualified test descriptor |
|
250 |
# |
|
251 |
# After the rule named by the test id has been executed, the following |
|
252 |
# variables will be available: |
|
253 |
# testid_TOTAL - the total number of tests run |
|
254 |
# testid_PASSED - the number of successful tests |
|
255 |
# testid_FAILED - the number of failed tests |
|
256 |
# testid_ERROR - the number of tests was neither successful or failed |
|
257 |
# |
|
258 |
################################################################################ |
|
259 |
||
260 |
### Rules for Gtest |
|
261 |
||
262 |
SetupRunGtestTest = $(NamedParamsMacroTemplate) |
|
263 |
define SetupRunGtestTestBody |
|
264 |
$1_TEST_RESULTS_DIR := $$(TEST_RESULTS_DIR)/$1 |
|
265 |
$1_TEST_SUPPORT_DIR := $$(TEST_SUPPORT_DIR)/$1 |
|
266 |
||
267 |
$1_TEST_NAME := $$(strip $$(patsubst gtest:%, %, $$($1_TEST))) |
|
268 |
ifneq ($$($1_TEST_NAME), all) |
|
269 |
$1_GTEST_FILTER := --gtest_filter=$$($1_TEST_NAME)* |
|
270 |
endif |
|
271 |
||
272 |
ifneq ($$(GTEST_REPEAT), ) |
|
273 |
$1_GTEST_REPEAT :=--gtest_repeat=$$(GTEST_REPEAT) |
|
274 |
endif |
|
275 |
||
276 |
run-test-$1: |
|
277 |
$$(call LogWarn) |
|
278 |
$$(call LogWarn, Running test '$$($1_TEST)') |
|
279 |
$$(call MakeDir, $$($1_TEST_RESULTS_DIR) $$($1_TEST_SUPPORT_DIR)) |
|
280 |
$$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/gtest, \ |
|
281 |
$$(FIXPATH) $$(TEST_IMAGE_DIR)/hotspot/gtest/server/gtestLauncher \ |
|
282 |
-jdk $(JDK_IMAGE_DIR) $$($1_GTEST_FILTER) \ |
|
283 |
--gtest_output=xml:$$($1_TEST_RESULTS_DIR)/gtest.xml \ |
|
284 |
$$($1_GTEST_REPEAT) $$(GTEST_OPTIONS) \ |
|
285 |
> >($(TEE) $$($1_TEST_RESULTS_DIR)/gtest.txt) || true ) |
|
286 |
||
287 |
$1_RESULT_FILE := $$($1_TEST_RESULTS_DIR)/gtest.txt |
|
288 |
||
289 |
parse-test-$1: run-test-$1 |
|
290 |
$$(call LogWarn, Finished running test '$$($1_TEST)') |
|
291 |
$$(call LogWarn, Test report is stored in $$(strip \ |
|
292 |
$$(subst $$(TOPDIR)/, , $$($1_TEST_RESULTS_DIR)))) |
|
293 |
$$(eval $1_TOTAL := $$(shell $$(AWK) '/==========.* tests? from .* \ |
|
294 |
test cases? ran/ { print $$$$2 }' $$($1_RESULT_FILE))) |
|
295 |
$$(eval $1_PASSED := $$(shell $$(AWK) '/\[ PASSED \] .* tests?./ \ |
|
296 |
{ print $$$$4 }' $$($1_RESULT_FILE))) |
|
297 |
$$(eval $1_FAILED := $$(shell $$(AWK) '/\[ FAILED \] .* tests?, \ |
|
298 |
listed below/ { print $$$$4 }' $$($1_RESULT_FILE))) |
|
299 |
$$(if $$($1_FAILED), , $$(eval $1_FAILED := 0)) |
|
300 |
$$(eval $1_ERROR := $$(shell \ |
|
301 |
$$(EXPR) $$($1_TOTAL) - $$($1_PASSED) - $$($1_FAILED))) |
|
302 |
||
303 |
$1: run-test-$1 parse-test-$1 |
|
304 |
||
305 |
TARGETS += $1 |
|
306 |
endef |
|
307 |
||
308 |
################################################################################ |
|
309 |
||
310 |
### Rules for Jtreg |
|
311 |
||
312 |
# Helper function for SetupRunJtregTest. Set a JTREG_* variable from, in order: |
|
313 |
# 1) Specified by user on command line |
|
314 |
# 2) Component-specific default |
|
315 |
# 3) Generic default |
|
316 |
# |
|
317 |
# Note: No spaces are allowed around the arguments. |
|
318 |
# Arg $1 The test ID (i.e. $1 in SetupRunJtregTest) |
|
319 |
# Arg $2 Base variable, e.g. JTREG_JOBS |
|
320 |
# Arg $3 The default value (optional) |
|
321 |
define SetJtregValue |
|
322 |
ifneq ($$($2), ) |
|
323 |
$1_$2 := $$($2) |
|
324 |
else |
|
325 |
ifneq ($$($$($1_COMPONENT)_$2), ) |
|
326 |
$1_$2 := $$($$($1_COMPONENT)_$2) |
|
327 |
else |
|
328 |
ifneq ($3, ) |
|
329 |
$1_$2 := $3 |
|
330 |
endif |
|
331 |
endif |
|
332 |
endif |
|
333 |
endef |
|
334 |
||
335 |
SetupRunJtregTest = $(NamedParamsMacroTemplate) |
|
336 |
define SetupRunJtregTestBody |
|
337 |
$1_TEST_RESULTS_DIR := $$(TEST_RESULTS_DIR)/$1 |
|
338 |
$1_TEST_SUPPORT_DIR := $$(TEST_SUPPORT_DIR)/$1 |
|
339 |
||
340 |
$1_TEST_NAME := $$(strip $$(patsubst jtreg:%, %, $$($1_TEST))) |
|
47932
0c22f6b9b5e2
8191820: Fix run-test jtreg test selection and component calculation
ihse
parents:
47928
diff
changeset
|
341 |
|
0c22f6b9b5e2
8191820: Fix run-test jtreg test selection and component calculation
ihse
parents:
47928
diff
changeset
|
342 |
$1_COMPONENT := \ |
0c22f6b9b5e2
8191820: Fix run-test jtreg test selection and component calculation
ihse
parents:
47928
diff
changeset
|
343 |
$$(strip $$(foreach root, $$(JTREG_TESTROOTS), \ |
47937
c1437939b0d8
8177957: run-test summary lines look bad/misleading with long test names
ihse
parents:
47932
diff
changeset
|
344 |
$$(if $$(filter $$(root)%, $$(JTREG_TOPDIR)/$$($1_TEST_NAME)), \ |
47932
0c22f6b9b5e2
8191820: Fix run-test jtreg test selection and component calculation
ihse
parents:
47928
diff
changeset
|
345 |
$$(lastword $$(subst /, $$(SPACE), $$(root))) \ |
0c22f6b9b5e2
8191820: Fix run-test jtreg test selection and component calculation
ihse
parents:
47928
diff
changeset
|
346 |
) \ |
0c22f6b9b5e2
8191820: Fix run-test jtreg test selection and component calculation
ihse
parents:
47928
diff
changeset
|
347 |
)) |
0c22f6b9b5e2
8191820: Fix run-test jtreg test selection and component calculation
ihse
parents:
47928
diff
changeset
|
348 |
# This will work only as long as just hotspot has the additional "jtreg" directory |
0c22f6b9b5e2
8191820: Fix run-test jtreg test selection and component calculation
ihse
parents:
47928
diff
changeset
|
349 |
ifeq ($$($1_COMPONENT), jtreg) |
0c22f6b9b5e2
8191820: Fix run-test jtreg test selection and component calculation
ihse
parents:
47928
diff
changeset
|
350 |
$1_COMPONENT := hotspot |
0c22f6b9b5e2
8191820: Fix run-test jtreg test selection and component calculation
ihse
parents:
47928
diff
changeset
|
351 |
endif |
44027 | 352 |
|
45104 | 353 |
ifeq ($$(JT_HOME), ) |
354 |
$$(info Error: jtreg framework is not found.) |
|
355 |
$$(info Please run configure using --with-jtreg.) |
|
356 |
$$(error Cannot continue) |
|
357 |
endif |
|
358 |
||
44027 | 359 |
# Unfortunately, we need different defaults for some JTREG values, |
360 |
# depending on what component we're running. |
|
361 |
||
362 |
# Convert JTREG_foo into $1_JTREG_foo with a suitable value. |
|
363 |
$$(eval $$(call SetJtregValue,$1,JTREG_TEST_MODE,agentvm)) |
|
364 |
$$(eval $$(call SetJtregValue,$1,JTREG_ASSERT,true)) |
|
365 |
$$(eval $$(call SetJtregValue,$1,JTREG_MAX_MEM,512m)) |
|
366 |
$$(eval $$(call SetJtregValue,$1,JTREG_NATIVEPATH)) |
|
367 |
$$(eval $$(call SetJtregValue,$1,JTREG_BASIC_OPTIONS)) |
|
47941
d91b0d2d45cb
8179554: make run-test does not respect ProblemList.txt
ihse
parents:
47939
diff
changeset
|
368 |
$$(eval $$(call SetJtregValue,$1,JTREG_PROBLEM_LIST)) |
44027 | 369 |
|
370 |
ifneq ($(TEST_JOBS), 0) |
|
371 |
# User has specified TEST_JOBS, use that as fallback default |
|
372 |
$$(eval $$(call SetJtregValue,$1,JTREG_JOBS,$$(TEST_JOBS))) |
|
373 |
else |
|
374 |
# Use JOBS as default (except for hotspot) |
|
375 |
$$(eval $$(call SetJtregValue,$1,JTREG_JOBS,$$(JOBS))) |
|
376 |
endif |
|
377 |
||
47058
85aaac5701da
8186248: Allow more flexibility in selecting Heap % of available RAM
bobv
parents:
46230
diff
changeset
|
378 |
# Make sure MaxRAMPercentage is high enough to not cause OOM or swapping since |
44027 | 379 |
# we may end up with a lot of JVM's |
47058
85aaac5701da
8186248: Allow more flexibility in selecting Heap % of available RAM
bobv
parents:
46230
diff
changeset
|
380 |
$1_JTREG_MAX_RAM_PERCENTAGE := $$(shell $$(EXPR) 25 / $$($1_JTREG_JOBS)) |
44027 | 381 |
|
382 |
JTREG_TIMEOUT ?= 4 |
|
383 |
JTREG_VERBOSE ?= fail,error,summary |
|
384 |
JTREG_RETAIN ?= fail,error |
|
385 |
||
386 |
ifneq ($$($1_JTREG_MAX_MEM), 0) |
|
387 |
$1_JTREG_BASIC_OPTIONS += -vmoption:-Xmx$$($1_JTREG_MAX_MEM) |
|
388 |
$1_JTREG_LAUNCHER_OPTIONS += -Xmx$$($1_JTREG_MAX_MEM) |
|
389 |
endif |
|
390 |
||
391 |
$1_JTREG_BASIC_OPTIONS += -$$($1_JTREG_TEST_MODE) \ |
|
392 |
-verbose:$$(JTREG_VERBOSE) -retain:$$(JTREG_RETAIN) \ |
|
393 |
-concurrency:$$($1_JTREG_JOBS) -timeoutFactor:$$(JTREG_TIMEOUT) \ |
|
47058
85aaac5701da
8186248: Allow more flexibility in selecting Heap % of available RAM
bobv
parents:
46230
diff
changeset
|
394 |
-vmoption:-XX:MaxRAMPercentage=$$($1_JTREG_MAX_RAM_PERCENTAGE) |
44027 | 395 |
|
396 |
$1_JTREG_BASIC_OPTIONS += -automatic -keywords:\!ignore -ignore:quiet |
|
397 |
||
47329 | 398 |
# Make it possible to specify the JIB_DATA_DIR for tests using the |
399 |
# JIB Artifact resolver |
|
400 |
$1_JTREG_BASIC_OPTIONS += -e:JIB_DATA_DIR |
|
44027 | 401 |
# Some tests needs to find a boot JDK using the JDK8_HOME variable. |
402 |
$1_JTREG_BASIC_OPTIONS += -e:JDK8_HOME=$$(BOOT_JDK) |
|
403 |
||
404 |
$1_JTREG_BASIC_OPTIONS += \ |
|
405 |
$$(addprefix -javaoption:, $$(JTREG_JAVA_OPTIONS)) \ |
|
406 |
$$(addprefix -vmoption:, $$(JTREG_VM_OPTIONS)) \ |
|
407 |
# |
|
408 |
||
409 |
ifeq ($$($1_JTREG_ASSERT), true) |
|
410 |
$1_JTREG_BASIC_OPTIONS += -ea -esa |
|
411 |
endif |
|
412 |
||
413 |
ifneq ($$($1_JTREG_NATIVEPATH), ) |
|
414 |
$1_JTREG_BASIC_OPTIONS += -nativepath:$$($1_JTREG_NATIVEPATH) |
|
415 |
endif |
|
416 |
||
47941
d91b0d2d45cb
8179554: make run-test does not respect ProblemList.txt
ihse
parents:
47939
diff
changeset
|
417 |
ifneq ($$($1_JTREG_PROBLEM_LIST), ) |
d91b0d2d45cb
8179554: make run-test does not respect ProblemList.txt
ihse
parents:
47939
diff
changeset
|
418 |
$1_JTREG_BASIC_OPTIONS += $$(addprefix -exclude:, $$($1_JTREG_PROBLEM_LIST)) |
d91b0d2d45cb
8179554: make run-test does not respect ProblemList.txt
ihse
parents:
47939
diff
changeset
|
419 |
endif |
d91b0d2d45cb
8179554: make run-test does not respect ProblemList.txt
ihse
parents:
47939
diff
changeset
|
420 |
|
46230
e0ca0417b74d
8180600: make run-test does not work with jib test dependencies
erikj
parents:
45104
diff
changeset
|
421 |
ifneq ($$(JIB_JAR), ) |
e0ca0417b74d
8180600: make run-test does not work with jib test dependencies
erikj
parents:
45104
diff
changeset
|
422 |
$1_JTREG_BASIC_OPTIONS += -cpa:$$(JIB_JAR) |
e0ca0417b74d
8180600: make run-test does not work with jib test dependencies
erikj
parents:
45104
diff
changeset
|
423 |
endif |
e0ca0417b74d
8180600: make run-test does not work with jib test dependencies
erikj
parents:
45104
diff
changeset
|
424 |
|
47939
fe7596497fb0
8179555: make run-test should always use a fresh, clean JTwork directory
ihse
parents:
47938
diff
changeset
|
425 |
clean-workdir-$1: |
fe7596497fb0
8179555: make run-test should always use a fresh, clean JTwork directory
ihse
parents:
47938
diff
changeset
|
426 |
$$(RM) -r $$($1_TEST_SUPPORT_DIR) |
fe7596497fb0
8179555: make run-test should always use a fresh, clean JTwork directory
ihse
parents:
47938
diff
changeset
|
427 |
|
fe7596497fb0
8179555: make run-test should always use a fresh, clean JTwork directory
ihse
parents:
47938
diff
changeset
|
428 |
run-test-$1: clean-workdir-$1 |
44027 | 429 |
$$(call LogWarn) |
430 |
$$(call LogWarn, Running test '$$($1_TEST)') |
|
431 |
$$(call MakeDir, $$($1_TEST_RESULTS_DIR) $$($1_TEST_SUPPORT_DIR)) |
|
432 |
$$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/jtreg, \ |
|
433 |
$$(JAVA) $$($1_JTREG_LAUNCHER_OPTIONS) \ |
|
434 |
-Dprogram=jtreg -jar $$(JT_HOME)/lib/jtreg.jar \ |
|
435 |
$$($1_JTREG_BASIC_OPTIONS) \ |
|
436 |
-testjdk:$$(JDK_IMAGE_DIR) \ |
|
47937
c1437939b0d8
8177957: run-test summary lines look bad/misleading with long test names
ihse
parents:
47932
diff
changeset
|
437 |
-dir:$$(JTREG_TOPDIR) \ |
44027 | 438 |
-reportDir:$$($1_TEST_RESULTS_DIR) \ |
439 |
-workDir:$$($1_TEST_SUPPORT_DIR) \ |
|
440 |
$$(JTREG_OPTIONS) \ |
|
441 |
$$($1_TEST_NAME) || true ) |
|
442 |
||
443 |
$1_RESULT_FILE := $$($1_TEST_RESULTS_DIR)/text/stats.txt |
|
444 |
||
445 |
parse-test-$1: run-test-$1 |
|
446 |
$$(call LogWarn, Finished running test '$$($1_TEST)') |
|
447 |
$$(call LogWarn, Test report is stored in $$(strip \ |
|
448 |
$$(subst $$(TOPDIR)/, , $$($1_TEST_RESULTS_DIR)))) |
|
47259
0b347d8efb40
8187672: RunTest displays broken output if jtreg fails completely
ihse
parents:
47253
diff
changeset
|
449 |
$$(if $$(wildcard $$($1_RESULT_FILE)), \ |
0b347d8efb40
8187672: RunTest displays broken output if jtreg fails completely
ihse
parents:
47253
diff
changeset
|
450 |
$$(eval $1_PASSED := $$(shell $$(AWK) '{ gsub(/[,;]/, ""); \ |
0b347d8efb40
8187672: RunTest displays broken output if jtreg fails completely
ihse
parents:
47253
diff
changeset
|
451 |
for (i=1; i<=NF; i++) { if ($$$$i == "passed:") \ |
0b347d8efb40
8187672: RunTest displays broken output if jtreg fails completely
ihse
parents:
47253
diff
changeset
|
452 |
print $$$$(i+1) } }' $$($1_RESULT_FILE))) \ |
0b347d8efb40
8187672: RunTest displays broken output if jtreg fails completely
ihse
parents:
47253
diff
changeset
|
453 |
$$(if $$($1_PASSED), , $$(eval $1_PASSED := 0)) \ |
0b347d8efb40
8187672: RunTest displays broken output if jtreg fails completely
ihse
parents:
47253
diff
changeset
|
454 |
$$(eval $1_FAILED := $$(shell $$(AWK) '{gsub(/[,;]/, ""); \ |
0b347d8efb40
8187672: RunTest displays broken output if jtreg fails completely
ihse
parents:
47253
diff
changeset
|
455 |
for (i=1; i<=NF; i++) { if ($$$$i == "failed:") \ |
0b347d8efb40
8187672: RunTest displays broken output if jtreg fails completely
ihse
parents:
47253
diff
changeset
|
456 |
print $$$$(i+1) } }' $$($1_RESULT_FILE))) \ |
0b347d8efb40
8187672: RunTest displays broken output if jtreg fails completely
ihse
parents:
47253
diff
changeset
|
457 |
$$(if $$($1_FAILED), , $$(eval $1_FAILED := 0)) \ |
0b347d8efb40
8187672: RunTest displays broken output if jtreg fails completely
ihse
parents:
47253
diff
changeset
|
458 |
$$(eval $1_ERROR := $$(shell $$(AWK) '{gsub(/[,;]/, ""); \ |
0b347d8efb40
8187672: RunTest displays broken output if jtreg fails completely
ihse
parents:
47253
diff
changeset
|
459 |
for (i=1; i<=NF; i++) { if ($$$$i == "error:") \ |
0b347d8efb40
8187672: RunTest displays broken output if jtreg fails completely
ihse
parents:
47253
diff
changeset
|
460 |
print $$$$(i+1) } }' $$($1_RESULT_FILE))) \ |
0b347d8efb40
8187672: RunTest displays broken output if jtreg fails completely
ihse
parents:
47253
diff
changeset
|
461 |
$$(if $$($1_ERROR), , $$(eval $1_ERROR := 0)) \ |
0b347d8efb40
8187672: RunTest displays broken output if jtreg fails completely
ihse
parents:
47253
diff
changeset
|
462 |
$$(eval $1_TOTAL := $$(shell \ |
0b347d8efb40
8187672: RunTest displays broken output if jtreg fails completely
ihse
parents:
47253
diff
changeset
|
463 |
$$(EXPR) $$($1_PASSED) + $$($1_FAILED) + $$($1_ERROR))) \ |
0b347d8efb40
8187672: RunTest displays broken output if jtreg fails completely
ihse
parents:
47253
diff
changeset
|
464 |
, \ |
0b347d8efb40
8187672: RunTest displays broken output if jtreg fails completely
ihse
parents:
47253
diff
changeset
|
465 |
$$(eval $1_PASSED := 0) \ |
0b347d8efb40
8187672: RunTest displays broken output if jtreg fails completely
ihse
parents:
47253
diff
changeset
|
466 |
$$(eval $1_FAILED := 0) \ |
0b347d8efb40
8187672: RunTest displays broken output if jtreg fails completely
ihse
parents:
47253
diff
changeset
|
467 |
$$(eval $1_ERROR := 1) \ |
0b347d8efb40
8187672: RunTest displays broken output if jtreg fails completely
ihse
parents:
47253
diff
changeset
|
468 |
$$(eval $1_TOTAL := 1) \ |
0b347d8efb40
8187672: RunTest displays broken output if jtreg fails completely
ihse
parents:
47253
diff
changeset
|
469 |
) |
44027 | 470 |
|
471 |
$1: run-test-$1 parse-test-$1 |
|
472 |
||
473 |
TARGETS += $1 |
|
474 |
endef |
|
475 |
||
476 |
||
477 |
################################################################################ |
|
478 |
# Setup and execute make rules for all selected tests |
|
479 |
################################################################################ |
|
480 |
||
481 |
# Helper function to determine which handler to use for the given test |
|
482 |
UseGtestTestHandler = \ |
|
483 |
$(if $(filter gtest:%, $1), true) |
|
484 |
||
485 |
UseJtregTestHandler = \ |
|
486 |
$(if $(filter jtreg:%, $1), true) |
|
487 |
||
488 |
# Now process each test to run and setup a proper make rule |
|
489 |
$(foreach test, $(TESTS_TO_RUN), \ |
|
490 |
$(eval TEST_ID := $(shell $(ECHO) $(strip $(test)) | \ |
|
491 |
$(TR) -cs '[a-z][A-Z][0-9]\n' '_')) \ |
|
492 |
$(eval ALL_TEST_IDS += $(TEST_ID)) \ |
|
493 |
$(if $(call UseCustomTestHandler, $(test)), \ |
|
494 |
$(eval $(call SetupRunCustomTest, $(TEST_ID), \ |
|
495 |
TEST := $(test), \ |
|
496 |
)) \ |
|
497 |
) \ |
|
498 |
$(if $(call UseGtestTestHandler, $(test)), \ |
|
499 |
$(eval $(call SetupRunGtestTest, $(TEST_ID), \ |
|
500 |
TEST := $(test), \ |
|
501 |
)) \ |
|
502 |
) \ |
|
503 |
$(if $(call UseJtregTestHandler, $(test)), \ |
|
504 |
$(eval $(call SetupRunJtregTest, $(TEST_ID), \ |
|
505 |
TEST := $(test), \ |
|
506 |
)) \ |
|
507 |
) \ |
|
508 |
) |
|
509 |
||
510 |
# Sort also removes duplicates, so if there is any we'll get fewer words. |
|
511 |
ifneq ($(words $(ALL_TEST_IDS)), $(words $(sort $(ALL_TEST_IDS)))) |
|
512 |
$(error Duplicate test specification) |
|
513 |
endif |
|
514 |
||
515 |
||
516 |
################################################################################ |
|
517 |
# The main target for RunTests.gmk |
|
518 |
################################################################################ |
|
519 |
||
520 |
# The SetupRun*Test functions have populated TARGETS. |
|
521 |
||
522 |
TEST_FAILURE := false |
|
523 |
||
524 |
run-test: $(TARGETS) |
|
47943 | 525 |
# Create and print a table of the result of all tests run |
526 |
$(RM) $(TEST_SUMMARY).old 2> /dev/null |
|
527 |
$(MV) $(TEST_SUMMARY) $(TEST_SUMMARY).old 2> /dev/null || true |
|
528 |
$(ECHO) >> $(TEST_SUMMARY) ============================== |
|
529 |
$(ECHO) >> $(TEST_SUMMARY) Test summary |
|
530 |
$(ECHO) >> $(TEST_SUMMARY) ============================== |
|
531 |
$(PRINTF) >> $(TEST_SUMMARY) "%2s %-49s %5s %5s %5s %5s %2s\n" " " \ |
|
532 |
TEST TOTAL PASS FAIL ERROR " " |
|
44027 | 533 |
$(foreach test, $(TESTS_TO_RUN), \ |
534 |
$(eval TEST_ID := $(shell $(ECHO) $(strip $(test)) | \ |
|
535 |
$(TR) -cs '[a-z][A-Z][0-9]\n' '_')) \ |
|
47937
c1437939b0d8
8177957: run-test summary lines look bad/misleading with long test names
ihse
parents:
47932
diff
changeset
|
536 |
$(eval NAME_PATTERN := $(shell $(ECHO) $(test) | $(TR) -c \\n _)) \ |
c1437939b0d8
8177957: run-test summary lines look bad/misleading with long test names
ihse
parents:
47932
diff
changeset
|
537 |
$(if $(filter __________________________________________________%, $(NAME_PATTERN)), \ |
c1437939b0d8
8177957: run-test summary lines look bad/misleading with long test names
ihse
parents:
47932
diff
changeset
|
538 |
$(eval TEST_NAME := ) \ |
47943 | 539 |
$(PRINTF) >> $(TEST_SUMMARY) "%2s %-49s\n" " " "$(test)" $(NEWLINE) \ |
47937
c1437939b0d8
8177957: run-test summary lines look bad/misleading with long test names
ihse
parents:
47932
diff
changeset
|
540 |
, \ |
c1437939b0d8
8177957: run-test summary lines look bad/misleading with long test names
ihse
parents:
47932
diff
changeset
|
541 |
$(eval TEST_NAME := $(test)) \ |
c1437939b0d8
8177957: run-test summary lines look bad/misleading with long test names
ihse
parents:
47932
diff
changeset
|
542 |
) \ |
44027 | 543 |
$(if $(filter $($(TEST_ID)_PASSED), $($(TEST_ID)_TOTAL)), \ |
47943 | 544 |
$(PRINTF) >> $(TEST_SUMMARY) "%2s %-49s %5d %5d %5d %5d %2s\n" \ |
545 |
" " "$(TEST_NAME)" $($(TEST_ID)_TOTAL) $($(TEST_ID)_PASSED) \ |
|
546 |
$($(TEST_ID)_FAILED) $($(TEST_ID)_ERROR) " " $(NEWLINE) \ |
|
44027 | 547 |
, \ |
47943 | 548 |
$(PRINTF) >> $(TEST_SUMMARY) "%2s %-49s %5d %5d %5d %5d %2s\n" \ |
549 |
">>" "$(TEST_NAME)" $($(TEST_ID)_TOTAL) $($(TEST_ID)_PASSED) \ |
|
550 |
$($(TEST_ID)_FAILED) $($(TEST_ID)_ERROR) "<<" $(NEWLINE) \ |
|
44027 | 551 |
$(eval TEST_FAILURE := true) \ |
552 |
) \ |
|
553 |
) |
|
47943 | 554 |
$(ECHO) >> $(TEST_SUMMARY) ============================== |
44027 | 555 |
$(if $(filter true, $(TEST_FAILURE)), \ |
47943 | 556 |
$(ECHO) >> $(TEST_SUMMARY) TEST FAILURE $(NEWLINE) \ |
557 |
$(MKDIR) -p $(MAKESUPPORT_OUTPUTDIR) $(NEWLINE) \ |
|
44027 | 558 |
$(TOUCH) $(MAKESUPPORT_OUTPUTDIR)/exit-with-error \ |
559 |
, \ |
|
47943 | 560 |
$(ECHO) >> $(TEST_SUMMARY) TEST SUCCESS \ |
44027 | 561 |
) |
562 |
$(ECHO) |
|
47943 | 563 |
$(CAT) $(TEST_SUMMARY) |
564 |
$(ECHO) |
|
44027 | 565 |
|
566 |
################################################################################ |
|
567 |
||
568 |
all: run-test |
|
569 |
||
570 |
.PHONY: default all run-test $(TARGETS) |