Skip to content

Commit

Permalink
LUCENE-3808: Switch LuceneTestCaseRunner to RandomizedRunner. Enforce…
Browse files Browse the repository at this point in the history
… Random sharing contracts. Enforce thread leaks.

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1326351 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
dweiss committed Apr 15, 2012
1 parent aec9ccd commit cf85aab
Show file tree
Hide file tree
Showing 524 changed files with 5,548 additions and 4,108 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -381,3 +381,5 @@
/modules/suggest/*.iml
/modules/suggest/pom.xml
/modules/suggest/dist

/modules/spatial/build/
6 changes: 6 additions & 0 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@
-->

<project name="lucene-solr" default="test" basedir=".">
<target name="test-help" description="Test runner help">
<subant target="test-help" inheritall="false" failonerror="true">
<fileset dir="lucene" includes="build.xml" />
</subant>
</target>

<target name="test" description="Test both Lucene and Solr" depends="validate">
<sequential>
<subant target="test" inheritall="false" failonerror="true">
Expand Down
1 change: 1 addition & 0 deletions dev-tools/eclipse/dot.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -169,5 +169,6 @@
<classpathentry kind="lib" path="solr/contrib/velocity/lib/commons-beanutils-1.7.0.jar"/>
<classpathentry kind="lib" path="solr/contrib/velocity/lib/commons-collections-3.2.1.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="lucene/test-framework/lib/randomizedtesting-runner-1.0.0.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
49 changes: 19 additions & 30 deletions lucene/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,6 @@
<pathelement path="${java.class.path}"/>
</path>

<!-- remove this -->
<target name="test-tag" depends="test-backwards" description="deprecated"/>

<target name="compile-backwards" depends="compile-core"
description="Runs tests of a previous Lucene version.">
<sequential>
Expand All @@ -98,10 +95,22 @@
</sequential>
</target>

<target name="test-backwards" /><!--add here after 4.0: depends="compile-backwards, backwards-test-warning, junit-backwards-mkdir, junit-backwards-sequential, junit-backwards-parallel"-->
<target name="backwards-test-warning" depends="check-backwards-params" if="backwards.ignoring.params">
<echo>
Warning: Ignoring your multiplier and nightly settings for backwards tests.
These tests are for API compatibility only!
</echo>
</target>

<target name="junit-backwards-mkdir">
<!--
Add dependency after 4.0: depends="compile-backwards, backwards-test-warning"
and uncomment inside of this target.
-->
<target name="test-backwards">
<!--
<mkdir dir="${build.dir.backwards}/test"/>
<backwards-test-macro/>
-->
</target>

<target name="check-backwards-params">
Expand All @@ -113,13 +122,6 @@
</condition>
</target>

<target name="backwards-test-warning" depends="check-backwards-params" if="backwards.ignoring.params">
<echo>
Warning: Ignoring your multiplier and nightly settings for backwards tests.
These tests are for API compatibility only!
</echo>
</target>

<macrodef name="backwards-test-macro">
<attribute name="threadNum" default="1"/>
<attribute name="threadTotal" default="1"/>
Expand All @@ -128,30 +130,17 @@
Note: we disable multiplier/nightly because the purpose is to find API breaks
-->
<test-macro
dataDir="${backwards.dir}/core/src/test"
tempDir="${build.dir.backwards}/test"
junit.classpath="backwards.junit.classpath"
junit.output.dir="${junit.output.dir.backwards}"
dataDir="${backwards.dir}/core/src/test"
tempDir="${build.dir.backwards}/test"
junit.classpath="backwards.junit.classpath"
junit.output.dir="${junit.output.dir.backwards}"
tests.nightly="false"
tests.multiplier="1"
threadNum="@{threadNum}"
threadTotal="@{threadTotal}"/>
</sequential>
</sequential>
</macrodef>

<target name="junit-backwards-sequential" if="tests.sequential">
<backwards-test-macro/>
</target>

<target name="junit-backwards-parallel" unless="tests.sequential">
<parallel threadsPerProcessor="${tests.threadspercpu}">
<backwards-test-macro threadNum="1" threadTotal="4"/>
<backwards-test-macro threadNum="2" threadTotal="4"/>
<backwards-test-macro threadNum="3" threadTotal="4"/>
<backwards-test-macro threadNum="4" threadTotal="4"/>
</parallel>
</target>

<target name="compile-core" depends="compile-lucene-core"/>

<!--
Expand Down
Loading

0 comments on commit cf85aab

Please sign in to comment.