LUCENE-5902: Simplify the property handling by having a default; only add explicitclass include if actually given; refactor filterchain (TODO: maybe use a one-line groovy for this, we already have groovy loaded before running tests...?)

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1622685 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Uwe Schindler 2014-09-05 12:00:02 +00:00
parent 8f5259b4ff
commit ff9e0437de
1 changed files with 10 additions and 10 deletions

View File

@ -885,23 +885,23 @@
<property name="tests.leaveTemporary" value="false" />
<property name="tests.iters" value="" />
<property name="tests.dups" value="1" />
<property name="tests.useSecurityManager" value="true" />
<!-- turn on security manager? -->
<condition property="java.security.manager" value="org.apache.lucene.util.TestSecurityManager">
<or>
<not>
<isset property="tests.useSecurityManager"/>
</not>
<istrue value="${tests.useSecurityManager}"/>
</or>
</condition>
<!-- create a fileset pattern that matches ${tests.class}. -->
<loadresource property="tests.explicitclass" quiet="true">
<string value="${tests.class}" />
<filterchain>
<replaceregex pattern="\." replace="/" flags="g" />
<replaceregex pattern="\*" replace="**" flags="g" />
<tokenfilter>
<filetokenizer/>
<replacestring from="." to="/"/>
<replacestring from="*" to="**"/>
<replaceregex pattern="$" replace=".class" />
</tokenfilter>
</filterchain>
</loadresource>
@ -1158,7 +1158,7 @@
<fileset dir="@{testsDir}">
<include name="**/Test*.class" />
<include name="**/*Test.class" />
<include name="${tests.explicitclass}" />
<include name="${tests.explicitclass}" if="tests.explicitclass" />
<exclude name="**/*$*" />
</fileset>
</junit4:duplicate>