mirror of https://github.com/apache/lucene.git
LUCENE-4146: improvements to how -Dtests.iters works with -Dtests.method/-Dtestmethod
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1352238 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
6b42ac3cea
commit
bc646011f5
|
@ -687,7 +687,7 @@
|
|||
<condition property="tests.class" value="*.${testcase}">
|
||||
<isset property="testcase" />
|
||||
</condition>
|
||||
<condition property="tests.method" value="${testmethod}">
|
||||
<condition property="tests.method" value="${testmethod}*">
|
||||
<isset property="testmethod" />
|
||||
</condition>
|
||||
<condition property="tests.showSuccess" value="true">
|
||||
|
@ -719,6 +719,18 @@
|
|||
<isset property="tests.iter" />
|
||||
</condition>
|
||||
</fail>
|
||||
<!-- this combo makes no sense LUCENE-4146 -->
|
||||
<fail message="You are attempting to use 'tests.iters' in combination with a 'tests.method' value with does not end in a '*' -- This combination makes no sense, because the 'tests.method' filter will be unable to match the synthetic test names generated by the multiple iterations.">
|
||||
<condition>
|
||||
<and>
|
||||
<isset property="tests.iters" />
|
||||
<isset property="tests.method" />
|
||||
<not>
|
||||
<matches pattern="\*$" string="${tests.method}" />
|
||||
</not>
|
||||
</and>
|
||||
</condition>
|
||||
</fail>
|
||||
|
||||
<!-- Defaults. -->
|
||||
<property name="tests.class" value="" />
|
||||
|
@ -909,7 +921,7 @@
|
|||
# - 'tests.class' is a class-filtering shell-like glob pattern,
|
||||
# 'testcase' is an alias of "tests.class=*.${testcase}"
|
||||
# - 'tests.method' is a method-filtering glob pattern.
|
||||
# 'testmethod' is an alias of "tests.method=${testmethod}"
|
||||
# 'testmethod' is an alias of "tests.method=${testmethod}*"
|
||||
#
|
||||
|
||||
# Run a single test case (variants)
|
||||
|
@ -930,9 +942,6 @@ ant test "-Dtests.method=*esi*"
|
|||
# Run with a given seed (seed is a hex-encoded long).
|
||||
ant test -Dtests.seed=DEADBEEF
|
||||
|
||||
# Repeats a given test N times (note filters).
|
||||
ant test -Dtests.iters=N -Dtestcase=ClassName -Dtestmethod=mytest
|
||||
|
||||
# Repeats _all_ tests of ClassName N times. Every test repetition
|
||||
# will have a different seed.
|
||||
ant test -Dtests.iters=N -Dtestcase=ClassName
|
||||
|
@ -942,6 +951,14 @@ ant test -Dtests.iters=N -Dtestcase=ClassName
|
|||
# seed.
|
||||
ant test -Dtests.iters=N -Dtestcase=ClassName -Dtests.seed=dead:beef
|
||||
|
||||
# Repeats a given test N times (note the filters - individual test
|
||||
# repetitions are given suffixes, ie: testFoo[0], testFoo[1], etc...
|
||||
# so using testmethod or tests.method ending in a glob is necessary
|
||||
# to ensure iterations are run).
|
||||
ant test -Dtests.iters=N -Dtestcase=ClassName -Dtestmethod=mytest
|
||||
ant test -Dtests.iters=N -Dtestcase=ClassName -Dtests.method=mytest*
|
||||
|
||||
|
||||
#
|
||||
# Test groups. ----------------------------------------------------
|
||||
#
|
||||
|
|
Loading…
Reference in New Issue