lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dwe...@apache.org
Subject svn commit: r1452276 [1/2] - in /lucene/dev/trunk: ./ .gitignore lucene/CHANGES.txt lucene/common-build.xml lucene/tools/junit4/cached-timehints.txt
Date Mon, 04 Mar 2013 12:43:13 GMT
Author: dweiss
Date: Mon Mar  4 12:43:12 2013
New Revision: 1452276

URL: http://svn.apache.org/r1452276
Log:
LUCENE-4654: Test duration statistics from multiple test runs should be reused (locally).

Modified:
    lucene/dev/trunk/   (props changed)
    lucene/dev/trunk/.gitignore
    lucene/dev/trunk/lucene/CHANGES.txt
    lucene/dev/trunk/lucene/common-build.xml
    lucene/dev/trunk/lucene/tools/junit4/cached-timehints.txt

Modified: lucene/dev/trunk/.gitignore
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/.gitignore?rev=1452276&r1=1452275&r2=1452276&view=diff
==============================================================================
--- lucene/dev/trunk/.gitignore (original)
+++ lucene/dev/trunk/.gitignore Mon Mar  4 12:43:12 2013
@@ -17,6 +17,7 @@
 /.project
 /.classpath
 /.settings
+/.caches
 /prj.el
 /bin
 /bin.*

Modified: lucene/dev/trunk/lucene/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/CHANGES.txt?rev=1452276&r1=1452275&r2=1452276&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/CHANGES.txt (original)
+++ lucene/dev/trunk/lucene/CHANGES.txt Mon Mar  4 12:43:12 2013
@@ -291,6 +291,9 @@ Documentation
 
 Build
 
+* LUCENE-4654: Test duration statistics from multiple test runs should be 
+  reused. (Dawid Weiss)
+
 * LUCENE-4636: Upgrade ivy to 2.3.0 (Shawn Heisey via Robert Muir)
 
 * LUCENE-4570: Use the Policeman Forbidden API checker, released separately

Modified: lucene/dev/trunk/lucene/common-build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/common-build.xml?rev=1452276&r1=1452275&r2=1452276&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/common-build.xml (original)
+++ lucene/dev/trunk/lucene/common-build.xml Mon Mar  4 12:43:12 2013
@@ -65,6 +65,11 @@
   <property name="junit.jar" value="junit-4.10.jar"/>
   <property name="junit-location.jar" location="${common.dir}/test-framework/lib/${junit.jar}"/>
 
+  <property name="local.caches" location="${common.dir}/../.caches" />
+  <property name="tests.cachedir"  location="${local.caches}/test-stats" />
+  <property name="tests.cachefile" location="${common.dir}/tools/junit4/cached-timehints.txt"
/>
+  <property name="tests.cachefilehistory" value="10" />
+
   <path id="junit-path">
     <fileset dir="${common.dir}/test-framework/lib">
       <include name="junit-*.jar" />
@@ -116,9 +121,6 @@
 
   <property name="tests.workDir" location="${build.dir}/test"/>
 
-  <property name="tests.cachefile" location="${common.dir}/tools/junit4/cached-timehints.txt"
/>
-  <property name="tests.cachefilehistory" value="20" />
-
   <!-- Override these in your local properties to your desire. -->
   <!-- Show simple class names (no package) in test suites. -->
   <property name="tests.useSimpleNames" value="false" />
@@ -751,9 +753,8 @@
       <resources>
         <!-- The order is important. Include previous stats first, then append new stats.
-->
         <file file="${tests.cachefile}" />
-        <fileset dir="${common.dir}/..">
-          <include name="**/tests-timehints.txt" />
-          <exclude name="lucene/tools/junit4/**" />
+        <fileset dir="${tests.cachedir}">
+          <include name="**/*.txt" />
         </fileset>
       </resources>
     </junit4:mergehints>
@@ -845,10 +846,16 @@
             <value>UTF-16BE</value>
             -->
         </junit4:pickfromlist>
-        
+
         <!-- junit4 does not create this directory. TODO: is this a bug / inconsistency
with dir="..."? -->
         <mkdir dir="@{workDir}/temp" />
-        
+
+        <!-- Local test execution statistics from defaults or local caches, if present.
-->
+        <local name="tests.caches" />
+        <available file="${tests.cachedir}/${name}" type="dir" property="tests.caches"
value="${tests.cachedir}/${name}" />
+        <property name="tests.caches" location="${common.dir}/tools/junit4" /> <!--
defaults -->
+        <mkdir dir="${tests.cachedir}/${name}" />
+
         <junit4:junit4
             dir="@{workDir}"
             tempdir="@{workDir}/temp"
@@ -956,10 +963,10 @@
                 <mapper type="glob" from="tests.*" to="*" />
             </syspropertyset>
 
-            <!-- Use static cached test balancing statistcs. -->
+            <!-- Use static cached test balancing statistics. -->
             <balancers>
                 <junit4:execution-times>
-                    <fileset dir="${common.dir}/tools/junit4" includes="**/*.txt" />
+                    <fileset dir="${tests.caches}"  includes="**/*.txt" />
                 </junit4:execution-times>
             </balancers>            
 
@@ -1019,7 +1026,7 @@
                 
                 <!-- Emit the information about tests timings (could be used to determine
                      the slowest tests or for reuse in balancing). -->
-                <junit4:report-execution-times file="@{junit.output.dir}/tests-timehints.txt"
historyLength="5" />
+                <junit4:report-execution-times file="${tests.cachedir}/${name}/timehints.txt"
historyLength="20" />
 
                 <!-- ANT-compatible XMLs for jenkins records etc. -->
                 <junit4:report-ant-xml dir="@{junit.output.dir}" outputStreams="no" />
@@ -1043,7 +1050,7 @@
         <!-- Report the 5 slowest tests from this run to the console. -->
         <echo>5 slowest tests:</echo>
         <junit4:tophints max="5">
-          <file file="@{junit.output.dir}/tests-timehints.txt" />
+          <file file="${tests.cachedir}/${name}/timehints.txt" />
         </junit4:tophints>
     </sequential>
   </macrodef>
@@ -1052,7 +1059,7 @@
     <property name="max" value="10" />
     <echo>Showing ${max} slowest tests according to local stats. (change with -Dmax=...).</echo>
     <junit4:tophints max="${max}">
-      <fileset dir="${basedir}" includes="**/tests-timehints.txt" />
+      <fileset dir="${tests.cachedir}" includes="**/*.txt" />
     </junit4:tophints>
 
     <echo>Showing ${max} slowest tests in cached stats. (change with -Dmax=...).</echo>
@@ -1183,7 +1190,6 @@ ant -Dtests.leaveTemporary=true
 # Output test files and reports.
 ${tests-output}/tests-report.txt    - full ASCII tests report
 ${tests-output}/tests-failures.txt  - failures only (if any)
-${tests-output}/tests-timehints.txt - execution times (see above)
 ${tests-output}/tests-report-*      - HTML5 report with results
 ${tests-output}/junit4-*.suites     - per-JVM executed suites
                                       (important if job stealing).



Mime
View raw message