8226910: make it possible to use jtreg's -match via run-test framework
Reviewed-by: dholmes, mseledtsov
--- a/doc/building.html Thu Jul 18 09:15:26 2019 -0700
+++ b/doc/building.html Thu Jul 18 11:47:52 2019 -0700
@@ -297,10 +297,7 @@
</tr>
</tbody>
</table>
-<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>
+<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>
<h3 id="gcc">gcc</h3>
<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>
<p>The JDK is currently known to be able to compile with at least version 7.4 of gcc.</p>
--- a/doc/testing.html Thu Jul 18 09:15:26 2019 -0700
+++ b/doc/testing.html Thu Jul 18 11:47:52 2019 -0700
@@ -154,6 +154,9 @@
<p>Use additional problem lists file or files, in addition to the default ProblemList.txt located at the JTReg test roots.</p>
<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>
<p>The file names should be either absolute, or relative to the JTReg test root of the tests to be run.</p>
+<h4 id="run_problem_lists">RUN_PROBLEM_LISTS</h4>
+<p>Use the problem lists to select tests instead of excluding them.</p>
+<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>
<h4 id="options">OPTIONS</h4>
<p>Additional options to the JTReg test framework.</p>
<p>Use <code>JTREG="OPTIONS=--help all"</code> to see all available JTReg options.</p>
--- a/doc/testing.md Thu Jul 18 09:15:26 2019 -0700
+++ b/doc/testing.md Thu Jul 18 11:47:52 2019 -0700
@@ -306,6 +306,14 @@
The file names should be either absolute, or relative to the JTReg test root of
the tests to be run.
+#### RUN_PROBLEM_LISTS
+
+Use the problem lists to select tests instead of excluding them.
+
+Set to `true` or `false`.
+If `true`, JTReg will use `-match:` option, otherwise `-exclude:` will be used.
+Default is `false`.
+
#### OPTIONS
Additional options to the JTReg test framework.
--- a/make/RunTests.gmk Thu Jul 18 09:15:26 2019 -0700
+++ b/make/RunTests.gmk Thu Jul 18 11:47:52 2019 -0700
@@ -278,7 +278,7 @@
$(eval $(call ParseKeywordVariable, JTREG, \
SINGLE_KEYWORDS := JOBS TIMEOUT_FACTOR TEST_MODE ASSERT VERBOSE RETAIN \
- MAX_MEM, \
+ MAX_MEM RUN_PROBLEM_LISTS, \
STRING_KEYWORDS := OPTIONS JAVA_OPTIONS VM_OPTIONS KEYWORDS \
EXTRA_PROBLEM_LISTS AOT_MODULES, \
))
@@ -828,6 +828,7 @@
endif
JTREG_VERBOSE ?= fail,error,summary
JTREG_RETAIN ?= fail,error
+ JTREG_RUN_PROBLEM_LISTS ?= false
ifneq ($$($1_JTREG_MAX_MEM), 0)
$1_JTREG_BASIC_OPTIONS += -vmoption:-Xmx$$($1_JTREG_MAX_MEM)
@@ -865,13 +866,19 @@
$1_JTREG_BASIC_OPTIONS += -nativepath:$$($1_JTREG_NATIVEPATH)
endif
+ ifeq ($$(JTREG_RUN_PROBLEM_LISTS), true)
+ JTREG_PROBLEM_LIST_PREFIX := -match:
+ else
+ JTREG_PROBLEM_LIST_PREFIX := -exclude:
+ endif
+
ifneq ($$($1_JTREG_PROBLEM_LIST), )
- $1_JTREG_BASIC_OPTIONS += $$(addprefix -exclude:, $$($1_JTREG_PROBLEM_LIST))
+ $1_JTREG_BASIC_OPTIONS += $$(addprefix $$(JTREG_PROBLEM_LIST_PREFIX), $$($1_JTREG_PROBLEM_LIST))
endif
ifneq ($$(JTREG_EXTRA_PROBLEM_LISTS), )
# Accept both absolute paths as well as relative to the current test root.
- $1_JTREG_BASIC_OPTIONS += $$(addprefix -exclude:, $$(wildcard \
+ $1_JTREG_BASIC_OPTIONS += $$(addprefix $$(JTREG_PROBLEM_LIST_PREFIX), $$(wildcard \
$$(JTREG_EXTRA_PROBLEM_LISTS) \
$$(addprefix $$($1_TEST_ROOT)/, $$(JTREG_EXTRA_PROBLEM_LISTS)) \
))