You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by us...@apache.org on 2014/08/10 11:46:59 UTC
svn commit: r1617078 - in /lucene/dev/trunk/lucene: CHANGES.txt
common-build.xml
Author: uschindler
Date: Sun Aug 10 09:46:59 2014
New Revision: 1617078
URL: http://svn.apache.org/r1617078
Log:
LUCENE-5881: Add "beasting" of tests: repeats the whole "test" Ant target N times with "ant beast -Dbeast.iters=N"
Modified:
lucene/dev/trunk/lucene/CHANGES.txt
lucene/dev/trunk/lucene/common-build.xml
Modified: lucene/dev/trunk/lucene/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/CHANGES.txt?rev=1617078&r1=1617077&r2=1617078&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/CHANGES.txt (original)
+++ lucene/dev/trunk/lucene/CHANGES.txt Sun Aug 10 09:46:59 2014
@@ -237,14 +237,18 @@ Bug Fixes
would be exceeded, instead of silently creating an unusable
index. (Mike McCandless)
-* LUCENE-5869: Added restriction to positive values for maxExpansions in FuzzyQuery.
- (Ryan Ernst)
+* LUCENE-5869: Added restriction to positive values for maxExpansions in
+ FuzzyQuery. (Ryan Ernst)
Test Framework
* LUCENE-5786: Unflushed/ truncated events file (hung testing subprocess).
(Dawid Weiss)
+* LUCENE-5881: Add "beasting" of tests: repeats the whole "test" Ant target
+ N times with "ant beast -Dbeast.iters=N". (Uwe Schindler, Robert Muir,
+ Ryan Ernst, Dawid Weiss)
+
Build
* LUCENE-5770: Upgrade to JFlex 1.6, which has direct support for
Modified: lucene/dev/trunk/lucene/common-build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/common-build.xml?rev=1617078&r1=1617077&r2=1617078&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/common-build.xml (original)
+++ lucene/dev/trunk/lucene/common-build.xml Sun Aug 10 09:46:59 2014
@@ -1147,7 +1147,7 @@
</target>
<target name="test-help" description="Help on 'ant test' syntax.">
- <echo>
+ <echo taskname="help">
#
# Test case filtering. --------------------------------------------
#
@@ -1202,6 +1202,15 @@ ant test -Dtests.iters=N -Dtests.maxfail
# in parallel.
ant test -Dtests.dups=N ...
+# Test beasting: Repeats every suite with same seed per class
+# (N times in parallel) and each test inside (M times). The whole
+# run is repeated (beasting) P times in a loop, with a different
+# master seed. You can combine beasting with any other parameter,
+# just replace "test" with "beast" and give -Dbeast.iters=P
+# (P >> 1).
+ant test -Dtests.dups=N -Dtests.iters=M -Dbeast.iters=P \
+ -Dtestcase=ClassName beast
+
#
# Test groups. ----------------------------------------------------
#
@@ -1289,8 +1298,8 @@ ${tests-output}/junit4-*.suites - pe
<!-- note: order here is important, the taskdef depends on test-framework
jars so we just order it after compile-test to ensure that -->
- <target name="test" depends="clover,compile-test,install-junit4-taskdef,validate,-init-totals,-test,-check-totals" description="Runs unit tests">
- </target>
+ <target name="test" depends="clover,compile-test,install-junit4-taskdef,validate,-init-totals,-test,-check-totals" description="Runs unit tests"/>
+ <target name="beast" depends="clover,compile-test,install-junit4-taskdef,validate,-init-totals,-beast,-check-totals" description="Runs unit tests in a loop (-Dbeast.iters=n)"/>
<!-- Run the actual tests (must be wrapped with -init-totals, -check-totals) -->
<target name="-test">
@@ -1298,6 +1307,22 @@ ${tests-output}/junit4-*.suites - pe
<test-macro threadNum="${tests.jvms.override}" />
</target>
+ <!-- Beast the actual tests (must be wrapped with -init-totals, -check-totals) -->
+ <target name="-beast" depends="resolve-groovy">
+ <groovy taskname="beaster"><![CDATA[
+ int iters = (properties['beast.iters'] ?: '1') as int;
+ def antcall = project.createTask('antcall');
+ antcall.target = '-test';
+ antcall.inheritAll = true;
+ antcall.inheritRefs = true;
+ (1..iters).each { i ->
+ task.log('Beast round: ' + i);
+ antcall.execute();
+ };
+ task.log('Beasting finished.');
+ ]]></groovy>
+ </target>
+
<target name="-check-totals" if="tests.totals.toplevel" depends="resolve-groovy">
<!-- We are concluding a test pass at the outermost level. Sum up all executed tests. -->
<groovy><![CDATA[
@@ -1315,7 +1340,7 @@ ${tests-output}/junit4-*.suites - pe
}
// Interesting but let's keep the build output quiet.
- // project.log("Grand total of all executed tests (including sub-modules): " + total);
+ // task.log("Grand total of all executed tests (including sub-modules): " + total);
]]></groovy>
</target>