Reviewers: felix8a,
Description:
Delete and recreate ant-reports/tests/ before each test run.
This prevents results from tests run previously but not this time (due
to -Dtest.filter or brtest/nobrtest, or a test that was deleted) from
being included in the summary line or JUnit report, possibly resulting
in an announcement of failed (or passed) tests which were not actually
run.
Please review this at https://codereview.appspot.com/8559044/
Affected files:
M build.xml
Index: build.xml
===================================================================
--- build.xml (revision 5363)
+++ build.xml (working copy)
@@ -222,7 +222,6 @@
value="-Xdebug -Xmx2G
-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=9999" else="">
<isset property="test.debug"/>
</condition>
- <mkdir dir="${reports}/tests"/>
<junit printsummary="yes" fork="yes" forkmode="once"
maxmemory="512m">
<assertions><enable/></assertions> <!-- ignored unless fork="yes"
-->
<classpath refid="classpath.tests"/>
@@ -262,6 +261,14 @@
depends="AllTests,RuntestsRun,CacheTestSuccess"
description="$ ant runtests [-Dtest.filter=My\*Test]"/>
+ <target name="EmptyReports">
+ <!-- Clear the reports directory so that if we are running filtered
tests,
+ the summarizer does not include stale information from complete
runs.
+ -->
+ <delete dir="${reports}/tests"/>
+ <mkdir dir="${reports}/tests"/>
+ </target>
+
<property name="emma.coverage.out.file"
value="${reports}/coverage/coverage.ec"/>
<property name="emma.coverage.out.merge" value="false"/>
@@ -368,7 +375,7 @@
-com.google.caja.parser.quasiliteral.*RuleDoclet"/>
</instr>
</emma>
- <mkdir dir="${reports}/tests"/>
+ <antcall target="EmptyReports"/>
<property name="test.threads" value="2"/>
<parallel threadCount="${test.threads}" failonany="true">
<antcall target="RuntestsRunBrowser"/>
--
---
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.