Revision: 5454
Author:   [email protected]
Date:     Tue Jun 18 16:40:54 2013
Log:      separate test results
https://codereview.appspot.com/10373044

right now, we generate a test report in the same directory
we save test logs, which is inconvenient because the test summary
is an index.html file, making it difficult to use a webbrowser to
look at other files in that directory.

this change moves results, reports, and capture into separate
subdirectories.

R=kpreid2


http://code.google.com/p/google-caja/source/detail?r=5454

Modified:
 /trunk/build.xml

=======================================
--- /trunk/build.xml    Wed Jun 12 12:50:57 2013
+++ /trunk/build.xml    Tue Jun 18 16:40:54 2013
@@ -284,7 +284,7 @@
       <formatter type="xml"/>
       <jvmarg line="${jvmarg}"/>
       <syspropertyset refid="test.propertyset"/>
-      <batchtest todir="${reports}/test.${test.type}">
+      <batchtest todir="${reports}/${test.type}/results">
         <fileset dir="${tests}">
           <and>
             <not><filename name="**/*BrowserTest.java"/></not>
@@ -304,7 +304,7 @@
       <formatter type="xml"/>
       <jvmarg line="${jvmarg}"/>
       <syspropertyset refid="test.propertyset"/>
-      <batchtest todir="${reports}/test.${test.type}">
+      <batchtest todir="${reports}/${test.type}/results">
         <fileset dir="${tests}">
           <and>
             <not><filename name="**/*BrowserTest.java"/></not>
@@ -318,14 +318,17 @@
   </target>

   <target name="RuntestsRunBrowser" unless="emma.enabled">
+    <mkdir dir="${reports}/${test.type}/capture" />
     <junit printsummary="yes" fork="yes" forkmode="once" maxmemory="512m">
<assertions><enable/></assertions> <!-- ignored unless fork="yes" -->
       <classpath refid="classpath.tests"/>
       <formatter type="xml"/>
       <jvmarg line="${jvmarg}"/>
       <syspropertyset refid="test.propertyset"/>
- <sysproperty key="test.capture.to" value="${reports}/test.${test.type}"/>
-      <batchtest todir="${reports}/test.${test.type}">
+      <sysproperty
+          key="test.capture.to"
+          value="${reports}/${test.type}/capture"/>
+      <batchtest todir="${reports}/${test.type}/results">
         <fileset dir="${tests}">
           <and>
             <filename name="**/*BrowserTest.java"/>
@@ -344,7 +347,7 @@
       <classpath refid="classpath.tests"/>
       <jvmarg line="${jvmarg}"/>
       <syspropertyset refid="test.propertyset"/>
-      <batchtest todir="${reports}/test.${test.type}">
+      <batchtest todir="${reports}/${test.type}/results">
         <fileset dir="${tests}">
           <and>
             <not><filename name="**/ThirdPartyBrowserTest.java"/></not>
@@ -389,7 +392,7 @@
                        -com.google.caja.parser.quasiliteral.*RuleDoclet"/>
       </instr>
     </emma>
-    <mkdir dir="${reports}/test.${test.type}"/>
+    <mkdir dir="${reports}/${test.type}/results"/>
     <property name="test.threads" value="2"/>
     <parallel threadCount="${test.threads}" failonany="true">
       <antcall target="RuntestsRunBrowser"/>
@@ -399,7 +402,7 @@
     </parallel>
     <summarize errorProperty="runtests.error"
      failureProperty="runtests.failure">
-      <fileset dir="${reports}/test.${test.type}">
+      <fileset dir="${reports}/${test.type}/results">
         <include name="TEST-*.xml"/>
       </fileset>
     </summarize>
@@ -415,9 +418,10 @@
       </report>
     </emma>
     <!-- Generate the test results report. -->
-    <junitreport todir="${reports}/test.${test.type}">
-      <fileset dir="${reports}/test.${test.type}" includes="TEST-*.xml"/>
-      <report format="frames" todir="${reports}/test.${test.type}"
+    <mkdir dir="${reports}/${test.type}/report"/>
+    <junitreport todir="${reports}/${test.type}/results">
+ <fileset dir="${reports}/${test.type}/results" includes="TEST-*.xml"/>
+      <report format="frames" todir="${reports}/${test.type}/report"
        styledir="${third_party}/ant/etc"/>
     </junitreport>
     <condition property="runtests.success">
@@ -441,10 +445,10 @@
       </and>
     </condition>
     <fail message=
- "One or more tests failed. For details, see ${reports}/test.${test.type}/index.html" + "One or more tests failed. For details, see ${reports}/${test.type}/report/index.html"
      if="runtests.error"/>
     <fail message=
- "One or more tests failed. For details, see ${reports}/test.${test.type}/index.html" + "One or more tests failed. For details, see ${reports}/${test.type}/report/index.html"
      if="runtests.failure"/>
   </target>

--

--- You received this message because you are subscribed to the Google Groups "Google Caja Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to