Skip to content

Commit b8e0b56

Browse files
Amos ShiGoeLin
Amos Shi
authored andcommitted
8226910: make it possible to use jtreg's -match via run-test framework
Reviewed-by: mdoerr Backport-of: b97433e
1 parent b714f1e commit b8e0b56

File tree

4 files changed

+22
-3
lines changed

4 files changed

+22
-3
lines changed

doc/building.html

+1
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,7 @@ <h2 id="native-compiler-toolchain-requirements">Native Compiler (Toolchain) Requ
296296
</tr>
297297
</tbody>
298298
</table>
299+
<p>All compilers are expected to be able to compile to the C99 language standard, as some C99 features are used in the source code. Microsoft Visual Studio doesn't fully support C99 so in practice shared code is limited to using C99 features that it does support.</p>
299300
<h3 id="gcc">gcc</h3>
300301
<p>The minimum accepted version of gcc is 4.8. Older versions will generate a warning by <code>configure</code> and are unlikely to work.</p>
301302
<p>The JDK is currently known to be able to compile with at least version 7.4 of gcc.</p>

doc/testing.html

+3
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,9 @@ <h4 id="extra_problem_lists">EXTRA_PROBLEM_LISTS</h4>
147147
<p>Use additional problem lists file or files, in addition to the default ProblemList.txt located at the JTReg test roots.</p>
148148
<p>If multiple file names are specified, they should be separated by space (or, to help avoid quoting issues, the special value <code>%20</code>).</p>
149149
<p>The file names should be either absolute, or relative to the JTReg test root of the tests to be run.</p>
150+
<h4 id="run_problem_lists">RUN_PROBLEM_LISTS</h4>
151+
<p>Use the problem lists to select tests instead of excluding them.</p>
152+
<p>Set to <code>true</code> or <code>false</code>. If <code>true</code>, JTReg will use <code>-match:</code> option, otherwise <code>-exclude:</code> will be used. Default is <code>false</code>.</p>
150153
<h4 id="options">OPTIONS</h4>
151154
<p>Additional options to the JTReg test framework.</p>
152155
<p>Use <code>JTREG=&quot;OPTIONS=--help all&quot;</code> to see all available JTReg options.</p>

doc/testing.md

+8
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,14 @@ help avoid quoting issues, the special value `%20`).
297297
The file names should be either absolute, or relative to the JTReg test root of
298298
the tests to be run.
299299

300+
#### RUN_PROBLEM_LISTS
301+
302+
Use the problem lists to select tests instead of excluding them.
303+
304+
Set to `true` or `false`.
305+
If `true`, JTReg will use `-match:` option, otherwise `-exclude:` will be used.
306+
Default is `false`.
307+
300308

301309
#### OPTIONS
302310
Additional options to the JTReg test framework.

make/RunTests.gmk

+10-3
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ $(eval $(call SetTestOpt,TIMEOUT_FACTOR,JTREG))
264264

265265
$(eval $(call ParseKeywordVariable, JTREG, \
266266
SINGLE_KEYWORDS := JOBS TIMEOUT_FACTOR TEST_MODE ASSERT VERBOSE RETAIN \
267-
MAX_MEM RETRY_COUNT REPEAT_COUNT, \
267+
MAX_MEM RUN_PROBLEM_LISTS RETRY_COUNT REPEAT_COUNT, \
268268
STRING_KEYWORDS := OPTIONS JAVA_OPTIONS VM_OPTIONS KEYWORDS \
269269
EXTRA_PROBLEM_LISTS AOT_MODULES, \
270270
))
@@ -639,6 +639,7 @@ define SetupRunJtregTestBody
639639
endif
640640
JTREG_VERBOSE ?= fail,error,summary
641641
JTREG_RETAIN ?= fail,error
642+
JTREG_RUN_PROBLEM_LISTS ?= false
642643
JTREG_RETRY_COUNT ?= 0
643644
JTREG_REPEAT_COUNT ?= 0
644645

@@ -692,13 +693,19 @@ define SetupRunJtregTestBody
692693
$1_JTREG_BASIC_OPTIONS += -nativepath:$$($1_JTREG_NATIVEPATH)
693694
endif
694695

696+
ifeq ($$(JTREG_RUN_PROBLEM_LISTS), true)
697+
JTREG_PROBLEM_LIST_PREFIX := -match:
698+
else
699+
JTREG_PROBLEM_LIST_PREFIX := -exclude:
700+
endif
701+
695702
ifneq ($$($1_JTREG_PROBLEM_LIST), )
696-
$1_JTREG_BASIC_OPTIONS += $$(addprefix -exclude:, $$($1_JTREG_PROBLEM_LIST))
703+
$1_JTREG_BASIC_OPTIONS += $$(addprefix $$(JTREG_PROBLEM_LIST_PREFIX), $$($1_JTREG_PROBLEM_LIST))
697704
endif
698705

699706
ifneq ($$(JTREG_EXTRA_PROBLEM_LISTS), )
700707
# Accept both absolute paths as well as relative to the current test root.
701-
$1_JTREG_BASIC_OPTIONS += $$(addprefix -exclude:, $$(wildcard \
708+
$1_JTREG_BASIC_OPTIONS += $$(addprefix $$(JTREG_PROBLEM_LIST_PREFIX), $$(wildcard \
702709
$$(JTREG_EXTRA_PROBLEM_LISTS) \
703710
$$(addprefix $$($1_TEST_ROOT)/, $$(JTREG_EXTRA_PROBLEM_LISTS)) \
704711
))

0 commit comments

Comments
 (0)