8226910: make it possible to use jtreg's -match via run-test framework

Reviewed-by: dholmes, mseledtsov
This commit is contained in:
Igor Ignatyev 2019-07-18 11:47:52 -07:00
parent 4d471e7845
commit b97433e763
4 changed files with 22 additions and 7 deletions

View File

@ -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>

View File

@ -154,6 +154,9 @@ TEST FAILURE</code></pre>
<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=&quot;OPTIONS=--help all&quot;</code> to see all available JTReg options.</p>

View File

@ -306,6 +306,14 @@ help avoid quoting issues, the special value `%20`).
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.

View File

@ -278,7 +278,7 @@ $(eval $(call SetTestOpt,TIMEOUT_FACTOR,JTREG))
$(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 @@ define SetupRunJtregTestBody
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 @@ define SetupRunJtregTestBody
$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)) \
))