author | herrick |
Thu, 25 Jul 2019 08:24:01 -0400 | |
branch | JDK-8200758-branch |
changeset 57532 | eb0bd96672f4 |
parent 57493 | b95ebdbf68ca |
child 57681 | 41f2f2829a09 |
permissions | -rw-r--r-- |
44027 | 1 |
# |
53295
520f8e2041bb
8215729: Enhance makefiles to allow collecting code coverage with JCov
shurailine
parents:
52790
diff
changeset
|
2 |
# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. |
44027 | 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 |
||
47956
72a474c85aee
8177956: Add TEST_VM_OPTS as convenience for run-test arguments
ihse
parents:
47943
diff
changeset
|
35 |
################################################################################ |
72a474c85aee
8177956: Add TEST_VM_OPTS as convenience for run-test arguments
ihse
parents:
47943
diff
changeset
|
36 |
# Parse global control variables |
72a474c85aee
8177956: Add TEST_VM_OPTS as convenience for run-test arguments
ihse
parents:
47943
diff
changeset
|
37 |
################################################################################ |
72a474c85aee
8177956: Add TEST_VM_OPTS as convenience for run-test arguments
ihse
parents:
47943
diff
changeset
|
38 |
|
72a474c85aee
8177956: Add TEST_VM_OPTS as convenience for run-test arguments
ihse
parents:
47943
diff
changeset
|
39 |
ifneq ($(TEST_VM_OPTS), ) |
72a474c85aee
8177956: Add TEST_VM_OPTS as convenience for run-test arguments
ihse
parents:
47943
diff
changeset
|
40 |
ifneq ($(TEST_OPTS), ) |
72a474c85aee
8177956: Add TEST_VM_OPTS as convenience for run-test arguments
ihse
parents:
47943
diff
changeset
|
41 |
TEST_OPTS := $(TEST_OPTS);VM_OPTIONS=$(TEST_VM_OPTS) |
72a474c85aee
8177956: Add TEST_VM_OPTS as convenience for run-test arguments
ihse
parents:
47943
diff
changeset
|
42 |
else |
72a474c85aee
8177956: Add TEST_VM_OPTS as convenience for run-test arguments
ihse
parents:
47943
diff
changeset
|
43 |
TEST_OPTS := VM_OPTIONS=$(TEST_VM_OPTS) |
72a474c85aee
8177956: Add TEST_VM_OPTS as convenience for run-test arguments
ihse
parents:
47943
diff
changeset
|
44 |
endif |
72a474c85aee
8177956: Add TEST_VM_OPTS as convenience for run-test arguments
ihse
parents:
47943
diff
changeset
|
45 |
endif |
72a474c85aee
8177956: Add TEST_VM_OPTS as convenience for run-test arguments
ihse
parents:
47943
diff
changeset
|
46 |
|
72a474c85aee
8177956: Add TEST_VM_OPTS as convenience for run-test arguments
ihse
parents:
47943
diff
changeset
|
47 |
$(eval $(call ParseKeywordVariable, TEST_OPTS, \ |
53464 | 48 |
SINGLE_KEYWORDS := JOBS TIMEOUT_FACTOR JCOV, \ |
49 |
STRING_KEYWORDS := VM_OPTIONS JAVA_OPTIONS AOT_MODULES, \ |
|
47956
72a474c85aee
8177956: Add TEST_VM_OPTS as convenience for run-test arguments
ihse
parents:
47943
diff
changeset
|
50 |
)) |
72a474c85aee
8177956: Add TEST_VM_OPTS as convenience for run-test arguments
ihse
parents:
47943
diff
changeset
|
51 |
|
72a474c85aee
8177956: Add TEST_VM_OPTS as convenience for run-test arguments
ihse
parents:
47943
diff
changeset
|
52 |
# Helper function to propagate TEST_OPTS values. |
72a474c85aee
8177956: Add TEST_VM_OPTS as convenience for run-test arguments
ihse
parents:
47943
diff
changeset
|
53 |
# |
72a474c85aee
8177956: Add TEST_VM_OPTS as convenience for run-test arguments
ihse
parents:
47943
diff
changeset
|
54 |
# Note: No spaces are allowed around the arguments. |
72a474c85aee
8177956: Add TEST_VM_OPTS as convenience for run-test arguments
ihse
parents:
47943
diff
changeset
|
55 |
# Arg $1 The variable in TEST_OPTS to propagate |
72a474c85aee
8177956: Add TEST_VM_OPTS as convenience for run-test arguments
ihse
parents:
47943
diff
changeset
|
56 |
# Arg $2 The control variable to propagate it to |
72a474c85aee
8177956: Add TEST_VM_OPTS as convenience for run-test arguments
ihse
parents:
47943
diff
changeset
|
57 |
define SetTestOpt |
72a474c85aee
8177956: Add TEST_VM_OPTS as convenience for run-test arguments
ihse
parents:
47943
diff
changeset
|
58 |
ifneq ($$(TEST_OPTS_$1), ) |
72a474c85aee
8177956: Add TEST_VM_OPTS as convenience for run-test arguments
ihse
parents:
47943
diff
changeset
|
59 |
$2_$1 := $$(TEST_OPTS_$1) |
72a474c85aee
8177956: Add TEST_VM_OPTS as convenience for run-test arguments
ihse
parents:
47943
diff
changeset
|
60 |
endif |
72a474c85aee
8177956: Add TEST_VM_OPTS as convenience for run-test arguments
ihse
parents:
47943
diff
changeset
|
61 |
endef |
72a474c85aee
8177956: Add TEST_VM_OPTS as convenience for run-test arguments
ihse
parents:
47943
diff
changeset
|
62 |
|
49147
af37d9997bd6
8199197: Set _NT_SYMBOL_PATH when running tests on windows
erikj
parents:
48061
diff
changeset
|
63 |
# Setup _NT_SYMBOL_PATH on Windows |
53683 | 64 |
ifeq ($(call isTargetOs, windows), true) |
49147
af37d9997bd6
8199197: Set _NT_SYMBOL_PATH when running tests on windows
erikj
parents:
48061
diff
changeset
|
65 |
ifndef _NT_SYMBOL_PATH |
af37d9997bd6
8199197: Set _NT_SYMBOL_PATH when running tests on windows
erikj
parents:
48061
diff
changeset
|
66 |
# Can't use PathList here as it adds quotes around the value. |
af37d9997bd6
8199197: Set _NT_SYMBOL_PATH when running tests on windows
erikj
parents:
48061
diff
changeset
|
67 |
_NT_SYMBOL_PATH := \ |
52295
57d299cdd068
8213005: Missing symbols in hs_err files on Windows after JDK-8212028
erikj
parents:
52125
diff
changeset
|
68 |
$(subst $(SPACE),;,$(strip \ |
57d299cdd068
8213005: Missing symbols in hs_err files on Windows after JDK-8212028
erikj
parents:
52125
diff
changeset
|
69 |
$(foreach p, $(sort $(dir $(wildcard \ |
57d299cdd068
8213005: Missing symbols in hs_err files on Windows after JDK-8212028
erikj
parents:
52125
diff
changeset
|
70 |
$(addprefix $(SYMBOLS_IMAGE_DIR)/bin/, *.pdb */*.pdb)))), \ |
57d299cdd068
8213005: Missing symbols in hs_err files on Windows after JDK-8212028
erikj
parents:
52125
diff
changeset
|
71 |
$(call FixPath, $p) \ |
57d299cdd068
8213005: Missing symbols in hs_err files on Windows after JDK-8212028
erikj
parents:
52125
diff
changeset
|
72 |
) \ |
57d299cdd068
8213005: Missing symbols in hs_err files on Windows after JDK-8212028
erikj
parents:
52125
diff
changeset
|
73 |
)) |
49147
af37d9997bd6
8199197: Set _NT_SYMBOL_PATH when running tests on windows
erikj
parents:
48061
diff
changeset
|
74 |
export _NT_SYMBOL_PATH |
53485 | 75 |
$(call LogDebug, Rewriting _NT_SYMBOL_PATH to $(_NT_SYMBOL_PATH)) |
49147
af37d9997bd6
8199197: Set _NT_SYMBOL_PATH when running tests on windows
erikj
parents:
48061
diff
changeset
|
76 |
endif |
af37d9997bd6
8199197: Set _NT_SYMBOL_PATH when running tests on windows
erikj
parents:
48061
diff
changeset
|
77 |
endif |
af37d9997bd6
8199197: Set _NT_SYMBOL_PATH when running tests on windows
erikj
parents:
48061
diff
changeset
|
78 |
|
47956
72a474c85aee
8177956: Add TEST_VM_OPTS as convenience for run-test arguments
ihse
parents:
47943
diff
changeset
|
79 |
################################################################################ |
44027 | 80 |
# Hook to include the corresponding custom file, if present. |
47314 | 81 |
$(eval $(call IncludeCustomExtension, RunTests.gmk)) |
47956
72a474c85aee
8177956: Add TEST_VM_OPTS as convenience for run-test arguments
ihse
parents:
47943
diff
changeset
|
82 |
################################################################################ |
44027 | 83 |
|
53485 | 84 |
# This is the JDK that we will test |
85 |
JDK_UNDER_TEST := $(JDK_IMAGE_DIR) |
|
86 |
||
47253
92fd0e04e0e1
8187544: Replace BUILD_OUTPUT and OUTPUT_ROOT with OUTPUTDIR
ihse
parents:
47218
diff
changeset
|
87 |
TEST_RESULTS_DIR := $(OUTPUTDIR)/test-results |
92fd0e04e0e1
8187544: Replace BUILD_OUTPUT and OUTPUT_ROOT with OUTPUTDIR
ihse
parents:
47218
diff
changeset
|
88 |
TEST_SUPPORT_DIR := $(OUTPUTDIR)/test-support |
47943 | 89 |
TEST_SUMMARY := $(TEST_RESULTS_DIR)/test-summary.txt |
48042 | 90 |
TEST_LAST_IDS := $(TEST_SUPPORT_DIR)/test-last-ids.txt |
44027 | 91 |
|
47937
c1437939b0d8
8177957: run-test summary lines look bad/misleading with long test names
ihse
parents:
47932
diff
changeset
|
92 |
ifeq ($(CUSTOM_ROOT), ) |
c1437939b0d8
8177957: run-test summary lines look bad/misleading with long test names
ihse
parents:
47932
diff
changeset
|
93 |
JTREG_TOPDIR := $(TOPDIR) |
c1437939b0d8
8177957: run-test summary lines look bad/misleading with long test names
ihse
parents:
47932
diff
changeset
|
94 |
else |
c1437939b0d8
8177957: run-test summary lines look bad/misleading with long test names
ihse
parents:
47932
diff
changeset
|
95 |
JTREG_TOPDIR := $(CUSTOM_ROOT) |
c1437939b0d8
8177957: run-test summary lines look bad/misleading with long test names
ihse
parents:
47932
diff
changeset
|
96 |
endif |
44027 | 97 |
|
47986 | 98 |
JTREG_FAILURE_HANDLER_DIR := $(TEST_IMAGE_DIR)/failure_handler |
99 |
JTREG_FAILURE_HANDLER := $(JTREG_FAILURE_HANDLER_DIR)/jtregFailureHandler.jar |
|
100 |
||
101 |
ifneq ($(wildcard $(JTREG_FAILURE_HANDLER)), ) |
|
102 |
JTREG_FAILURE_HANDLER_OPTIONS := \ |
|
103 |
-timeoutHandlerDir:$(JTREG_FAILURE_HANDLER) \ |
|
104 |
-observerDir:$(JTREG_FAILURE_HANDLER) \ |
|
105 |
-timeoutHandler:jdk.test.failurehandler.jtreg.GatherProcessInfoTimeoutHandler \ |
|
106 |
-observer:jdk.test.failurehandler.jtreg.GatherDiagnosticInfoObserver \ |
|
107 |
-timeoutHandlerTimeout:0 |
|
108 |
endif |
|
109 |
||
53464 | 110 |
GTEST_LAUNCHER_DIRS := $(patsubst %/gtestLauncher, %, \ |
111 |
$(wildcard $(TEST_IMAGE_DIR)/hotspot/gtest/*/gtestLauncher)) |
|
112 |
GTEST_VARIANTS := $(strip $(patsubst $(TEST_IMAGE_DIR)/hotspot/gtest/%, %, \ |
|
113 |
$(GTEST_LAUNCHER_DIRS))) |
|
48058
c5eefa465e37
8192995: run-test gtest should use all jvm variants, not just "server"
ihse
parents:
48042
diff
changeset
|
114 |
|
53857 | 115 |
COV_ENVIRONMENT := |
116 |
JTREG_COV_OPTIONS := |
|
117 |
||
53485 | 118 |
ifeq ($(TEST_OPTS_JCOV), true) |
119 |
JCOV_OUTPUT_DIR := $(TEST_RESULTS_DIR)/jcov-output |
|
120 |
JCOV_GRABBER_LOG := $(JCOV_OUTPUT_DIR)/grabber.log |
|
121 |
JCOV_RESULT_FILE := $(JCOV_OUTPUT_DIR)/result.xml |
|
122 |
JCOV_REPORT := $(JCOV_OUTPUT_DIR)/report |
|
123 |
JCOV_MEM_OPTIONS := -Xms64m -Xmx4g |
|
124 |
||
53526
688ce88f89cd
8217761: Enhance run-test-prebuilt jib profile to support running tests with JCov
shurailine
parents:
53485
diff
changeset
|
125 |
# Replace our normal test JDK with the JCov image. |
688ce88f89cd
8217761: Enhance run-test-prebuilt jib profile to support running tests with JCov
shurailine
parents:
53485
diff
changeset
|
126 |
JDK_UNDER_TEST := $(JCOV_IMAGE_DIR) |
53485 | 127 |
|
53857 | 128 |
COV_ENVIRONMENT += JAVA_TOOL_OPTIONS="$(JCOV_MEM_OPTIONS)" \ |
53485 | 129 |
_JAVA_OPTIONS="$(JCOV_MEM_OPTIONS)" |
53857 | 130 |
JTREG_COV_OPTIONS += -e:JAVA_TOOL_OPTIONS='$(JCOV_MEM_OPTIONS)' \ |
53485 | 131 |
-e:_JAVA_OPTIONS='$(JCOV_MEM_OPTIONS)' |
132 |
endif |
|
133 |
||
53857 | 134 |
ifeq ($(GCOV_ENABLED), true) |
135 |
GCOV_OUTPUT_DIR := $(TEST_RESULTS_DIR)/gcov-output |
|
136 |
COV_ENVIRONMENT += GCOV_PREFIX="$(GCOV_OUTPUT_DIR)" |
|
137 |
JTREG_COV_OPTIONS += -e:GCOV_PREFIX="$(GCOV_OUTPUT_DIR)" |
|
138 |
endif |
|
139 |
||
44027 | 140 |
################################################################################ |
52393
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
141 |
# Optionally create AOT libraries for specified modules before running tests. |
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
142 |
# Note, this could not be done during JDK build time. |
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
143 |
################################################################################ |
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
144 |
|
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
145 |
# Note, this could not be done during JDK build time. |
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
146 |
|
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
147 |
# Parameter 1 is the name of the rule. |
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
148 |
# |
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
149 |
# Remaining parameters are named arguments. |
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
150 |
# MODULE The module to generate a library for |
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
151 |
# BIN Output directory in which to put the library |
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
152 |
# VM_OPTIONS List of JVM arguments to use when creating library |
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
153 |
# OPTIONS_VAR Name of variable to put AOT java options in |
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
154 |
# PREREQS_VAR Name of variable to put all AOT prerequisite rule targets in |
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
155 |
# for test rules to depend on |
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
156 |
# |
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
157 |
SetupAotModule = $(NamedParamsMacroTemplate) |
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
158 |
define SetupAotModuleBody |
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
159 |
$1_AOT_LIB := $$($1_BIN)/$$(call SHARED_LIBRARY,$$($1_MODULE)) |
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
160 |
$1_AOT_CCLIST := $$(wildcard $$(TOPDIR)/test/hotspot/jtreg/compiler/aot/scripts/$$($1_MODULE)-list.txt) |
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
161 |
|
52790
290b04fd1846
8214557: Filter out VM flags which don't affect AOT code generation
epavlova
parents:
52595
diff
changeset
|
162 |
# Create jaotc flags. |
53464 | 163 |
# VM flags which don't affect AOT code generation are filtered out: |
164 |
# -Xcomp, -XX:+-TieredCompilation |
|
52393
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
165 |
$1_JAOTC_OPTS := \ |
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
166 |
-J-Xmx4g --info \ |
52790
290b04fd1846
8214557: Filter out VM flags which don't affect AOT code generation
epavlova
parents:
52595
diff
changeset
|
167 |
$$(addprefix -J, $$(filter-out -Xcomp %TieredCompilation, $$($1_VM_OPTIONS))) \ |
52393
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
168 |
$$(addprefix --compile-commands$(SPACE), $$($1_AOT_CCLIST)) \ |
53460
65c813da7c65
8217613: [AOT] TEST_OPTS_AOT_MODULES doesn't work on mac
erikj
parents:
53295
diff
changeset
|
169 |
--linker-path $$(LD_JAOTC) \ |
52393
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
170 |
# |
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
171 |
|
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
172 |
ifneq ($$(filter -ea, $$($1_VM_OPTIONS)), ) |
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
173 |
$1_JAOTC_OPTS += --compile-with-assertions |
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
174 |
endif |
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
175 |
|
53485 | 176 |
$$($1_AOT_LIB): $$(JDK_UNDER_TEST)/release \ |
52393
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
177 |
$$(call DependOnVariable, $1_JAOTC_OPTS) \ |
53485 | 178 |
$$(call DependOnVariable, JDK_UNDER_TEST) |
52393
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
179 |
$$(call LogWarn, Generating $$(patsubst $$(OUTPUTDIR)/%, %, $$@)) |
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
180 |
$$(call MakeTargetDir) |
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
181 |
$$(call ExecuteWithLog, $$@, \ |
53857 | 182 |
$((COV_ENVIRONMENT) \ |
53485 | 183 |
$$(FIXPATH) $$(JDK_UNDER_TEST)/bin/jaotc \ |
53460
65c813da7c65
8217613: [AOT] TEST_OPTS_AOT_MODULES doesn't work on mac
erikj
parents:
53295
diff
changeset
|
184 |
$$($1_JAOTC_OPTS) --output $$@ --module $$($1_MODULE) \ |
52393
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
185 |
) |
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
186 |
$$(call ExecuteWithLog, $$@.check, \ |
53485 | 187 |
$$(FIXPATH) $$(JDK_UNDER_TEST)/bin/java \ |
53460
65c813da7c65
8217613: [AOT] TEST_OPTS_AOT_MODULES doesn't work on mac
erikj
parents:
53295
diff
changeset
|
188 |
$$($1_VM_OPTIONS) -XX:+UnlockDiagnosticVMOptions \ |
65c813da7c65
8217613: [AOT] TEST_OPTS_AOT_MODULES doesn't work on mac
erikj
parents:
53295
diff
changeset
|
189 |
-XX:+PrintAOT -XX:+UseAOTStrictLoading \ |
65c813da7c65
8217613: [AOT] TEST_OPTS_AOT_MODULES doesn't work on mac
erikj
parents:
53295
diff
changeset
|
190 |
-XX:AOTLibrary=$$@ -version \ |
65c813da7c65
8217613: [AOT] TEST_OPTS_AOT_MODULES doesn't work on mac
erikj
parents:
53295
diff
changeset
|
191 |
> $$@.verify-aot \ |
52393
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
192 |
) |
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
193 |
|
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
194 |
$1_AOT_OPTIONS += -XX:AOTLibrary=$$($1_AOT_LIB) |
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
195 |
$1_AOT_TARGETS += $$($1_AOT_LIB) |
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
196 |
endef |
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
197 |
|
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
198 |
# Parameter 1 is the name of the rule. |
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
199 |
# |
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
200 |
# Remaining parameters are named arguments. |
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
201 |
# MODULES The modules to generate a library for |
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
202 |
# VM_OPTIONS List of JVM arguments to use when creating libraries |
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
203 |
# |
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
204 |
# After calling this, the following variables are defined |
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
205 |
# $1_AOT_OPTIONS List of all java options needed to use the AOT libraries |
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
206 |
# $1_AOT_TARGETS List of all targets that the test rule will need to depend on |
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
207 |
# |
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
208 |
SetupAot = $(NamedParamsMacroTemplate) |
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
209 |
define SetupAotBody |
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
210 |
$$(info Running with AOTd libraries for $$($1_MODULES)) |
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
211 |
# Put aot libraries in a separate directory so they are not deleted between |
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
212 |
# test runs and may be reused between make invocations. |
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
213 |
$$(foreach m, $$($1_MODULES), \ |
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
214 |
$$(eval $$(call SetupAotModule, $1_$$m, \ |
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
215 |
MODULE := $$m, \ |
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
216 |
BIN := $$(TEST_SUPPORT_DIR)/aot/$1, \ |
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
217 |
VM_OPTIONS := $$($1_VM_OPTIONS), \ |
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
218 |
)) \ |
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
219 |
$$(eval $1_AOT_OPTIONS += $$($1_$$m_AOT_OPTIONS)) \ |
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
220 |
$$(eval $1_AOT_TARGETS += $$($1_$$m_AOT_TARGETS)) \ |
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
221 |
) |
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
222 |
endef |
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
223 |
|
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
224 |
################################################################################ |
52125
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
51856
diff
changeset
|
225 |
# Setup global test running parameters |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
51856
diff
changeset
|
226 |
################################################################################ |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
51856
diff
changeset
|
227 |
|
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
51856
diff
changeset
|
228 |
# Each factor variable comes in 3 variants. The first one is reserved for users |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
51856
diff
changeset
|
229 |
# to use on command line. The other two are for predifined configurations in JDL |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
51856
diff
changeset
|
230 |
# and for machine specific configurations respectively. |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
51856
diff
changeset
|
231 |
TEST_JOBS_FACTOR ?= 1 |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
51856
diff
changeset
|
232 |
TEST_JOBS_FACTOR_JDL ?= 1 |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
51856
diff
changeset
|
233 |
TEST_JOBS_FACTOR_MACHINE ?= 1 |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
51856
diff
changeset
|
234 |
|
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
51856
diff
changeset
|
235 |
ifeq ($(TEST_JOBS), 0) |
52556
6b05634db714
8211727: Adjust default concurrency settings for running tests on Sparc
erikj
parents:
52396
diff
changeset
|
236 |
CORES_DIVIDER := 2 |
53683 | 237 |
ifeq ($(call isTargetCpuArch, sparc), true) |
52556
6b05634db714
8211727: Adjust default concurrency settings for running tests on Sparc
erikj
parents:
52396
diff
changeset
|
238 |
# For smaller SPARC machines we see reasonable scaling of throughput up to |
6b05634db714
8211727: Adjust default concurrency settings for running tests on Sparc
erikj
parents:
52396
diff
changeset
|
239 |
# cpus/4 without affecting test reliability. On the bigger machines, cpus/4 |
6b05634db714
8211727: Adjust default concurrency settings for running tests on Sparc
erikj
parents:
52396
diff
changeset
|
240 |
# causes intermittent timeouts. |
6b05634db714
8211727: Adjust default concurrency settings for running tests on Sparc
erikj
parents:
52396
diff
changeset
|
241 |
ifeq ($(shell $(EXPR) $(NUM_CORES) \> 16), 1) |
6b05634db714
8211727: Adjust default concurrency settings for running tests on Sparc
erikj
parents:
52396
diff
changeset
|
242 |
CORES_DIVIDER := 5 |
6b05634db714
8211727: Adjust default concurrency settings for running tests on Sparc
erikj
parents:
52396
diff
changeset
|
243 |
else |
6b05634db714
8211727: Adjust default concurrency settings for running tests on Sparc
erikj
parents:
52396
diff
changeset
|
244 |
CORES_DIVIDER := 4 |
6b05634db714
8211727: Adjust default concurrency settings for running tests on Sparc
erikj
parents:
52396
diff
changeset
|
245 |
endif |
6b05634db714
8211727: Adjust default concurrency settings for running tests on Sparc
erikj
parents:
52396
diff
changeset
|
246 |
endif |
52593
8c887dcd5d90
8214003: Limit default test jobs based on memory size
erikj
parents:
52556
diff
changeset
|
247 |
MEMORY_DIVIDER := 2048 |
52125
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
51856
diff
changeset
|
248 |
TEST_JOBS := $(shell $(AWK) \ |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
51856
diff
changeset
|
249 |
'BEGIN { \ |
52556
6b05634db714
8211727: Adjust default concurrency settings for running tests on Sparc
erikj
parents:
52396
diff
changeset
|
250 |
c = $(NUM_CORES) / $(CORES_DIVIDER); \ |
52593
8c887dcd5d90
8214003: Limit default test jobs based on memory size
erikj
parents:
52556
diff
changeset
|
251 |
m = $(MEMORY_SIZE) / $(MEMORY_DIVIDER); \ |
8c887dcd5d90
8214003: Limit default test jobs based on memory size
erikj
parents:
52556
diff
changeset
|
252 |
if (c > m) c = m; \ |
52125
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
51856
diff
changeset
|
253 |
c = c * $(TEST_JOBS_FACTOR); \ |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
51856
diff
changeset
|
254 |
c = c * $(TEST_JOBS_FACTOR_JDL); \ |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
51856
diff
changeset
|
255 |
c = c * $(TEST_JOBS_FACTOR_MACHINE); \ |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
51856
diff
changeset
|
256 |
if (c < 1) c = 1; \ |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
51856
diff
changeset
|
257 |
printf "%.0f", c; \ |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
51856
diff
changeset
|
258 |
}') |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
51856
diff
changeset
|
259 |
endif |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
51856
diff
changeset
|
260 |
|
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
51856
diff
changeset
|
261 |
################################################################################ |
44027 | 262 |
# Parse control variables |
263 |
################################################################################ |
|
264 |
||
47956
72a474c85aee
8177956: Add TEST_VM_OPTS as convenience for run-test arguments
ihse
parents:
47943
diff
changeset
|
265 |
ifneq ($(TEST_OPTS), ) |
72a474c85aee
8177956: Add TEST_VM_OPTS as convenience for run-test arguments
ihse
parents:
47943
diff
changeset
|
266 |
# Inform the user |
72a474c85aee
8177956: Add TEST_VM_OPTS as convenience for run-test arguments
ihse
parents:
47943
diff
changeset
|
267 |
$(info Running tests using TEST_OPTS control variable '$(TEST_OPTS)') |
72a474c85aee
8177956: Add TEST_VM_OPTS as convenience for run-test arguments
ihse
parents:
47943
diff
changeset
|
268 |
endif |
72a474c85aee
8177956: Add TEST_VM_OPTS as convenience for run-test arguments
ihse
parents:
47943
diff
changeset
|
269 |
|
52595
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
270 |
### Jtreg |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
271 |
|
52125
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
51856
diff
changeset
|
272 |
$(eval $(call SetTestOpt,VM_OPTIONS,JTREG)) |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
51856
diff
changeset
|
273 |
$(eval $(call SetTestOpt,JAVA_OPTIONS,JTREG)) |
52393
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
274 |
$(eval $(call SetTestOpt,AOT_MODULES,JTREG)) |
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
275 |
|
52125
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
51856
diff
changeset
|
276 |
$(eval $(call SetTestOpt,JOBS,JTREG)) |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
51856
diff
changeset
|
277 |
$(eval $(call SetTestOpt,TIMEOUT_FACTOR,JTREG)) |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
51856
diff
changeset
|
278 |
|
44027 | 279 |
$(eval $(call ParseKeywordVariable, JTREG, \ |
53464 | 280 |
SINGLE_KEYWORDS := JOBS TIMEOUT_FACTOR TEST_MODE ASSERT VERBOSE RETAIN \ |
57493
b95ebdbf68ca
8226910: make it possible to use jtreg's -match via run-test framework
iignatyev
parents:
55193
diff
changeset
|
281 |
MAX_MEM RUN_PROBLEM_LISTS, \ |
53464 | 282 |
STRING_KEYWORDS := OPTIONS JAVA_OPTIONS VM_OPTIONS KEYWORDS \ |
283 |
EXTRA_PROBLEM_LISTS AOT_MODULES, \ |
|
44027 | 284 |
)) |
285 |
||
286 |
ifneq ($(JTREG), ) |
|
287 |
# Inform the user |
|
288 |
$(info Running tests using JTREG control variable '$(JTREG)') |
|
289 |
endif |
|
290 |
||
52595
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
291 |
### Gtest |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
292 |
|
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
293 |
$(eval $(call SetTestOpt,VM_OPTIONS,GTEST)) |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
294 |
$(eval $(call SetTestOpt,JAVA_OPTIONS,GTEST)) |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
295 |
$(eval $(call SetTestOpt,AOT_MODULES,GTEST)) |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
296 |
|
44027 | 297 |
$(eval $(call ParseKeywordVariable, GTEST, \ |
53464 | 298 |
SINGLE_KEYWORDS := REPEAT, \ |
299 |
STRING_KEYWORDS := OPTIONS VM_OPTIONS JAVA_OPTIONS AOT_MODULES, \ |
|
44027 | 300 |
)) |
301 |
||
302 |
ifneq ($(GTEST), ) |
|
303 |
# Inform the user |
|
304 |
$(info Running tests using GTEST control variable '$(GTEST)') |
|
305 |
endif |
|
306 |
||
52595
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
307 |
### Microbenchmarks |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
308 |
|
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
309 |
$(eval $(call SetTestOpt,VM_OPTIONS,MICRO)) |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
310 |
$(eval $(call SetTestOpt,JAVA_OPTIONS,MICRO)) |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
311 |
|
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
312 |
$(eval $(call ParseKeywordVariable, MICRO, \ |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
313 |
SINGLE_KEYWORDS := ITER FORK TIME WARMUP_ITER WARMUP_TIME, \ |
53464 | 314 |
STRING_KEYWORDS := OPTIONS JAVA_OPTIONS VM_OPTIONS RESULTS_FORMAT TEST_JDK \ |
315 |
BENCHMARKS_JAR, \ |
|
52595
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
316 |
)) |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
317 |
|
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
318 |
ifneq ($(MICRO), ) |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
319 |
# Inform the user |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
320 |
$(info Running tests using MICRO control variable '$(MICRO)') |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
321 |
endif |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
322 |
|
44027 | 323 |
|
324 |
################################################################################ |
|
325 |
# Component-specific Jtreg settings |
|
326 |
################################################################################ |
|
327 |
||
328 |
hotspot_JTREG_MAX_MEM := 0 |
|
329 |
hotspot_JTREG_ASSERT := false |
|
330 |
hotspot_JTREG_NATIVEPATH := $(TEST_IMAGE_DIR)/hotspot/jtreg/native |
|
331 |
jdk_JTREG_NATIVEPATH := $(TEST_IMAGE_DIR)/jdk/jtreg/native |
|
332 |
||
47941
d91b0d2d45cb
8179554: make run-test does not respect ProblemList.txt
ihse
parents:
47939
diff
changeset
|
333 |
jdk_JTREG_PROBLEM_LIST += $(TOPDIR)/test/jdk/ProblemList.txt |
d91b0d2d45cb
8179554: make run-test does not respect ProblemList.txt
ihse
parents:
47939
diff
changeset
|
334 |
jaxp_JTREG_PROBLEM_LIST += $(TOPDIR)/test/jaxp/ProblemList.txt |
d91b0d2d45cb
8179554: make run-test does not respect ProblemList.txt
ihse
parents:
47939
diff
changeset
|
335 |
langtools_JTREG_PROBLEM_LIST += $(TOPDIR)/test/langtools/ProblemList.txt |
d91b0d2d45cb
8179554: make run-test does not respect ProblemList.txt
ihse
parents:
47939
diff
changeset
|
336 |
nashorn_JTREG_PROBLEM_LIST += $(TOPDIR)/test/nashorn/ProblemList.txt |
d91b0d2d45cb
8179554: make run-test does not respect ProblemList.txt
ihse
parents:
47939
diff
changeset
|
337 |
hotspot_JTREG_PROBLEM_LIST += $(TOPDIR)/test/hotspot/jtreg/ProblemList.txt |
44027 | 338 |
|
52125
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
51856
diff
changeset
|
339 |
langtools_JTREG_MAX_MEM := 768m |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
51856
diff
changeset
|
340 |
|
44027 | 341 |
################################################################################ |
342 |
# Parse test selection |
|
343 |
# |
|
344 |
# The user has given a test selection in the TEST variable. We must parse it |
|
345 |
# and determine what that means in terms of actual calls to the test framework. |
|
346 |
# |
|
347 |
# The parse functions take as argument a test specification as given by the |
|
348 |
# user, and returns a fully qualified test descriptor if it was a match, or |
|
349 |
# nothing if not. A single test specification can result in multiple test |
|
350 |
# descriptors being returned. A valid test descriptor must always be accepted |
|
351 |
# and returned identically. |
|
352 |
################################################################################ |
|
353 |
||
354 |
# Helper function to determine if a test specification is a Gtest test |
|
355 |
# |
|
356 |
# It is a Gtest test if it is either "gtest", or "gtest:" followed by an optional |
|
48058
c5eefa465e37
8192995: run-test gtest should use all jvm variants, not just "server"
ihse
parents:
48042
diff
changeset
|
357 |
# test filter string, and an optional "/<variant>" to select a specific JVM |
c5eefa465e37
8192995: run-test gtest should use all jvm variants, not just "server"
ihse
parents:
48042
diff
changeset
|
358 |
# variant. If no variant is specified, all found variants are tested. |
44027 | 359 |
define ParseGtestTestSelection |
360 |
$(if $(filter gtest%, $1), \ |
|
361 |
$(if $(filter gtest, $1), \ |
|
48058
c5eefa465e37
8192995: run-test gtest should use all jvm variants, not just "server"
ihse
parents:
48042
diff
changeset
|
362 |
$(addprefix gtest:all/, $(GTEST_VARIANTS)) \ |
44027 | 363 |
, \ |
48058
c5eefa465e37
8192995: run-test gtest should use all jvm variants, not just "server"
ihse
parents:
48042
diff
changeset
|
364 |
$(if $(strip $(or $(filter gtest/%, $1) $(filter gtest:/%, $1))), \ |
c5eefa465e37
8192995: run-test gtest should use all jvm variants, not just "server"
ihse
parents:
48042
diff
changeset
|
365 |
$(patsubst gtest:/%, gtest:all/%, $(patsubst gtest/%, gtest:/%, $1)) \ |
44027 | 366 |
, \ |
48058
c5eefa465e37
8192995: run-test gtest should use all jvm variants, not just "server"
ihse
parents:
48042
diff
changeset
|
367 |
$(if $(filter gtest:%, $1), \ |
c5eefa465e37
8192995: run-test gtest should use all jvm variants, not just "server"
ihse
parents:
48042
diff
changeset
|
368 |
$(if $(findstring /, $1), \ |
c5eefa465e37
8192995: run-test gtest should use all jvm variants, not just "server"
ihse
parents:
48042
diff
changeset
|
369 |
$1 \ |
c5eefa465e37
8192995: run-test gtest should use all jvm variants, not just "server"
ihse
parents:
48042
diff
changeset
|
370 |
, \ |
c5eefa465e37
8192995: run-test gtest should use all jvm variants, not just "server"
ihse
parents:
48042
diff
changeset
|
371 |
$(addprefix $1/, $(GTEST_VARIANTS)) \ |
c5eefa465e37
8192995: run-test gtest should use all jvm variants, not just "server"
ihse
parents:
48042
diff
changeset
|
372 |
) \ |
c5eefa465e37
8192995: run-test gtest should use all jvm variants, not just "server"
ihse
parents:
48042
diff
changeset
|
373 |
) \ |
44027 | 374 |
) \ |
375 |
) \ |
|
376 |
) |
|
377 |
endef |
|
378 |
||
52595
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
379 |
# Helper function to determine if a test specification is a microbenchmark test |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
380 |
# |
53464 | 381 |
# It is a microbenchmark test if it is either "micro", or "micro:" followed by |
382 |
# an optional test filter string. |
|
52595
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
383 |
define ParseMicroTestSelection |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
384 |
$(if $(filter micro%, $1), \ |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
385 |
$(if $(filter micro, $1), \ |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
386 |
micro:all \ |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
387 |
, \ |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
388 |
$(if $(filter micro:, $1), \ |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
389 |
micro:all \ |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
390 |
, \ |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
391 |
$1 \ |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
392 |
) \ |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
393 |
) \ |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
394 |
) |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
395 |
endef |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
396 |
|
47937
c1437939b0d8
8177957: run-test summary lines look bad/misleading with long test names
ihse
parents:
47932
diff
changeset
|
397 |
# 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
|
398 |
CleanupJtregPath = \ |
c1437939b0d8
8177957: run-test summary lines look bad/misleading with long test names
ihse
parents:
47932
diff
changeset
|
399 |
$(strip $(patsubst %/, %, $(subst $(JTREG_TOPDIR)/,, $1))) |
c1437939b0d8
8177957: run-test summary lines look bad/misleading with long test names
ihse
parents:
47932
diff
changeset
|
400 |
|
47932
0c22f6b9b5e2
8191820: Fix run-test jtreg test selection and component calculation
ihse
parents:
47928
diff
changeset
|
401 |
# 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
|
402 |
# 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
|
403 |
ExpandJtregRoot = \ |
47937
c1437939b0d8
8177957: run-test summary lines look bad/misleading with long test names
ihse
parents:
47932
diff
changeset
|
404 |
$(call CleanupJtregPath, $(wildcard \ |
47932
0c22f6b9b5e2
8191820: Fix run-test jtreg test selection and component calculation
ihse
parents:
47928
diff
changeset
|
405 |
$(if $(filter /%, $1), \ |
47937
c1437939b0d8
8177957: run-test summary lines look bad/misleading with long test names
ihse
parents:
47932
diff
changeset
|
406 |
$(if $(wildcard $(strip $1)/TEST.ROOT), \ |
c1437939b0d8
8177957: run-test summary lines look bad/misleading with long test names
ihse
parents:
47932
diff
changeset
|
407 |
$1 \ |
c1437939b0d8
8177957: run-test summary lines look bad/misleading with long test names
ihse
parents:
47932
diff
changeset
|
408 |
) \ |
47932
0c22f6b9b5e2
8191820: Fix run-test jtreg test selection and component calculation
ihse
parents:
47928
diff
changeset
|
409 |
, \ |
0c22f6b9b5e2
8191820: Fix run-test jtreg test selection and component calculation
ihse
parents:
47928
diff
changeset
|
410 |
$(filter $(addprefix %, $1), $(JTREG_TESTROOTS) $(addsuffix /, $(JTREG_TESTROOTS))) \ |
0c22f6b9b5e2
8191820: Fix run-test jtreg test selection and component calculation
ihse
parents:
47928
diff
changeset
|
411 |
$(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
|
412 |
) \ |
47937
c1437939b0d8
8177957: run-test summary lines look bad/misleading with long test names
ihse
parents:
47932
diff
changeset
|
413 |
)) |
47932
0c22f6b9b5e2
8191820: Fix run-test jtreg test selection and component calculation
ihse
parents:
47928
diff
changeset
|
414 |
|
0c22f6b9b5e2
8191820: Fix run-test jtreg test selection and component calculation
ihse
parents:
47928
diff
changeset
|
415 |
# 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
|
416 |
# 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
|
417 |
ExpandJtregPath = \ |
0c22f6b9b5e2
8191820: Fix run-test jtreg test selection and component calculation
ihse
parents:
47928
diff
changeset
|
418 |
$(if $(call ExpandJtregRoot, $1), \ |
0c22f6b9b5e2
8191820: Fix run-test jtreg test selection and component calculation
ihse
parents:
47928
diff
changeset
|
419 |
$(call ExpandJtregRoot, $1) \ |
0c22f6b9b5e2
8191820: Fix run-test jtreg test selection and component calculation
ihse
parents:
47928
diff
changeset
|
420 |
, \ |
47937
c1437939b0d8
8177957: run-test summary lines look bad/misleading with long test names
ihse
parents:
47932
diff
changeset
|
421 |
$(call CleanupJtregPath, $(wildcard \ |
47932
0c22f6b9b5e2
8191820: Fix run-test jtreg test selection and component calculation
ihse
parents:
47928
diff
changeset
|
422 |
$(if $(filter /%, $1), \ |
0c22f6b9b5e2
8191820: Fix run-test jtreg test selection and component calculation
ihse
parents:
47928
diff
changeset
|
423 |
$1 \ |
0c22f6b9b5e2
8191820: Fix run-test jtreg test selection and component calculation
ihse
parents:
47928
diff
changeset
|
424 |
, \ |
0c22f6b9b5e2
8191820: Fix run-test jtreg test selection and component calculation
ihse
parents:
47928
diff
changeset
|
425 |
$(addsuffix /$(strip $1), $(JTREG_TESTROOTS) $(TEST_BASEDIRS)) \ |
0c22f6b9b5e2
8191820: Fix run-test jtreg test selection and component calculation
ihse
parents:
47928
diff
changeset
|
426 |
$(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
|
427 |
) \ |
47937
c1437939b0d8
8177957: run-test summary lines look bad/misleading with long test names
ihse
parents:
47932
diff
changeset
|
428 |
)) \ |
47932
0c22f6b9b5e2
8191820: Fix run-test jtreg test selection and component calculation
ihse
parents:
47928
diff
changeset
|
429 |
) |
0c22f6b9b5e2
8191820: Fix run-test jtreg test selection and component calculation
ihse
parents:
47928
diff
changeset
|
430 |
|
44027 | 431 |
# Helper function to determine if a test specification is a Jtreg test |
432 |
# |
|
433 |
# It is a Jtreg test if it optionally begins with jtreg:, and then is either |
|
434 |
# 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
|
435 |
# 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
|
436 |
# either absolute or relative to any of the TEST_BASEDIRS or test roots. |
44027 | 437 |
define ParseJtregTestSelection |
438 |
$(eval TEST_NAME := $(strip $(patsubst jtreg:%, %, $1))) \ |
|
439 |
$(if $(or $(findstring :, $(TEST_NAME)), $(findstring /, $(TEST_NAME))), , \ |
|
440 |
$(eval TEST_NAME := :$(TEST_NAME)) \ |
|
441 |
) \ |
|
442 |
$(if $(findstring :, $(TEST_NAME)), \ |
|
443 |
$(if $(filter :%, $(TEST_NAME)), \ |
|
47932
0c22f6b9b5e2
8191820: Fix run-test jtreg test selection and component calculation
ihse
parents:
47928
diff
changeset
|
444 |
$(eval TEST_GROUP := $(patsubst :%, %, $(TEST_NAME))) \ |
48042 | 445 |
$(eval TEST_ROOTS := $(foreach test_root, $(JTREG_TESTROOTS), \ |
446 |
$(call CleanupJtregPath, $(test_root)))) \ |
|
44027 | 447 |
, \ |
47932
0c22f6b9b5e2
8191820: Fix run-test jtreg test selection and component calculation
ihse
parents:
47928
diff
changeset
|
448 |
$(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
|
449 |
$(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
|
450 |
$(eval TEST_ROOTS := $(call ExpandJtregRoot, $(TEST_PATH))) \ |
0c22f6b9b5e2
8191820: Fix run-test jtreg test selection and component calculation
ihse
parents:
47928
diff
changeset
|
451 |
) \ |
0c22f6b9b5e2
8191820: Fix run-test jtreg test selection and component calculation
ihse
parents:
47928
diff
changeset
|
452 |
$(foreach test_root, $(TEST_ROOTS), \ |
47937
c1437939b0d8
8177957: run-test summary lines look bad/misleading with long test names
ihse
parents:
47932
diff
changeset
|
453 |
$(if $(filter /%, $(test_root)), \ |
47932
0c22f6b9b5e2
8191820: Fix run-test jtreg test selection and component calculation
ihse
parents:
47928
diff
changeset
|
454 |
jtreg:$(test_root):$(TEST_GROUP) \ |
47937
c1437939b0d8
8177957: run-test summary lines look bad/misleading with long test names
ihse
parents:
47932
diff
changeset
|
455 |
, \ |
c1437939b0d8
8177957: run-test summary lines look bad/misleading with long test names
ihse
parents:
47932
diff
changeset
|
456 |
$(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
|
457 |
jtreg:$(test_root):$(TEST_GROUP) \ |
c1437939b0d8
8177957: run-test summary lines look bad/misleading with long test names
ihse
parents:
47932
diff
changeset
|
458 |
) \ |
44027 | 459 |
) \ |
460 |
) \ |
|
461 |
, \ |
|
47937
c1437939b0d8
8177957: run-test summary lines look bad/misleading with long test names
ihse
parents:
47932
diff
changeset
|
462 |
$(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
|
463 |
$(foreach test_path, $(TEST_PATHS), \ |
c1437939b0d8
8177957: run-test summary lines look bad/misleading with long test names
ihse
parents:
47932
diff
changeset
|
464 |
jtreg:$(test_path) \ |
44027 | 465 |
) \ |
466 |
) |
|
467 |
endef |
|
468 |
||
48061
665769d3cee4
8193014: Add "special" tests to run-test to cover odd cases
ihse
parents:
48058
diff
changeset
|
469 |
# Helper function to determine if a test specification is a special test |
665769d3cee4
8193014: Add "special" tests to run-test to cover odd cases
ihse
parents:
48058
diff
changeset
|
470 |
# |
52342 | 471 |
# It is a special test if it is "special:" followed by a test name, |
53464 | 472 |
# if it is "make:" or "make-" followed by a make test, or any of the special |
473 |
# test names as a single word. |
|
48061
665769d3cee4
8193014: Add "special" tests to run-test to cover odd cases
ihse
parents:
48058
diff
changeset
|
474 |
define ParseSpecialTestSelection |
665769d3cee4
8193014: Add "special" tests to run-test to cover odd cases
ihse
parents:
48058
diff
changeset
|
475 |
$(if $(filter special:%, $1), \ |
665769d3cee4
8193014: Add "special" tests to run-test to cover odd cases
ihse
parents:
48058
diff
changeset
|
476 |
$1 \ |
52342 | 477 |
) \ |
478 |
$(if $(filter make%, $1), \ |
|
479 |
$(if $(filter make:%, $1), \ |
|
480 |
special:$(strip $1) \ |
|
481 |
) \ |
|
482 |
$(if $(filter make-%, $1), \ |
|
483 |
special:$(patsubst make-%,make:%, $1) \ |
|
484 |
) \ |
|
485 |
$(if $(filter make, $1), \ |
|
486 |
special:make:all \ |
|
487 |
) |
|
488 |
) \ |
|
52396
e292e94b448a
8213058: remove ExecuteInternalVMTests and VerboseInternalVMTests flags
iignatyev
parents:
52393
diff
changeset
|
489 |
$(if $(filter failure-handler, $1), \ |
52342 | 490 |
special:$(strip $1) \ |
48061
665769d3cee4
8193014: Add "special" tests to run-test to cover odd cases
ihse
parents:
48058
diff
changeset
|
491 |
) |
665769d3cee4
8193014: Add "special" tests to run-test to cover odd cases
ihse
parents:
48058
diff
changeset
|
492 |
endef |
665769d3cee4
8193014: Add "special" tests to run-test to cover odd cases
ihse
parents:
48058
diff
changeset
|
493 |
|
44027 | 494 |
ifeq ($(TEST), ) |
495 |
$(info No test selection given in TEST!) |
|
52342 | 496 |
$(info Please use e.g. 'make test TEST=tier1' or 'make test-tier1') |
47928
fb62d4519338
8191715: Update documentation pointing to "common" directory
ihse
parents:
47329
diff
changeset
|
497 |
$(info See doc/testing.[md|html] for help) |
44027 | 498 |
$(error Cannot continue) |
499 |
endif |
|
500 |
||
501 |
# Now intelligently convert the test selection given by the user in TEST |
|
502 |
# into a list of fully qualified test descriptors of the tests to run. |
|
503 |
TESTS_TO_RUN := |
|
504 |
$(foreach test, $(TEST), \ |
|
505 |
$(eval PARSED_TESTS := $(call ParseCustomTestSelection, $(test))) \ |
|
506 |
$(if $(strip $(PARSED_TESTS)), , \ |
|
507 |
$(eval PARSED_TESTS += $(call ParseGtestTestSelection, $(test))) \ |
|
508 |
) \ |
|
509 |
$(if $(strip $(PARSED_TESTS)), , \ |
|
52595
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
510 |
$(eval PARSED_TESTS += $(call ParseMicroTestSelection, $(test))) \ |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
511 |
) \ |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
512 |
$(if $(strip $(PARSED_TESTS)), , \ |
44027 | 513 |
$(eval PARSED_TESTS += $(call ParseJtregTestSelection, $(test))) \ |
514 |
) \ |
|
515 |
$(if $(strip $(PARSED_TESTS)), , \ |
|
48061
665769d3cee4
8193014: Add "special" tests to run-test to cover odd cases
ihse
parents:
48058
diff
changeset
|
516 |
$(eval PARSED_TESTS += $(call ParseSpecialTestSelection, $(test))) \ |
665769d3cee4
8193014: Add "special" tests to run-test to cover odd cases
ihse
parents:
48058
diff
changeset
|
517 |
) \ |
665769d3cee4
8193014: Add "special" tests to run-test to cover odd cases
ihse
parents:
48058
diff
changeset
|
518 |
$(if $(strip $(PARSED_TESTS)), , \ |
44027 | 519 |
$(eval UNKNOWN_TEST := $(test)) \ |
520 |
) \ |
|
521 |
$(eval TESTS_TO_RUN += $(PARSED_TESTS)) \ |
|
522 |
) |
|
523 |
||
524 |
ifneq ($(UNKNOWN_TEST), ) |
|
525 |
$(info Unknown test selection: '$(UNKNOWN_TEST)') |
|
47928
fb62d4519338
8191715: Update documentation pointing to "common" directory
ihse
parents:
47329
diff
changeset
|
526 |
$(info See doc/testing.[md|html] for help) |
44027 | 527 |
$(error Cannot continue) |
528 |
endif |
|
529 |
||
530 |
TESTS_TO_RUN := $(strip $(TESTS_TO_RUN)) |
|
531 |
||
532 |
||
533 |
# Present the result of our parsing to the user |
|
534 |
$(info Test selection '$(TEST)', will run:) |
|
535 |
$(foreach test, $(TESTS_TO_RUN), $(info * $(test))) |
|
536 |
||
537 |
||
538 |
################################################################################ |
|
539 |
# Functions for setting up rules for running the selected tests |
|
540 |
# |
|
541 |
# The SetupRun*Test functions all have the same interface: |
|
542 |
# |
|
543 |
# Parameter 1 is the name of the rule. This is the test id, based on the test |
|
544 |
# descriptor, and this is also used as variable prefix, and the targets |
|
545 |
# generated are listed in a variable by that name. |
|
546 |
# |
|
547 |
# Remaining parameters are named arguments. Currently this is only: |
|
548 |
# TEST -- The properly formatted fully qualified test descriptor |
|
549 |
# |
|
550 |
# After the rule named by the test id has been executed, the following |
|
551 |
# variables will be available: |
|
552 |
# testid_TOTAL - the total number of tests run |
|
553 |
# testid_PASSED - the number of successful tests |
|
554 |
# testid_FAILED - the number of failed tests |
|
555 |
# testid_ERROR - the number of tests was neither successful or failed |
|
556 |
# |
|
557 |
################################################################################ |
|
558 |
||
559 |
### Rules for Gtest |
|
560 |
||
561 |
SetupRunGtestTest = $(NamedParamsMacroTemplate) |
|
562 |
define SetupRunGtestTestBody |
|
563 |
$1_TEST_RESULTS_DIR := $$(TEST_RESULTS_DIR)/$1 |
|
564 |
$1_TEST_SUPPORT_DIR := $$(TEST_SUPPORT_DIR)/$1 |
|
48042 | 565 |
$1_EXITCODE := $$($1_TEST_RESULTS_DIR)/exitcode.txt |
44027 | 566 |
|
48058
c5eefa465e37
8192995: run-test gtest should use all jvm variants, not just "server"
ihse
parents:
48042
diff
changeset
|
567 |
$1_VARIANT := $$(lastword $$(subst /, , $$($1_TEST))) |
c5eefa465e37
8192995: run-test gtest should use all jvm variants, not just "server"
ihse
parents:
48042
diff
changeset
|
568 |
ifeq ($$(filter $$($1_VARIANT), $$(GTEST_VARIANTS)), ) |
c5eefa465e37
8192995: run-test gtest should use all jvm variants, not just "server"
ihse
parents:
48042
diff
changeset
|
569 |
$$(error Invalid gtest variant '$$($1_VARIANT)'. Valid variants: $$(GTEST_VARIANTS)) |
c5eefa465e37
8192995: run-test gtest should use all jvm variants, not just "server"
ihse
parents:
48042
diff
changeset
|
570 |
endif |
c5eefa465e37
8192995: run-test gtest should use all jvm variants, not just "server"
ihse
parents:
48042
diff
changeset
|
571 |
$1_TEST_NAME := $$(strip $$(patsubst %/$$($1_VARIANT), %, \ |
c5eefa465e37
8192995: run-test gtest should use all jvm variants, not just "server"
ihse
parents:
48042
diff
changeset
|
572 |
$$(patsubst gtest:%, %, $$($1_TEST)))) |
44027 | 573 |
ifneq ($$($1_TEST_NAME), all) |
574 |
$1_GTEST_FILTER := --gtest_filter=$$($1_TEST_NAME)* |
|
575 |
endif |
|
576 |
||
577 |
ifneq ($$(GTEST_REPEAT), ) |
|
578 |
$1_GTEST_REPEAT :=--gtest_repeat=$$(GTEST_REPEAT) |
|
579 |
endif |
|
580 |
||
52393
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
581 |
ifneq ($$(GTEST_AOT_MODULES), ) |
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
582 |
$$(eval $$(call SetupAot, $1, \ |
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
583 |
MODULES := $$(GTEST_AOT_MODULES), \ |
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
584 |
VM_OPTIONS := $$(GTEST_VM_OPTIONS) $$(GTEST_JAVA_OPTIONS), \ |
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
585 |
)) |
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
586 |
endif |
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
587 |
|
53465
d982794784f1
8217626: Add setup/teardown functionality to RunTest
ihse
parents:
53464
diff
changeset
|
588 |
run-test-$1: pre-run-test $$($1_AOT_TARGETS) |
44027 | 589 |
$$(call LogWarn) |
590 |
$$(call LogWarn, Running test '$$($1_TEST)') |
|
591 |
$$(call MakeDir, $$($1_TEST_RESULTS_DIR) $$($1_TEST_SUPPORT_DIR)) |
|
592 |
$$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/gtest, \ |
|
48058
c5eefa465e37
8192995: run-test gtest should use all jvm variants, not just "server"
ihse
parents:
48042
diff
changeset
|
593 |
$$(FIXPATH) $$(TEST_IMAGE_DIR)/hotspot/gtest/$$($1_VARIANT)/gtestLauncher \ |
53485 | 594 |
-jdk $(JDK_UNDER_TEST) $$($1_GTEST_FILTER) \ |
52125
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
51856
diff
changeset
|
595 |
--gtest_output=xml:$$($1_TEST_RESULTS_DIR)/gtest.xml \ |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
51856
diff
changeset
|
596 |
$$($1_GTEST_REPEAT) $$(GTEST_OPTIONS) $$(GTEST_VM_OPTIONS) \ |
52393
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
597 |
$$(GTEST_JAVA_OPTIONS) $$($1_AOT_OPTIONS) \ |
48042 | 598 |
> >($(TEE) $$($1_TEST_RESULTS_DIR)/gtest.txt) \ |
599 |
&& $$(ECHO) $$$$? > $$($1_EXITCODE) \ |
|
600 |
|| $$(ECHO) $$$$? > $$($1_EXITCODE) \ |
|
601 |
) |
|
44027 | 602 |
|
603 |
$1_RESULT_FILE := $$($1_TEST_RESULTS_DIR)/gtest.txt |
|
604 |
||
605 |
parse-test-$1: run-test-$1 |
|
606 |
$$(call LogWarn, Finished running test '$$($1_TEST)') |
|
607 |
$$(call LogWarn, Test report is stored in $$(strip \ |
|
608 |
$$(subst $$(TOPDIR)/, , $$($1_TEST_RESULTS_DIR)))) |
|
48042 | 609 |
$$(if $$(wildcard $$($1_RESULT_FILE)), \ |
47956
72a474c85aee
8177956: Add TEST_VM_OPTS as convenience for run-test arguments
ihse
parents:
47943
diff
changeset
|
610 |
$$(eval $1_TOTAL := $$(shell $$(AWK) '/==========.* tests? from .* \ |
72a474c85aee
8177956: Add TEST_VM_OPTS as convenience for run-test arguments
ihse
parents:
47943
diff
changeset
|
611 |
test cases? ran/ { print $$$$2 }' $$($1_RESULT_FILE))) \ |
72a474c85aee
8177956: Add TEST_VM_OPTS as convenience for run-test arguments
ihse
parents:
47943
diff
changeset
|
612 |
$$(if $$($1_TOTAL), , $$(eval $1_TOTAL := 0)) \ |
72a474c85aee
8177956: Add TEST_VM_OPTS as convenience for run-test arguments
ihse
parents:
47943
diff
changeset
|
613 |
$$(eval $1_PASSED := $$(shell $$(AWK) '/\[ PASSED \] .* tests?./ \ |
72a474c85aee
8177956: Add TEST_VM_OPTS as convenience for run-test arguments
ihse
parents:
47943
diff
changeset
|
614 |
{ print $$$$4 }' $$($1_RESULT_FILE))) \ |
72a474c85aee
8177956: Add TEST_VM_OPTS as convenience for run-test arguments
ihse
parents:
47943
diff
changeset
|
615 |
$$(if $$($1_PASSED), , $$(eval $1_PASSED := 0)) \ |
72a474c85aee
8177956: Add TEST_VM_OPTS as convenience for run-test arguments
ihse
parents:
47943
diff
changeset
|
616 |
$$(eval $1_FAILED := $$(shell $$(AWK) '/\[ FAILED \] .* tests?, \ |
72a474c85aee
8177956: Add TEST_VM_OPTS as convenience for run-test arguments
ihse
parents:
47943
diff
changeset
|
617 |
listed below/ { print $$$$4 }' $$($1_RESULT_FILE))) \ |
72a474c85aee
8177956: Add TEST_VM_OPTS as convenience for run-test arguments
ihse
parents:
47943
diff
changeset
|
618 |
$$(if $$($1_FAILED), , $$(eval $1_FAILED := 0)) \ |
72a474c85aee
8177956: Add TEST_VM_OPTS as convenience for run-test arguments
ihse
parents:
47943
diff
changeset
|
619 |
$$(eval $1_ERROR := $$(shell \ |
72a474c85aee
8177956: Add TEST_VM_OPTS as convenience for run-test arguments
ihse
parents:
47943
diff
changeset
|
620 |
$$(EXPR) $$($1_TOTAL) - $$($1_PASSED) - $$($1_FAILED))) \ |
72a474c85aee
8177956: Add TEST_VM_OPTS as convenience for run-test arguments
ihse
parents:
47943
diff
changeset
|
621 |
, \ |
72a474c85aee
8177956: Add TEST_VM_OPTS as convenience for run-test arguments
ihse
parents:
47943
diff
changeset
|
622 |
$$(eval $1_PASSED := 0) \ |
72a474c85aee
8177956: Add TEST_VM_OPTS as convenience for run-test arguments
ihse
parents:
47943
diff
changeset
|
623 |
$$(eval $1_FAILED := 0) \ |
72a474c85aee
8177956: Add TEST_VM_OPTS as convenience for run-test arguments
ihse
parents:
47943
diff
changeset
|
624 |
$$(eval $1_ERROR := 1) \ |
72a474c85aee
8177956: Add TEST_VM_OPTS as convenience for run-test arguments
ihse
parents:
47943
diff
changeset
|
625 |
$$(eval $1_TOTAL := 1) \ |
72a474c85aee
8177956: Add TEST_VM_OPTS as convenience for run-test arguments
ihse
parents:
47943
diff
changeset
|
626 |
) |
44027 | 627 |
|
53465
d982794784f1
8217626: Add setup/teardown functionality to RunTest
ihse
parents:
53464
diff
changeset
|
628 |
$1: run-test-$1 parse-test-$1 |
d982794784f1
8217626: Add setup/teardown functionality to RunTest
ihse
parents:
53464
diff
changeset
|
629 |
|
d982794784f1
8217626: Add setup/teardown functionality to RunTest
ihse
parents:
53464
diff
changeset
|
630 |
TARGETS += $1 run-test-$1 parse-test-$1 |
d982794784f1
8217626: Add setup/teardown functionality to RunTest
ihse
parents:
53464
diff
changeset
|
631 |
TEST_TARGETS += parse-test-$1 |
d982794784f1
8217626: Add setup/teardown functionality to RunTest
ihse
parents:
53464
diff
changeset
|
632 |
|
44027 | 633 |
endef |
634 |
||
635 |
################################################################################ |
|
636 |
||
52595
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
637 |
### Rules for Microbenchmarks |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
638 |
|
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
639 |
# Helper function for SetupRunMicroTest. Set a MICRO_* variable from, in order: |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
640 |
# 1) Specified by user on command line |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
641 |
# 2) Generic default |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
642 |
# |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
643 |
# Note: No spaces are allowed around the arguments. |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
644 |
# Arg $1 The test ID (i.e. $1 in SetupRunMicroTest) |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
645 |
# Arg $2 Base variable, e.g. MICRO_TEST_JDK |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
646 |
# Arg $3 The default value (optional) |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
647 |
define SetMicroValue |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
648 |
ifneq ($$($2), ) |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
649 |
$1_$2 := $$($2) |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
650 |
else |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
651 |
ifneq ($3, ) |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
652 |
$1_$2 := $3 |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
653 |
endif |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
654 |
endif |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
655 |
endef |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
656 |
|
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
657 |
SetupRunMicroTest = $(NamedParamsMacroTemplate) |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
658 |
define SetupRunMicroTestBody |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
659 |
$1_TEST_RESULTS_DIR := $$(TEST_RESULTS_DIR)/$1 |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
660 |
$1_TEST_SUPPORT_DIR := $$(TEST_SUPPORT_DIR)/$1 |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
661 |
$1_EXITCODE := $$($1_TEST_RESULTS_DIR)/exitcode.txt |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
662 |
|
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
663 |
$1_TEST_NAME := $$(strip $$(patsubst micro:%, %, $$($1_TEST))) |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
664 |
|
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
665 |
$$(eval $$(call SetMicroValue,$1,MICRO_BENCHMARKS_JAR,$$(TEST_IMAGE_DIR)/micro/benchmarks.jar)) |
53485 | 666 |
$$(eval $$(call SetMicroValue,$1,MICRO_TEST_JDK,$$(JDK_UNDER_TEST))) |
52595
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
667 |
$$(eval $$(call SetMicroValue,$1,MICRO_JAVA_OPTIONS)) |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
668 |
|
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
669 |
# Current tests needs to open java.io |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
670 |
$1_MICRO_JAVA_OPTIONS += --add-opens=java.base/java.io=ALL-UNNAMED |
53834
1b40a0178b2a
8219393: Add native library support for microbenchmarks
redestad
parents:
53683
diff
changeset
|
671 |
# Set library path for native dependencies |
1b40a0178b2a
8219393: Add native library support for microbenchmarks
redestad
parents:
53683
diff
changeset
|
672 |
$1_MICRO_JAVA_OPTIONS += -Djava.library.path=$$(TEST_IMAGE_DIR)/micro/native |
52595
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
673 |
|
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
674 |
# Save output as JSON or CSV file |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
675 |
ifneq ($$(MICRO_RESULTS_FORMAT), ) |
53464 | 676 |
$1_MICRO_BASIC_OPTIONS += -rf $$(MICRO_RESULTS_FORMAT) |
677 |
$1_MICRO_BASIC_OPTIONS += -rff $$($1_TEST_RESULTS_DIR)/jmh-result.$(MICRO_RESULTS_FORMAT) |
|
52595
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
678 |
endif |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
679 |
|
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
680 |
ifneq ($$(MICRO_VM_OPTIONS)$$(MICRO_JAVA_OPTIONS), ) |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
681 |
$1_MICRO_VM_OPTIONS := -jvmArgs $$(MICRO_VM_OPTIONS) $$(MICRO_JAVA_OPTIONS) |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
682 |
endif |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
683 |
|
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
684 |
ifneq ($$(MICRO_ITER), ) |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
685 |
$1_MICRO_ITER := -i $$(MICRO_ITER) |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
686 |
endif |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
687 |
ifneq ($$(MICRO_FORK), ) |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
688 |
$1_MICRO_FORK := -f $$(MICRO_FORK) |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
689 |
endif |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
690 |
ifneq ($$(MICRO_TIME), ) |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
691 |
$1_MICRO_TIME := -r $$(MICRO_TIME) |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
692 |
endif |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
693 |
ifneq ($$(MICRO_WARMUP_ITER), ) |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
694 |
$1_MICRO_WARMUP_ITER := -wi $$(MICRO_WARMUP_ITER) |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
695 |
endif |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
696 |
ifneq ($$(MICRO_WARMUP_TIME), ) |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
697 |
$1_MICRO_WARMUP_TIME := -w $$(MICRO_WARMUP_TIME) |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
698 |
endif |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
699 |
|
53465
d982794784f1
8217626: Add setup/teardown functionality to RunTest
ihse
parents:
53464
diff
changeset
|
700 |
run-test-$1: pre-run-test |
52595
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
701 |
$$(call LogWarn) |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
702 |
$$(call LogWarn, Running test '$$($1_TEST)') |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
703 |
$$(call MakeDir, $$($1_TEST_RESULTS_DIR) $$($1_TEST_SUPPORT_DIR)) |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
704 |
$$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/micro, \ |
53835
1e569f37cf36
8219394: Missing FIXPATH in microbenchmark test runner
erikj
parents:
53834
diff
changeset
|
705 |
$$(FIXPATH) $$($1_MICRO_TEST_JDK)/bin/java $$($1_MICRO_JAVA_OPTIONS) \ |
1e569f37cf36
8219394: Missing FIXPATH in microbenchmark test runner
erikj
parents:
53834
diff
changeset
|
706 |
-jar $$($1_MICRO_BENCHMARKS_JAR) \ |
52595
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
707 |
$$($1_MICRO_ITER) $$($1_MICRO_FORK) $$($1_MICRO_TIME) \ |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
708 |
$$($1_MICRO_WARMUP_ITER) $$($1_MICRO_WARMUP_TIME) \ |
53464 | 709 |
$$($1_MICRO_VM_OPTIONS) $$($1_MICRO_BASIC_OPTIONS) $$(MICRO_OPTIONS) \ |
52595
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
710 |
$$($1_TEST_NAME) \ |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
711 |
> >($(TEE) $$($1_TEST_RESULTS_DIR)/micro.txt) \ |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
712 |
&& $$(ECHO) $$$$? > $$($1_EXITCODE) \ |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
713 |
|| $$(ECHO) $$$$? > $$($1_EXITCODE) \ |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
714 |
) |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
715 |
|
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
716 |
$1_RESULT_FILE := $$($1_TEST_RESULTS_DIR)/micro.txt |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
717 |
|
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
718 |
parse-test-$1: run-test-$1 |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
719 |
$$(call LogWarn, Finished running test '$$($1_TEST)') |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
720 |
$$(call LogWarn, Test report is stored in $$(strip \ |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
721 |
$$(subst $$(TOPDIR)/, , $$($1_TEST_RESULTS_DIR)))) |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
722 |
$$(if $$(wildcard $$($1_EXITCODE)), \ |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
723 |
$$(eval $1_EXIT_CODE := $$(shell $$(CAT) $$($1_EXITCODE))) \ |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
724 |
$$(if $$(filter 0, $$($1_EXIT_CODE)), \ |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
725 |
$$(eval $1_PASSED := 1) \ |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
726 |
$$(eval $1_ERROR := 0) \ |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
727 |
, \ |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
728 |
$$(eval $1_PASSED := 0) \ |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
729 |
$$(eval $1_ERROR := 1) \ |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
730 |
) \ |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
731 |
$$(eval $1_FAILED := 0) \ |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
732 |
$$(eval $1_TOTAL := $$(shell \ |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
733 |
$$(EXPR) $$($1_PASSED) + $$($1_ERROR))) \ |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
734 |
, \ |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
735 |
$$(eval $1_PASSED := 0) \ |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
736 |
$$(eval $1_FAILED := 0) \ |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
737 |
$$(eval $1_ERROR := 1) \ |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
738 |
$$(eval $1_TOTAL := 1) \ |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
739 |
) |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
740 |
|
53465
d982794784f1
8217626: Add setup/teardown functionality to RunTest
ihse
parents:
53464
diff
changeset
|
741 |
$1: run-test-$1 parse-test-$1 |
d982794784f1
8217626: Add setup/teardown functionality to RunTest
ihse
parents:
53464
diff
changeset
|
742 |
|
d982794784f1
8217626: Add setup/teardown functionality to RunTest
ihse
parents:
53464
diff
changeset
|
743 |
TARGETS += $1 run-test-$1 parse-test-$1 |
d982794784f1
8217626: Add setup/teardown functionality to RunTest
ihse
parents:
53464
diff
changeset
|
744 |
TEST_TARGETS += parse-test-$1 |
d982794784f1
8217626: Add setup/teardown functionality to RunTest
ihse
parents:
53464
diff
changeset
|
745 |
|
52595
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
746 |
endef |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
747 |
|
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
748 |
################################################################################ |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
749 |
|
44027 | 750 |
### Rules for Jtreg |
751 |
||
752 |
# Helper function for SetupRunJtregTest. Set a JTREG_* variable from, in order: |
|
753 |
# 1) Specified by user on command line |
|
754 |
# 2) Component-specific default |
|
755 |
# 3) Generic default |
|
756 |
# |
|
757 |
# Note: No spaces are allowed around the arguments. |
|
758 |
# Arg $1 The test ID (i.e. $1 in SetupRunJtregTest) |
|
759 |
# Arg $2 Base variable, e.g. JTREG_JOBS |
|
760 |
# Arg $3 The default value (optional) |
|
761 |
define SetJtregValue |
|
762 |
ifneq ($$($2), ) |
|
763 |
$1_$2 := $$($2) |
|
764 |
else |
|
765 |
ifneq ($$($$($1_COMPONENT)_$2), ) |
|
766 |
$1_$2 := $$($$($1_COMPONENT)_$2) |
|
767 |
else |
|
768 |
ifneq ($3, ) |
|
769 |
$1_$2 := $3 |
|
770 |
endif |
|
771 |
endif |
|
772 |
endif |
|
773 |
endef |
|
774 |
||
775 |
SetupRunJtregTest = $(NamedParamsMacroTemplate) |
|
776 |
define SetupRunJtregTestBody |
|
777 |
$1_TEST_RESULTS_DIR := $$(TEST_RESULTS_DIR)/$1 |
|
778 |
$1_TEST_SUPPORT_DIR := $$(TEST_SUPPORT_DIR)/$1 |
|
48042 | 779 |
$1_EXITCODE := $$($1_TEST_RESULTS_DIR)/exitcode.txt |
44027 | 780 |
|
781 |
$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
|
782 |
|
52125
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
51856
diff
changeset
|
783 |
$1_TEST_ROOT := \ |
47932
0c22f6b9b5e2
8191820: Fix run-test jtreg test selection and component calculation
ihse
parents:
47928
diff
changeset
|
784 |
$$(strip $$(foreach root, $$(JTREG_TESTROOTS), \ |
52125
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
51856
diff
changeset
|
785 |
$$(if $$(filter $$(root)%, $$(JTREG_TOPDIR)/$$($1_TEST_NAME)), $$(root)) \ |
47932
0c22f6b9b5e2
8191820: Fix run-test jtreg test selection and component calculation
ihse
parents:
47928
diff
changeset
|
786 |
)) |
52125
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
51856
diff
changeset
|
787 |
$1_COMPONENT := $$(lastword $$(subst /, $$(SPACE), $$($1_TEST_ROOT))) |
47932
0c22f6b9b5e2
8191820: Fix run-test jtreg test selection and component calculation
ihse
parents:
47928
diff
changeset
|
788 |
# 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
|
789 |
ifeq ($$($1_COMPONENT), jtreg) |
0c22f6b9b5e2
8191820: Fix run-test jtreg test selection and component calculation
ihse
parents:
47928
diff
changeset
|
790 |
$1_COMPONENT := hotspot |
0c22f6b9b5e2
8191820: Fix run-test jtreg test selection and component calculation
ihse
parents:
47928
diff
changeset
|
791 |
endif |
44027 | 792 |
|
45104 | 793 |
ifeq ($$(JT_HOME), ) |
794 |
$$(info Error: jtreg framework is not found.) |
|
795 |
$$(info Please run configure using --with-jtreg.) |
|
796 |
$$(error Cannot continue) |
|
797 |
endif |
|
798 |
||
44027 | 799 |
# Unfortunately, we need different defaults for some JTREG values, |
800 |
# depending on what component we're running. |
|
801 |
||
802 |
# Convert JTREG_foo into $1_JTREG_foo with a suitable value. |
|
803 |
$$(eval $$(call SetJtregValue,$1,JTREG_TEST_MODE,agentvm)) |
|
804 |
$$(eval $$(call SetJtregValue,$1,JTREG_ASSERT,true)) |
|
805 |
$$(eval $$(call SetJtregValue,$1,JTREG_MAX_MEM,512m)) |
|
806 |
$$(eval $$(call SetJtregValue,$1,JTREG_NATIVEPATH)) |
|
807 |
$$(eval $$(call SetJtregValue,$1,JTREG_BASIC_OPTIONS)) |
|
47941
d91b0d2d45cb
8179554: make run-test does not respect ProblemList.txt
ihse
parents:
47939
diff
changeset
|
808 |
$$(eval $$(call SetJtregValue,$1,JTREG_PROBLEM_LIST)) |
44027 | 809 |
|
52125
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
51856
diff
changeset
|
810 |
# Only the problem list for the current test root should be used. |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
51856
diff
changeset
|
811 |
$1_JTREG_PROBLEM_LIST := $$(filter $$($1_TEST_ROOT)%, $$($1_JTREG_PROBLEM_LIST)) |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
51856
diff
changeset
|
812 |
|
44027 | 813 |
ifneq ($(TEST_JOBS), 0) |
814 |
$$(eval $$(call SetJtregValue,$1,JTREG_JOBS,$$(TEST_JOBS))) |
|
815 |
else |
|
816 |
$$(eval $$(call SetJtregValue,$1,JTREG_JOBS,$$(JOBS))) |
|
817 |
endif |
|
818 |
||
47058
85aaac5701da
8186248: Allow more flexibility in selecting Heap % of available RAM
bobv
parents:
46230
diff
changeset
|
819 |
# Make sure MaxRAMPercentage is high enough to not cause OOM or swapping since |
44027 | 820 |
# 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
|
821 |
$1_JTREG_MAX_RAM_PERCENTAGE := $$(shell $$(EXPR) 25 / $$($1_JTREG_JOBS)) |
44027 | 822 |
|
52556
6b05634db714
8211727: Adjust default concurrency settings for running tests on Sparc
erikj
parents:
52396
diff
changeset
|
823 |
# SPARC is in general slower per core so need to scale up timeouts a bit. |
53683 | 824 |
ifeq ($(call isTargetCpuArch, sparc), true) |
52556
6b05634db714
8211727: Adjust default concurrency settings for running tests on Sparc
erikj
parents:
52396
diff
changeset
|
825 |
JTREG_TIMEOUT_FACTOR ?= 8 |
6b05634db714
8211727: Adjust default concurrency settings for running tests on Sparc
erikj
parents:
52396
diff
changeset
|
826 |
else |
6b05634db714
8211727: Adjust default concurrency settings for running tests on Sparc
erikj
parents:
52396
diff
changeset
|
827 |
JTREG_TIMEOUT_FACTOR ?= 4 |
6b05634db714
8211727: Adjust default concurrency settings for running tests on Sparc
erikj
parents:
52396
diff
changeset
|
828 |
endif |
44027 | 829 |
JTREG_VERBOSE ?= fail,error,summary |
830 |
JTREG_RETAIN ?= fail,error |
|
57493
b95ebdbf68ca
8226910: make it possible to use jtreg's -match via run-test framework
iignatyev
parents:
55193
diff
changeset
|
831 |
JTREG_RUN_PROBLEM_LISTS ?= false |
44027 | 832 |
|
833 |
ifneq ($$($1_JTREG_MAX_MEM), 0) |
|
834 |
$1_JTREG_BASIC_OPTIONS += -vmoption:-Xmx$$($1_JTREG_MAX_MEM) |
|
835 |
$1_JTREG_LAUNCHER_OPTIONS += -Xmx$$($1_JTREG_MAX_MEM) |
|
836 |
endif |
|
837 |
||
838 |
$1_JTREG_BASIC_OPTIONS += -$$($1_JTREG_TEST_MODE) \ |
|
839 |
-verbose:$$(JTREG_VERBOSE) -retain:$$(JTREG_RETAIN) \ |
|
52125
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
51856
diff
changeset
|
840 |
-concurrency:$$($1_JTREG_JOBS) -timeoutFactor:$$(JTREG_TIMEOUT_FACTOR) \ |
47058
85aaac5701da
8186248: Allow more flexibility in selecting Heap % of available RAM
bobv
parents:
46230
diff
changeset
|
841 |
-vmoption:-XX:MaxRAMPercentage=$$($1_JTREG_MAX_RAM_PERCENTAGE) |
44027 | 842 |
|
52125
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
51856
diff
changeset
|
843 |
$1_JTREG_BASIC_OPTIONS += -automatic -ignore:quiet |
44027 | 844 |
|
47329 | 845 |
# Make it possible to specify the JIB_DATA_DIR for tests using the |
846 |
# JIB Artifact resolver |
|
847 |
$1_JTREG_BASIC_OPTIONS += -e:JIB_DATA_DIR |
|
44027 | 848 |
# Some tests needs to find a boot JDK using the JDK8_HOME variable. |
849 |
$1_JTREG_BASIC_OPTIONS += -e:JDK8_HOME=$$(BOOT_JDK) |
|
49147
af37d9997bd6
8199197: Set _NT_SYMBOL_PATH when running tests on windows
erikj
parents:
48061
diff
changeset
|
850 |
# If running on Windows, propagate the _NT_SYMBOL_PATH to enable |
af37d9997bd6
8199197: Set _NT_SYMBOL_PATH when running tests on windows
erikj
parents:
48061
diff
changeset
|
851 |
# symbol lookup in hserr files |
53683 | 852 |
ifeq ($$(call isTargetOs, windows), true) |
49147
af37d9997bd6
8199197: Set _NT_SYMBOL_PATH when running tests on windows
erikj
parents:
48061
diff
changeset
|
853 |
$1_JTREG_BASIC_OPTIONS += -e:_NT_SYMBOL_PATH |
af37d9997bd6
8199197: Set _NT_SYMBOL_PATH when running tests on windows
erikj
parents:
48061
diff
changeset
|
854 |
endif |
44027 | 855 |
|
856 |
$1_JTREG_BASIC_OPTIONS += \ |
|
857 |
$$(addprefix -javaoption:, $$(JTREG_JAVA_OPTIONS)) \ |
|
858 |
$$(addprefix -vmoption:, $$(JTREG_VM_OPTIONS)) \ |
|
859 |
# |
|
860 |
||
861 |
ifeq ($$($1_JTREG_ASSERT), true) |
|
862 |
$1_JTREG_BASIC_OPTIONS += -ea -esa |
|
863 |
endif |
|
864 |
||
865 |
ifneq ($$($1_JTREG_NATIVEPATH), ) |
|
866 |
$1_JTREG_BASIC_OPTIONS += -nativepath:$$($1_JTREG_NATIVEPATH) |
|
867 |
endif |
|
868 |
||
57493
b95ebdbf68ca
8226910: make it possible to use jtreg's -match via run-test framework
iignatyev
parents:
55193
diff
changeset
|
869 |
ifeq ($$(JTREG_RUN_PROBLEM_LISTS), true) |
b95ebdbf68ca
8226910: make it possible to use jtreg's -match via run-test framework
iignatyev
parents:
55193
diff
changeset
|
870 |
JTREG_PROBLEM_LIST_PREFIX := -match: |
b95ebdbf68ca
8226910: make it possible to use jtreg's -match via run-test framework
iignatyev
parents:
55193
diff
changeset
|
871 |
else |
b95ebdbf68ca
8226910: make it possible to use jtreg's -match via run-test framework
iignatyev
parents:
55193
diff
changeset
|
872 |
JTREG_PROBLEM_LIST_PREFIX := -exclude: |
b95ebdbf68ca
8226910: make it possible to use jtreg's -match via run-test framework
iignatyev
parents:
55193
diff
changeset
|
873 |
endif |
b95ebdbf68ca
8226910: make it possible to use jtreg's -match via run-test framework
iignatyev
parents:
55193
diff
changeset
|
874 |
|
47941
d91b0d2d45cb
8179554: make run-test does not respect ProblemList.txt
ihse
parents:
47939
diff
changeset
|
875 |
ifneq ($$($1_JTREG_PROBLEM_LIST), ) |
57493
b95ebdbf68ca
8226910: make it possible to use jtreg's -match via run-test framework
iignatyev
parents:
55193
diff
changeset
|
876 |
$1_JTREG_BASIC_OPTIONS += $$(addprefix $$(JTREG_PROBLEM_LIST_PREFIX), $$($1_JTREG_PROBLEM_LIST)) |
47941
d91b0d2d45cb
8179554: make run-test does not respect ProblemList.txt
ihse
parents:
47939
diff
changeset
|
877 |
endif |
d91b0d2d45cb
8179554: make run-test does not respect ProblemList.txt
ihse
parents:
47939
diff
changeset
|
878 |
|
52125
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
51856
diff
changeset
|
879 |
ifneq ($$(JTREG_EXTRA_PROBLEM_LISTS), ) |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
51856
diff
changeset
|
880 |
# Accept both absolute paths as well as relative to the current test root. |
57493
b95ebdbf68ca
8226910: make it possible to use jtreg's -match via run-test framework
iignatyev
parents:
55193
diff
changeset
|
881 |
$1_JTREG_BASIC_OPTIONS += $$(addprefix $$(JTREG_PROBLEM_LIST_PREFIX), $$(wildcard \ |
52125
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
51856
diff
changeset
|
882 |
$$(JTREG_EXTRA_PROBLEM_LISTS) \ |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
51856
diff
changeset
|
883 |
$$(addprefix $$($1_TEST_ROOT)/, $$(JTREG_EXTRA_PROBLEM_LISTS)) \ |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
51856
diff
changeset
|
884 |
)) |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
51856
diff
changeset
|
885 |
endif |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
51856
diff
changeset
|
886 |
|
51856
11b9d3a6f31c
8211037: Load jib jars dynamically from JibArtifactManager
erikj
parents:
50908
diff
changeset
|
887 |
ifneq ($$(JIB_HOME), ) |
11b9d3a6f31c
8211037: Load jib jars dynamically from JibArtifactManager
erikj
parents:
50908
diff
changeset
|
888 |
$1_JTREG_BASIC_OPTIONS += -e:JIB_HOME=$$(JIB_HOME) |
46230
e0ca0417b74d
8180600: make run-test does not work with jib test dependencies
erikj
parents:
45104
diff
changeset
|
889 |
endif |
e0ca0417b74d
8180600: make run-test does not work with jib test dependencies
erikj
parents:
45104
diff
changeset
|
890 |
|
55183
4929c53ff29d
8224778: test/jdk/demo/jfc/J2Ddemo/J2DdemoTest.java cannot find J2Ddemo.jar
prr
parents:
54516
diff
changeset
|
891 |
$1_JTREG_BASIC_OPTIONS += -e:TEST_IMAGE_DIR=$(TEST_IMAGE_DIR) |
4929c53ff29d
8224778: test/jdk/demo/jfc/J2Ddemo/J2DdemoTest.java cannot find J2Ddemo.jar
prr
parents:
54516
diff
changeset
|
892 |
$1_JTREG_BASIC_OPTIONS += -e:TEST_IMAGE_GRAAL_DIR=$(TEST_IMAGE_DIR)/hotspot/jtreg/graal |
50908 | 893 |
|
47986 | 894 |
ifneq ($$(JTREG_FAILURE_HANDLER_OPTIONS), ) |
895 |
$1_JTREG_LAUNCHER_OPTIONS += -Djava.library.path="$(JTREG_FAILURE_HANDLER_DIR)" |
|
896 |
endif |
|
897 |
||
52125
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
51856
diff
changeset
|
898 |
ifneq ($$(JTREG_KEYWORDS), ) |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
51856
diff
changeset
|
899 |
# The keywords string may contain problematic characters and may be quoted |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
51856
diff
changeset
|
900 |
# already when it arrives here. Remove any existing quotes and replace them |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
51856
diff
changeset
|
901 |
# with one set of single quotes. |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
51856
diff
changeset
|
902 |
$1_JTREG_KEYWORDS := \ |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
51856
diff
changeset
|
903 |
$$(strip $$(subst $$(SQUOTE),,$$(subst $$(DQUOTE),,$$(JTREG_KEYWORDS)))) |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
51856
diff
changeset
|
904 |
ifneq ($$($1_JTREG_KEYWORDS), ) |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
51856
diff
changeset
|
905 |
$1_JTREG_BASIC_OPTIONS += -k:'$$($1_JTREG_KEYWORDS)' |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
51856
diff
changeset
|
906 |
endif |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
51856
diff
changeset
|
907 |
endif |
28375a1de254
8212028: Use run-test makefile framework for testing in Oracle's Mach5
erikj
parents:
51856
diff
changeset
|
908 |
|
52393
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
909 |
ifneq ($$(JTREG_AOT_MODULES), ) |
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
910 |
$$(eval $$(call SetupAot, $1, \ |
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
911 |
MODULES := $$(JTREG_AOT_MODULES), \ |
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
912 |
VM_OPTIONS := $$(JTREG_VM_OPTIONS) $$(JTREG_JAVA_OPTIONS), \ |
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
913 |
)) |
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
914 |
endif |
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
915 |
|
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
916 |
ifneq ($$($1_AOT_OPTIONS), ) |
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
917 |
$1_JTREG_BASIC_OPTIONS += -vmoptions:"$$($1_AOT_OPTIONS)" |
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
918 |
endif |
ff10f8f3a583
8152988: [AOT] Update test batch definitions to include aot-ed java.base module mode into hs-comp testing
epavlova
parents:
52342
diff
changeset
|
919 |
|
47939
fe7596497fb0
8179555: make run-test should always use a fresh, clean JTwork directory
ihse
parents:
47938
diff
changeset
|
920 |
clean-workdir-$1: |
fe7596497fb0
8179555: make run-test should always use a fresh, clean JTwork directory
ihse
parents:
47938
diff
changeset
|
921 |
$$(RM) -r $$($1_TEST_SUPPORT_DIR) |
fe7596497fb0
8179555: make run-test should always use a fresh, clean JTwork directory
ihse
parents:
47938
diff
changeset
|
922 |
|
53465
d982794784f1
8217626: Add setup/teardown functionality to RunTest
ihse
parents:
53464
diff
changeset
|
923 |
run-test-$1: pre-run-test clean-workdir-$1 $$($1_AOT_TARGETS) |
44027 | 924 |
$$(call LogWarn) |
925 |
$$(call LogWarn, Running test '$$($1_TEST)') |
|
926 |
$$(call MakeDir, $$($1_TEST_RESULTS_DIR) $$($1_TEST_SUPPORT_DIR)) |
|
927 |
$$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/jtreg, \ |
|
53857 | 928 |
$$(COV_ENVIRONMENT) \ |
44027 | 929 |
$$(JAVA) $$($1_JTREG_LAUNCHER_OPTIONS) \ |
930 |
-Dprogram=jtreg -jar $$(JT_HOME)/lib/jtreg.jar \ |
|
931 |
$$($1_JTREG_BASIC_OPTIONS) \ |
|
53485 | 932 |
-testjdk:$$(JDK_UNDER_TEST) \ |
47937
c1437939b0d8
8177957: run-test summary lines look bad/misleading with long test names
ihse
parents:
47932
diff
changeset
|
933 |
-dir:$$(JTREG_TOPDIR) \ |
44027 | 934 |
-reportDir:$$($1_TEST_RESULTS_DIR) \ |
935 |
-workDir:$$($1_TEST_SUPPORT_DIR) \ |
|
936 |
$$(JTREG_OPTIONS) \ |
|
47986 | 937 |
$$(JTREG_FAILURE_HANDLER_OPTIONS) \ |
53857 | 938 |
$$(JTREG_COV_OPTIONS) \ |
48042 | 939 |
$$($1_TEST_NAME) \ |
940 |
&& $$(ECHO) $$$$? > $$($1_EXITCODE) \ |
|
941 |
|| $$(ECHO) $$$$? > $$($1_EXITCODE) \ |
|
942 |
) |
|
44027 | 943 |
|
944 |
$1_RESULT_FILE := $$($1_TEST_RESULTS_DIR)/text/stats.txt |
|
945 |
||
946 |
parse-test-$1: run-test-$1 |
|
947 |
$$(call LogWarn, Finished running test '$$($1_TEST)') |
|
948 |
$$(call LogWarn, Test report is stored in $$(strip \ |
|
949 |
$$(subst $$(TOPDIR)/, , $$($1_TEST_RESULTS_DIR)))) |
|
48042 | 950 |
$$(if $$(wildcard $$($1_RESULT_FILE)), \ |
47259
0b347d8efb40
8187672: RunTest displays broken output if jtreg fails completely
ihse
parents:
47253
diff
changeset
|
951 |
$$(eval $1_PASSED := $$(shell $$(AWK) '{ gsub(/[,;]/, ""); \ |
0b347d8efb40
8187672: RunTest displays broken output if jtreg fails completely
ihse
parents:
47253
diff
changeset
|
952 |
for (i=1; i<=NF; i++) { if ($$$$i == "passed:") \ |
0b347d8efb40
8187672: RunTest displays broken output if jtreg fails completely
ihse
parents:
47253
diff
changeset
|
953 |
print $$$$(i+1) } }' $$($1_RESULT_FILE))) \ |
0b347d8efb40
8187672: RunTest displays broken output if jtreg fails completely
ihse
parents:
47253
diff
changeset
|
954 |
$$(if $$($1_PASSED), , $$(eval $1_PASSED := 0)) \ |
0b347d8efb40
8187672: RunTest displays broken output if jtreg fails completely
ihse
parents:
47253
diff
changeset
|
955 |
$$(eval $1_FAILED := $$(shell $$(AWK) '{gsub(/[,;]/, ""); \ |
0b347d8efb40
8187672: RunTest displays broken output if jtreg fails completely
ihse
parents:
47253
diff
changeset
|
956 |
for (i=1; i<=NF; i++) { if ($$$$i == "failed:") \ |
0b347d8efb40
8187672: RunTest displays broken output if jtreg fails completely
ihse
parents:
47253
diff
changeset
|
957 |
print $$$$(i+1) } }' $$($1_RESULT_FILE))) \ |
0b347d8efb40
8187672: RunTest displays broken output if jtreg fails completely
ihse
parents:
47253
diff
changeset
|
958 |
$$(if $$($1_FAILED), , $$(eval $1_FAILED := 0)) \ |
0b347d8efb40
8187672: RunTest displays broken output if jtreg fails completely
ihse
parents:
47253
diff
changeset
|
959 |
$$(eval $1_ERROR := $$(shell $$(AWK) '{gsub(/[,;]/, ""); \ |
0b347d8efb40
8187672: RunTest displays broken output if jtreg fails completely
ihse
parents:
47253
diff
changeset
|
960 |
for (i=1; i<=NF; i++) { if ($$$$i == "error:") \ |
0b347d8efb40
8187672: RunTest displays broken output if jtreg fails completely
ihse
parents:
47253
diff
changeset
|
961 |
print $$$$(i+1) } }' $$($1_RESULT_FILE))) \ |
0b347d8efb40
8187672: RunTest displays broken output if jtreg fails completely
ihse
parents:
47253
diff
changeset
|
962 |
$$(if $$($1_ERROR), , $$(eval $1_ERROR := 0)) \ |
0b347d8efb40
8187672: RunTest displays broken output if jtreg fails completely
ihse
parents:
47253
diff
changeset
|
963 |
$$(eval $1_TOTAL := $$(shell \ |
0b347d8efb40
8187672: RunTest displays broken output if jtreg fails completely
ihse
parents:
47253
diff
changeset
|
964 |
$$(EXPR) $$($1_PASSED) + $$($1_FAILED) + $$($1_ERROR))) \ |
0b347d8efb40
8187672: RunTest displays broken output if jtreg fails completely
ihse
parents:
47253
diff
changeset
|
965 |
, \ |
0b347d8efb40
8187672: RunTest displays broken output if jtreg fails completely
ihse
parents:
47253
diff
changeset
|
966 |
$$(eval $1_PASSED := 0) \ |
0b347d8efb40
8187672: RunTest displays broken output if jtreg fails completely
ihse
parents:
47253
diff
changeset
|
967 |
$$(eval $1_FAILED := 0) \ |
0b347d8efb40
8187672: RunTest displays broken output if jtreg fails completely
ihse
parents:
47253
diff
changeset
|
968 |
$$(eval $1_ERROR := 1) \ |
0b347d8efb40
8187672: RunTest displays broken output if jtreg fails completely
ihse
parents:
47253
diff
changeset
|
969 |
$$(eval $1_TOTAL := 1) \ |
0b347d8efb40
8187672: RunTest displays broken output if jtreg fails completely
ihse
parents:
47253
diff
changeset
|
970 |
) |
44027 | 971 |
|
53465
d982794784f1
8217626: Add setup/teardown functionality to RunTest
ihse
parents:
53464
diff
changeset
|
972 |
$1: run-test-$1 parse-test-$1 clean-workdir-$1 |
d982794784f1
8217626: Add setup/teardown functionality to RunTest
ihse
parents:
53464
diff
changeset
|
973 |
|
d982794784f1
8217626: Add setup/teardown functionality to RunTest
ihse
parents:
53464
diff
changeset
|
974 |
TARGETS += $1 run-test-$1 parse-test-$1 clean-workdir-$1 |
d982794784f1
8217626: Add setup/teardown functionality to RunTest
ihse
parents:
53464
diff
changeset
|
975 |
TEST_TARGETS += parse-test-$1 |
d982794784f1
8217626: Add setup/teardown functionality to RunTest
ihse
parents:
53464
diff
changeset
|
976 |
|
44027 | 977 |
endef |
978 |
||
48061
665769d3cee4
8193014: Add "special" tests to run-test to cover odd cases
ihse
parents:
48058
diff
changeset
|
979 |
################################################################################ |
665769d3cee4
8193014: Add "special" tests to run-test to cover odd cases
ihse
parents:
48058
diff
changeset
|
980 |
|
665769d3cee4
8193014: Add "special" tests to run-test to cover odd cases
ihse
parents:
48058
diff
changeset
|
981 |
### Rules for special tests |
665769d3cee4
8193014: Add "special" tests to run-test to cover odd cases
ihse
parents:
48058
diff
changeset
|
982 |
|
665769d3cee4
8193014: Add "special" tests to run-test to cover odd cases
ihse
parents:
48058
diff
changeset
|
983 |
SetupRunSpecialTest = $(NamedParamsMacroTemplate) |
665769d3cee4
8193014: Add "special" tests to run-test to cover odd cases
ihse
parents:
48058
diff
changeset
|
984 |
define SetupRunSpecialTestBody |
665769d3cee4
8193014: Add "special" tests to run-test to cover odd cases
ihse
parents:
48058
diff
changeset
|
985 |
$1_TEST_RESULTS_DIR := $$(TEST_RESULTS_DIR)/$1 |
665769d3cee4
8193014: Add "special" tests to run-test to cover odd cases
ihse
parents:
48058
diff
changeset
|
986 |
$1_TEST_SUPPORT_DIR := $$(TEST_SUPPORT_DIR)/$1 |
665769d3cee4
8193014: Add "special" tests to run-test to cover odd cases
ihse
parents:
48058
diff
changeset
|
987 |
$1_EXITCODE := $$($1_TEST_RESULTS_DIR)/exitcode.txt |
665769d3cee4
8193014: Add "special" tests to run-test to cover odd cases
ihse
parents:
48058
diff
changeset
|
988 |
|
665769d3cee4
8193014: Add "special" tests to run-test to cover odd cases
ihse
parents:
48058
diff
changeset
|
989 |
$1_FULL_TEST_NAME := $$(strip $$(patsubst special:%, %, $$($1_TEST))) |
665769d3cee4
8193014: Add "special" tests to run-test to cover odd cases
ihse
parents:
48058
diff
changeset
|
990 |
ifneq ($$(findstring :, $$($1_FULL_TEST_NAME)), ) |
665769d3cee4
8193014: Add "special" tests to run-test to cover odd cases
ihse
parents:
48058
diff
changeset
|
991 |
$1_TEST_NAME := $$(firstword $$(subst :, ,$$($1_FULL_TEST_NAME))) |
665769d3cee4
8193014: Add "special" tests to run-test to cover odd cases
ihse
parents:
48058
diff
changeset
|
992 |
$1_TEST_ARGS := $$(strip $$(patsubst special:$$($1_TEST_NAME):%, %, $$($1_TEST))) |
665769d3cee4
8193014: Add "special" tests to run-test to cover odd cases
ihse
parents:
48058
diff
changeset
|
993 |
else |
665769d3cee4
8193014: Add "special" tests to run-test to cover odd cases
ihse
parents:
48058
diff
changeset
|
994 |
$1_TEST_NAME := $$($1_FULL_TEST_NAME) |
665769d3cee4
8193014: Add "special" tests to run-test to cover odd cases
ihse
parents:
48058
diff
changeset
|
995 |
$1_TEST_ARGS := |
665769d3cee4
8193014: Add "special" tests to run-test to cover odd cases
ihse
parents:
48058
diff
changeset
|
996 |
endif |
665769d3cee4
8193014: Add "special" tests to run-test to cover odd cases
ihse
parents:
48058
diff
changeset
|
997 |
|
52396
e292e94b448a
8213058: remove ExecuteInternalVMTests and VerboseInternalVMTests flags
iignatyev
parents:
52393
diff
changeset
|
998 |
ifeq ($$($1_TEST_NAME), failure-handler) |
52342 | 999 |
ifeq ($(BUILD_FAILURE_HANDLER), true) |
1000 |
$1_TEST_COMMAND_LINE := \ |
|
1001 |
($(CD) $(TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) -f \ |
|
1002 |
BuildFailureHandler.gmk test) |
|
1003 |
else |
|
1004 |
$$(error Cannot test failure handler if it is not built) |
|
1005 |
endif |
|
48061
665769d3cee4
8193014: Add "special" tests to run-test to cover odd cases
ihse
parents:
48058
diff
changeset
|
1006 |
else ifeq ($$($1_TEST_NAME), make) |
665769d3cee4
8193014: Add "special" tests to run-test to cover odd cases
ihse
parents:
48058
diff
changeset
|
1007 |
$1_TEST_COMMAND_LINE := \ |
665769d3cee4
8193014: Add "special" tests to run-test to cover odd cases
ihse
parents:
48058
diff
changeset
|
1008 |
($(CD) $(TOPDIR)/test/make && $(MAKE) $(MAKE_ARGS) -f \ |
665769d3cee4
8193014: Add "special" tests to run-test to cover odd cases
ihse
parents:
48058
diff
changeset
|
1009 |
TestMake.gmk $$($1_TEST_ARGS)) |
665769d3cee4
8193014: Add "special" tests to run-test to cover odd cases
ihse
parents:
48058
diff
changeset
|
1010 |
else |
665769d3cee4
8193014: Add "special" tests to run-test to cover odd cases
ihse
parents:
48058
diff
changeset
|
1011 |
$$(error Invalid special test specification: $$($1_TEST_NAME)) |
665769d3cee4
8193014: Add "special" tests to run-test to cover odd cases
ihse
parents:
48058
diff
changeset
|
1012 |
endif |
665769d3cee4
8193014: Add "special" tests to run-test to cover odd cases
ihse
parents:
48058
diff
changeset
|
1013 |
|
53465
d982794784f1
8217626: Add setup/teardown functionality to RunTest
ihse
parents:
53464
diff
changeset
|
1014 |
run-test-$1: pre-run-test |
48061
665769d3cee4
8193014: Add "special" tests to run-test to cover odd cases
ihse
parents:
48058
diff
changeset
|
1015 |
$$(call LogWarn) |
665769d3cee4
8193014: Add "special" tests to run-test to cover odd cases
ihse
parents:
48058
diff
changeset
|
1016 |
$$(call LogWarn, Running test '$$($1_TEST)') |
665769d3cee4
8193014: Add "special" tests to run-test to cover odd cases
ihse
parents:
48058
diff
changeset
|
1017 |
$$(call MakeDir, $$($1_TEST_RESULTS_DIR) $$($1_TEST_SUPPORT_DIR)) |
665769d3cee4
8193014: Add "special" tests to run-test to cover odd cases
ihse
parents:
48058
diff
changeset
|
1018 |
$$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/test-execution, \ |
665769d3cee4
8193014: Add "special" tests to run-test to cover odd cases
ihse
parents:
48058
diff
changeset
|
1019 |
$$($1_TEST_COMMAND_LINE) \ |
665769d3cee4
8193014: Add "special" tests to run-test to cover odd cases
ihse
parents:
48058
diff
changeset
|
1020 |
> >($(TEE) $$($1_TEST_RESULTS_DIR)/test-output.txt) \ |
665769d3cee4
8193014: Add "special" tests to run-test to cover odd cases
ihse
parents:
48058
diff
changeset
|
1021 |
&& $$(ECHO) $$$$? > $$($1_EXITCODE) \ |
665769d3cee4
8193014: Add "special" tests to run-test to cover odd cases
ihse
parents:
48058
diff
changeset
|
1022 |
|| $$(ECHO) $$$$? > $$($1_EXITCODE) \ |
665769d3cee4
8193014: Add "special" tests to run-test to cover odd cases
ihse
parents:
48058
diff
changeset
|
1023 |
) |
665769d3cee4
8193014: Add "special" tests to run-test to cover odd cases
ihse
parents:
48058
diff
changeset
|
1024 |
|
665769d3cee4
8193014: Add "special" tests to run-test to cover odd cases
ihse
parents:
48058
diff
changeset
|
1025 |
$1_RESULT_FILE := $$($1_TEST_RESULTS_DIR)/gtest.txt |
665769d3cee4
8193014: Add "special" tests to run-test to cover odd cases
ihse
parents:
48058
diff
changeset
|
1026 |
|
665769d3cee4
8193014: Add "special" tests to run-test to cover odd cases
ihse
parents:
48058
diff
changeset
|
1027 |
# We can not parse the various "special" tests. |
665769d3cee4
8193014: Add "special" tests to run-test to cover odd cases
ihse
parents:
48058
diff
changeset
|
1028 |
parse-test-$1: run-test-$1 |
665769d3cee4
8193014: Add "special" tests to run-test to cover odd cases
ihse
parents:
48058
diff
changeset
|
1029 |
$$(call LogWarn, Finished running test '$$($1_TEST)') |
665769d3cee4
8193014: Add "special" tests to run-test to cover odd cases
ihse
parents:
48058
diff
changeset
|
1030 |
$$(call LogWarn, Test report is stored in $$(strip \ |
665769d3cee4
8193014: Add "special" tests to run-test to cover odd cases
ihse
parents:
48058
diff
changeset
|
1031 |
$$(subst $$(TOPDIR)/, , $$($1_TEST_RESULTS_DIR)))) |
665769d3cee4
8193014: Add "special" tests to run-test to cover odd cases
ihse
parents:
48058
diff
changeset
|
1032 |
$$(call LogWarn, Warning: Special test results are not properly parsed!) |
665769d3cee4
8193014: Add "special" tests to run-test to cover odd cases
ihse
parents:
48058
diff
changeset
|
1033 |
$$(eval $1_PASSED := 0) |
665769d3cee4
8193014: Add "special" tests to run-test to cover odd cases
ihse
parents:
48058
diff
changeset
|
1034 |
$$(eval $1_FAILED := 0) |
665769d3cee4
8193014: Add "special" tests to run-test to cover odd cases
ihse
parents:
48058
diff
changeset
|
1035 |
$$(eval $1_ERROR := 0) |
665769d3cee4
8193014: Add "special" tests to run-test to cover odd cases
ihse
parents:
48058
diff
changeset
|
1036 |
$$(eval $1_TOTAL := 0) |
665769d3cee4
8193014: Add "special" tests to run-test to cover odd cases
ihse
parents:
48058
diff
changeset
|
1037 |
|
53465
d982794784f1
8217626: Add setup/teardown functionality to RunTest
ihse
parents:
53464
diff
changeset
|
1038 |
$1: run-test-$1 parse-test-$1 |
d982794784f1
8217626: Add setup/teardown functionality to RunTest
ihse
parents:
53464
diff
changeset
|
1039 |
|
d982794784f1
8217626: Add setup/teardown functionality to RunTest
ihse
parents:
53464
diff
changeset
|
1040 |
TARGETS += $1 run-test-$1 parse-test-$1 |
d982794784f1
8217626: Add setup/teardown functionality to RunTest
ihse
parents:
53464
diff
changeset
|
1041 |
TEST_TARGETS += parse-test-$1 |
d982794784f1
8217626: Add setup/teardown functionality to RunTest
ihse
parents:
53464
diff
changeset
|
1042 |
|
48061
665769d3cee4
8193014: Add "special" tests to run-test to cover odd cases
ihse
parents:
48058
diff
changeset
|
1043 |
endef |
44027 | 1044 |
|
1045 |
################################################################################ |
|
1046 |
# Setup and execute make rules for all selected tests |
|
1047 |
################################################################################ |
|
1048 |
||
1049 |
# Helper function to determine which handler to use for the given test |
|
1050 |
UseGtestTestHandler = \ |
|
1051 |
$(if $(filter gtest:%, $1), true) |
|
1052 |
||
52595
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
1053 |
UseMicroTestHandler = \ |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
1054 |
$(if $(filter micro:%, $1), true) |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
1055 |
|
44027 | 1056 |
UseJtregTestHandler = \ |
1057 |
$(if $(filter jtreg:%, $1), true) |
|
1058 |
||
48061
665769d3cee4
8193014: Add "special" tests to run-test to cover odd cases
ihse
parents:
48058
diff
changeset
|
1059 |
UseSpecialTestHandler = \ |
665769d3cee4
8193014: Add "special" tests to run-test to cover odd cases
ihse
parents:
48058
diff
changeset
|
1060 |
$(if $(filter special:%, $1), true) |
665769d3cee4
8193014: Add "special" tests to run-test to cover odd cases
ihse
parents:
48058
diff
changeset
|
1061 |
|
44027 | 1062 |
# Now process each test to run and setup a proper make rule |
1063 |
$(foreach test, $(TESTS_TO_RUN), \ |
|
1064 |
$(eval TEST_ID := $(shell $(ECHO) $(strip $(test)) | \ |
|
48042 | 1065 |
$(TR) -cs '[a-z][A-Z][0-9]\n' '[_*1000]')) \ |
44027 | 1066 |
$(eval ALL_TEST_IDS += $(TEST_ID)) \ |
1067 |
$(if $(call UseCustomTestHandler, $(test)), \ |
|
1068 |
$(eval $(call SetupRunCustomTest, $(TEST_ID), \ |
|
1069 |
TEST := $(test), \ |
|
1070 |
)) \ |
|
1071 |
) \ |
|
1072 |
$(if $(call UseGtestTestHandler, $(test)), \ |
|
1073 |
$(eval $(call SetupRunGtestTest, $(TEST_ID), \ |
|
1074 |
TEST := $(test), \ |
|
1075 |
)) \ |
|
1076 |
) \ |
|
52595
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
1077 |
$(if $(call UseMicroTestHandler, $(test)), \ |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
1078 |
$(eval $(call SetupRunMicroTest, $(TEST_ID), \ |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
1079 |
TEST := $(test), \ |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
1080 |
)) \ |
16609197022c
8061281: Microbenchmark suite build support, directory layout and sample benchmarks
redestad
parents:
52593
diff
changeset
|
1081 |
) \ |
44027 | 1082 |
$(if $(call UseJtregTestHandler, $(test)), \ |
1083 |
$(eval $(call SetupRunJtregTest, $(TEST_ID), \ |
|
1084 |
TEST := $(test), \ |
|
1085 |
)) \ |
|
1086 |
) \ |
|
48061
665769d3cee4
8193014: Add "special" tests to run-test to cover odd cases
ihse
parents:
48058
diff
changeset
|
1087 |
$(if $(call UseSpecialTestHandler, $(test)), \ |
665769d3cee4
8193014: Add "special" tests to run-test to cover odd cases
ihse
parents:
48058
diff
changeset
|
1088 |
$(eval $(call SetupRunSpecialTest, $(TEST_ID), \ |
665769d3cee4
8193014: Add "special" tests to run-test to cover odd cases
ihse
parents:
48058
diff
changeset
|
1089 |
TEST := $(test), \ |
665769d3cee4
8193014: Add "special" tests to run-test to cover odd cases
ihse
parents:
48058
diff
changeset
|
1090 |
)) \ |
665769d3cee4
8193014: Add "special" tests to run-test to cover odd cases
ihse
parents:
48058
diff
changeset
|
1091 |
) \ |
44027 | 1092 |
) |
1093 |
||
1094 |
# Sort also removes duplicates, so if there is any we'll get fewer words. |
|
1095 |
ifneq ($(words $(ALL_TEST_IDS)), $(words $(sort $(ALL_TEST_IDS)))) |
|
1096 |
$(error Duplicate test specification) |
|
1097 |
endif |
|
1098 |
||
1099 |
||
1100 |
################################################################################ |
|
1101 |
# The main target for RunTests.gmk |
|
1102 |
################################################################################ |
|
1103 |
||
53465
d982794784f1
8217626: Add setup/teardown functionality to RunTest
ihse
parents:
53464
diff
changeset
|
1104 |
# |
d982794784f1
8217626: Add setup/teardown functionality to RunTest
ihse
parents:
53464
diff
changeset
|
1105 |
# Provide hooks for adding functionality before and after all tests are run. |
d982794784f1
8217626: Add setup/teardown functionality to RunTest
ihse
parents:
53464
diff
changeset
|
1106 |
# |
d982794784f1
8217626: Add setup/teardown functionality to RunTest
ihse
parents:
53464
diff
changeset
|
1107 |
|
d982794784f1
8217626: Add setup/teardown functionality to RunTest
ihse
parents:
53464
diff
changeset
|
1108 |
$(call LogInfo, RunTest setup starting) |
d982794784f1
8217626: Add setup/teardown functionality to RunTest
ihse
parents:
53464
diff
changeset
|
1109 |
|
d982794784f1
8217626: Add setup/teardown functionality to RunTest
ihse
parents:
53464
diff
changeset
|
1110 |
# This target depends on all actual test having been run (TEST_TARGETS has beeen |
d982794784f1
8217626: Add setup/teardown functionality to RunTest
ihse
parents:
53464
diff
changeset
|
1111 |
# populated by the SetupRun*Test functions). If you need to provide a teardown |
d982794784f1
8217626: Add setup/teardown functionality to RunTest
ihse
parents:
53464
diff
changeset
|
1112 |
# hook, you must let it depend on this target. |
d982794784f1
8217626: Add setup/teardown functionality to RunTest
ihse
parents:
53464
diff
changeset
|
1113 |
run-all-tests: $(TEST_TARGETS) |
d982794784f1
8217626: Add setup/teardown functionality to RunTest
ihse
parents:
53464
diff
changeset
|
1114 |
$(call LogInfo, RunTest teardown starting) |
44027 | 1115 |
|
53465
d982794784f1
8217626: Add setup/teardown functionality to RunTest
ihse
parents:
53464
diff
changeset
|
1116 |
# This is an abstract target that will be run before any actual tests. Add your |
d982794784f1
8217626: Add setup/teardown functionality to RunTest
ihse
parents:
53464
diff
changeset
|
1117 |
# target as a dependency to thisif you need "setup" type functionality executed |
d982794784f1
8217626: Add setup/teardown functionality to RunTest
ihse
parents:
53464
diff
changeset
|
1118 |
# before all tests. |
d982794784f1
8217626: Add setup/teardown functionality to RunTest
ihse
parents:
53464
diff
changeset
|
1119 |
pre-run-test: |
d982794784f1
8217626: Add setup/teardown functionality to RunTest
ihse
parents:
53464
diff
changeset
|
1120 |
$(call LogInfo, RunTest setup done) |
d982794784f1
8217626: Add setup/teardown functionality to RunTest
ihse
parents:
53464
diff
changeset
|
1121 |
|
d982794784f1
8217626: Add setup/teardown functionality to RunTest
ihse
parents:
53464
diff
changeset
|
1122 |
# This is an abstract target that will be run after all actual tests, but before |
d982794784f1
8217626: Add setup/teardown functionality to RunTest
ihse
parents:
53464
diff
changeset
|
1123 |
# the test summary. If you need "teardown" type functionality, add your target |
d982794784f1
8217626: Add setup/teardown functionality to RunTest
ihse
parents:
53464
diff
changeset
|
1124 |
# as a dependency on this, and let the teardown target depend on run-all-tests. |
d982794784f1
8217626: Add setup/teardown functionality to RunTest
ihse
parents:
53464
diff
changeset
|
1125 |
post-run-test: run-all-tests |
d982794784f1
8217626: Add setup/teardown functionality to RunTest
ihse
parents:
53464
diff
changeset
|
1126 |
$(call LogInfo, RunTest teardown done) |
d982794784f1
8217626: Add setup/teardown functionality to RunTest
ihse
parents:
53464
diff
changeset
|
1127 |
|
d982794784f1
8217626: Add setup/teardown functionality to RunTest
ihse
parents:
53464
diff
changeset
|
1128 |
# |
d982794784f1
8217626: Add setup/teardown functionality to RunTest
ihse
parents:
53464
diff
changeset
|
1129 |
# Create and print a table of the result of all tests run |
d982794784f1
8217626: Add setup/teardown functionality to RunTest
ihse
parents:
53464
diff
changeset
|
1130 |
# |
44027 | 1131 |
TEST_FAILURE := false |
1132 |
||
53465
d982794784f1
8217626: Add setup/teardown functionality to RunTest
ihse
parents:
53464
diff
changeset
|
1133 |
run-test-report: post-run-test |
47943 | 1134 |
$(RM) $(TEST_SUMMARY).old 2> /dev/null |
1135 |
$(MV) $(TEST_SUMMARY) $(TEST_SUMMARY).old 2> /dev/null || true |
|
48042 | 1136 |
$(RM) $(TEST_LAST_IDS).old 2> /dev/null |
1137 |
$(MV) $(TEST_LAST_IDS) $(TEST_LAST_IDS).old 2> /dev/null || true |
|
47943 | 1138 |
$(ECHO) >> $(TEST_SUMMARY) ============================== |
1139 |
$(ECHO) >> $(TEST_SUMMARY) Test summary |
|
1140 |
$(ECHO) >> $(TEST_SUMMARY) ============================== |
|
1141 |
$(PRINTF) >> $(TEST_SUMMARY) "%2s %-49s %5s %5s %5s %5s %2s\n" " " \ |
|
1142 |
TEST TOTAL PASS FAIL ERROR " " |
|
44027 | 1143 |
$(foreach test, $(TESTS_TO_RUN), \ |
1144 |
$(eval TEST_ID := $(shell $(ECHO) $(strip $(test)) | \ |
|
48042 | 1145 |
$(TR) -cs '[a-z][A-Z][0-9]\n' '[_*1000]')) \ |
1146 |
$(ECHO) >> $(TEST_LAST_IDS) $(TEST_ID) $(NEWLINE) \ |
|
1147 |
$(eval NAME_PATTERN := $(shell $(ECHO) $(test) | $(TR) -c '\n' '[_*1000]')) \ |
|
47937
c1437939b0d8
8177957: run-test summary lines look bad/misleading with long test names
ihse
parents:
47932
diff
changeset
|
1148 |
$(if $(filter __________________________________________________%, $(NAME_PATTERN)), \ |
c1437939b0d8
8177957: run-test summary lines look bad/misleading with long test names
ihse
parents:
47932
diff
changeset
|
1149 |
$(eval TEST_NAME := ) \ |
47943 | 1150 |
$(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
|
1151 |
, \ |
c1437939b0d8
8177957: run-test summary lines look bad/misleading with long test names
ihse
parents:
47932
diff
changeset
|
1152 |
$(eval TEST_NAME := $(test)) \ |
c1437939b0d8
8177957: run-test summary lines look bad/misleading with long test names
ihse
parents:
47932
diff
changeset
|
1153 |
) \ |
44027 | 1154 |
$(if $(filter $($(TEST_ID)_PASSED), $($(TEST_ID)_TOTAL)), \ |
47943 | 1155 |
$(PRINTF) >> $(TEST_SUMMARY) "%2s %-49s %5d %5d %5d %5d %2s\n" \ |
1156 |
" " "$(TEST_NAME)" $($(TEST_ID)_TOTAL) $($(TEST_ID)_PASSED) \ |
|
1157 |
$($(TEST_ID)_FAILED) $($(TEST_ID)_ERROR) " " $(NEWLINE) \ |
|
44027 | 1158 |
, \ |
47943 | 1159 |
$(PRINTF) >> $(TEST_SUMMARY) "%2s %-49s %5d %5d %5d %5d %2s\n" \ |
1160 |
">>" "$(TEST_NAME)" $($(TEST_ID)_TOTAL) $($(TEST_ID)_PASSED) \ |
|
1161 |
$($(TEST_ID)_FAILED) $($(TEST_ID)_ERROR) "<<" $(NEWLINE) \ |
|
44027 | 1162 |
$(eval TEST_FAILURE := true) \ |
1163 |
) \ |
|
1164 |
) |
|
47943 | 1165 |
$(ECHO) >> $(TEST_SUMMARY) ============================== |
44027 | 1166 |
$(if $(filter true, $(TEST_FAILURE)), \ |
47943 | 1167 |
$(ECHO) >> $(TEST_SUMMARY) TEST FAILURE $(NEWLINE) \ |
1168 |
$(MKDIR) -p $(MAKESUPPORT_OUTPUTDIR) $(NEWLINE) \ |
|
44027 | 1169 |
$(TOUCH) $(MAKESUPPORT_OUTPUTDIR)/exit-with-error \ |
1170 |
, \ |
|
47943 | 1171 |
$(ECHO) >> $(TEST_SUMMARY) TEST SUCCESS \ |
44027 | 1172 |
) |
1173 |
$(ECHO) |
|
47943 | 1174 |
$(CAT) $(TEST_SUMMARY) |
1175 |
$(ECHO) |
|
44027 | 1176 |
|
53465
d982794784f1
8217626: Add setup/teardown functionality to RunTest
ihse
parents:
53464
diff
changeset
|
1177 |
# The main run-test target |
d982794784f1
8217626: Add setup/teardown functionality to RunTest
ihse
parents:
53464
diff
changeset
|
1178 |
run-test: run-test-report |
d982794784f1
8217626: Add setup/teardown functionality to RunTest
ihse
parents:
53464
diff
changeset
|
1179 |
|
d982794784f1
8217626: Add setup/teardown functionality to RunTest
ihse
parents:
53464
diff
changeset
|
1180 |
TARGETS += run-all-tests pre-run-test post-run-test run-test-report run-test |
d982794784f1
8217626: Add setup/teardown functionality to RunTest
ihse
parents:
53464
diff
changeset
|
1181 |
|
44027 | 1182 |
################################################################################ |
53295
520f8e2041bb
8215729: Enhance makefiles to allow collecting code coverage with JCov
shurailine
parents:
52790
diff
changeset
|
1183 |
# Setup JCov |
520f8e2041bb
8215729: Enhance makefiles to allow collecting code coverage with JCov
shurailine
parents:
52790
diff
changeset
|
1184 |
################################################################################ |
520f8e2041bb
8215729: Enhance makefiles to allow collecting code coverage with JCov
shurailine
parents:
52790
diff
changeset
|
1185 |
|
520f8e2041bb
8215729: Enhance makefiles to allow collecting code coverage with JCov
shurailine
parents:
52790
diff
changeset
|
1186 |
ifeq ($(TEST_OPTS_JCOV), true) |
520f8e2041bb
8215729: Enhance makefiles to allow collecting code coverage with JCov
shurailine
parents:
52790
diff
changeset
|
1187 |
|
520f8e2041bb
8215729: Enhance makefiles to allow collecting code coverage with JCov
shurailine
parents:
52790
diff
changeset
|
1188 |
jcov-do-start-grabber: |
520f8e2041bb
8215729: Enhance makefiles to allow collecting code coverage with JCov
shurailine
parents:
52790
diff
changeset
|
1189 |
$(call MakeDir, $(JCOV_OUTPUT_DIR)) |
520f8e2041bb
8215729: Enhance makefiles to allow collecting code coverage with JCov
shurailine
parents:
52790
diff
changeset
|
1190 |
if $(JAVA) -jar $(JCOV_HOME)/lib/jcov.jar GrabberManager -status 1>/dev/null 2>&1 ; then \ |
520f8e2041bb
8215729: Enhance makefiles to allow collecting code coverage with JCov
shurailine
parents:
52790
diff
changeset
|
1191 |
$(JAVA) -jar $(JCOV_HOME)/lib/jcov.jar GrabberManager -stop -stoptimeout 3600 ; \ |
520f8e2041bb
8215729: Enhance makefiles to allow collecting code coverage with JCov
shurailine
parents:
52790
diff
changeset
|
1192 |
fi |
520f8e2041bb
8215729: Enhance makefiles to allow collecting code coverage with JCov
shurailine
parents:
52790
diff
changeset
|
1193 |
$(JAVA) -Xmx4g -jar $(JCOV_HOME)/lib/jcov.jar Grabber -v -t \ |
520f8e2041bb
8215729: Enhance makefiles to allow collecting code coverage with JCov
shurailine
parents:
52790
diff
changeset
|
1194 |
$(JCOV_IMAGE_DIR)/template.xml -o $(JCOV_RESULT_FILE) \ |
520f8e2041bb
8215729: Enhance makefiles to allow collecting code coverage with JCov
shurailine
parents:
52790
diff
changeset
|
1195 |
1>$(JCOV_GRABBER_LOG) 2>&1 & |
520f8e2041bb
8215729: Enhance makefiles to allow collecting code coverage with JCov
shurailine
parents:
52790
diff
changeset
|
1196 |
|
520f8e2041bb
8215729: Enhance makefiles to allow collecting code coverage with JCov
shurailine
parents:
52790
diff
changeset
|
1197 |
jcov-start-grabber: jcov-do-start-grabber |
520f8e2041bb
8215729: Enhance makefiles to allow collecting code coverage with JCov
shurailine
parents:
52790
diff
changeset
|
1198 |
$(call LogWarn, Starting JCov Grabber...) |
520f8e2041bb
8215729: Enhance makefiles to allow collecting code coverage with JCov
shurailine
parents:
52790
diff
changeset
|
1199 |
$(JAVA) -jar $(JCOV_HOME)/lib/jcov.jar GrabberManager -t 600 -wait |
520f8e2041bb
8215729: Enhance makefiles to allow collecting code coverage with JCov
shurailine
parents:
52790
diff
changeset
|
1200 |
|
520f8e2041bb
8215729: Enhance makefiles to allow collecting code coverage with JCov
shurailine
parents:
52790
diff
changeset
|
1201 |
jcov-stop-grabber: |
520f8e2041bb
8215729: Enhance makefiles to allow collecting code coverage with JCov
shurailine
parents:
52790
diff
changeset
|
1202 |
$(call LogWarn, Stopping JCov Grabber...) |
520f8e2041bb
8215729: Enhance makefiles to allow collecting code coverage with JCov
shurailine
parents:
52790
diff
changeset
|
1203 |
$(JAVA) -jar $(JCOV_HOME)/lib/jcov.jar GrabberManager -stop -stoptimeout 3600 |
520f8e2041bb
8215729: Enhance makefiles to allow collecting code coverage with JCov
shurailine
parents:
52790
diff
changeset
|
1204 |
|
54516
5b1ad4cbe59e
8221857: Collect code coverage for a subset of code
shurailine
parents:
53857
diff
changeset
|
1205 |
JCOV_REPORT_TITLE := JDK code coverage report<br/> |
5b1ad4cbe59e
8221857: Collect code coverage for a subset of code
shurailine
parents:
53857
diff
changeset
|
1206 |
ifneq ($(JCOV_FILTERS), ) |
5b1ad4cbe59e
8221857: Collect code coverage for a subset of code
shurailine
parents:
53857
diff
changeset
|
1207 |
JCOV_REPORT_TITLE += Code filters: $(JCOV_FILTERS)<br> |
5b1ad4cbe59e
8221857: Collect code coverage for a subset of code
shurailine
parents:
53857
diff
changeset
|
1208 |
endif |
5b1ad4cbe59e
8221857: Collect code coverage for a subset of code
shurailine
parents:
53857
diff
changeset
|
1209 |
JCOV_REPORT_TITLE += Tests: $(TEST) |
55098
609dc5c60c06
8224011: Failure handling in ExecuteWithLog fails in run-test-prebuilt
erikj
parents:
54516
diff
changeset
|
1210 |
|
53465
d982794784f1
8217626: Add setup/teardown functionality to RunTest
ihse
parents:
53464
diff
changeset
|
1211 |
jcov-gen-report: jcov-stop-grabber |
53295
520f8e2041bb
8215729: Enhance makefiles to allow collecting code coverage with JCov
shurailine
parents:
52790
diff
changeset
|
1212 |
$(call LogWarn, Generating JCov report ...) |
520f8e2041bb
8215729: Enhance makefiles to allow collecting code coverage with JCov
shurailine
parents:
52790
diff
changeset
|
1213 |
$(JAVA) -Xmx4g -jar $(JCOV_HOME)/lib/jcov.jar RepGen -sourcepath \ |
520f8e2041bb
8215729: Enhance makefiles to allow collecting code coverage with JCov
shurailine
parents:
52790
diff
changeset
|
1214 |
`$(ECHO) $(TOPDIR)/src/*/share/classes/ | $(TR) ' ' ':'` -fmt html \ |
54516
5b1ad4cbe59e
8221857: Collect code coverage for a subset of code
shurailine
parents:
53857
diff
changeset
|
1215 |
$(JCOV_FILTERS) \ |
5b1ad4cbe59e
8221857: Collect code coverage for a subset of code
shurailine
parents:
53857
diff
changeset
|
1216 |
-mainReportTitle "$(JCOV_REPORT_TITLE)" \ |
53295
520f8e2041bb
8215729: Enhance makefiles to allow collecting code coverage with JCov
shurailine
parents:
52790
diff
changeset
|
1217 |
-o $(JCOV_REPORT) $(JCOV_RESULT_FILE) |
520f8e2041bb
8215729: Enhance makefiles to allow collecting code coverage with JCov
shurailine
parents:
52790
diff
changeset
|
1218 |
|
53465
d982794784f1
8217626: Add setup/teardown functionality to RunTest
ihse
parents:
53464
diff
changeset
|
1219 |
TARGETS += jcov-do-start-grabber jcov-start-grabber jcov-stop-grabber \ |
d982794784f1
8217626: Add setup/teardown functionality to RunTest
ihse
parents:
53464
diff
changeset
|
1220 |
jcov-gen-report |
d982794784f1
8217626: Add setup/teardown functionality to RunTest
ihse
parents:
53464
diff
changeset
|
1221 |
|
d982794784f1
8217626: Add setup/teardown functionality to RunTest
ihse
parents:
53464
diff
changeset
|
1222 |
# Hook this into the framework at appropriate places |
d982794784f1
8217626: Add setup/teardown functionality to RunTest
ihse
parents:
53464
diff
changeset
|
1223 |
pre-run-test: jcov-start-grabber |
d982794784f1
8217626: Add setup/teardown functionality to RunTest
ihse
parents:
53464
diff
changeset
|
1224 |
|
d982794784f1
8217626: Add setup/teardown functionality to RunTest
ihse
parents:
53464
diff
changeset
|
1225 |
post-run-test: jcov-gen-report |
d982794784f1
8217626: Add setup/teardown functionality to RunTest
ihse
parents:
53464
diff
changeset
|
1226 |
|
d982794784f1
8217626: Add setup/teardown functionality to RunTest
ihse
parents:
53464
diff
changeset
|
1227 |
jcov-gen-report: run-all-tests |
53295
520f8e2041bb
8215729: Enhance makefiles to allow collecting code coverage with JCov
shurailine
parents:
52790
diff
changeset
|
1228 |
|
520f8e2041bb
8215729: Enhance makefiles to allow collecting code coverage with JCov
shurailine
parents:
52790
diff
changeset
|
1229 |
endif |
520f8e2041bb
8215729: Enhance makefiles to allow collecting code coverage with JCov
shurailine
parents:
52790
diff
changeset
|
1230 |
|
520f8e2041bb
8215729: Enhance makefiles to allow collecting code coverage with JCov
shurailine
parents:
52790
diff
changeset
|
1231 |
################################################################################ |
44027 | 1232 |
|
1233 |
all: run-test |
|
1234 |
||
53465
d982794784f1
8217626: Add setup/teardown functionality to RunTest
ihse
parents:
53464
diff
changeset
|
1235 |
.PHONY: default all $(TARGETS) |