summaryrefslogtreecommitdiffstats
path: root/common.xml
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2013-11-04 18:10:05 +0200
committerHenri Sara <hesara@vaadin.com>2013-11-18 12:40:30 +0000
commitdde6a4893dd1c3d1bc040d58db6fd4cec012c74c (patch)
tree3910b3b0d5f57e690dfd7d36a192af2d74303606 /common.xml
parent81a1c293f0e407db4a5443b85e57d32cddd397a7 (diff)
downloadvaadin-framework-dde6a4893dd1c3d1bc040d58db6fd4cec012c74c.tar.gz
vaadin-framework-dde6a4893dd1c3d1bc040d58db6fd4cec012c74c.zip
Output test results in XML reports instead of to standard output
This is a workaround for a problem with the integrated TeamCity JUnit listener which is not thread safe. Without this the test results are completely mixed up in TeamCity. For more information, see http://youtrack.jetbrains.com/issue/TW-33176. All standard JUnit test reports is put in result/reports. For uitest there are three report directories: result/reports-tb2, result/reports-tb3 and result/reports-integration to be able to clean the directories before running a given type of tests. This change is based on the separate fixes by John. Change-Id: I2f0dee416f6745544636f2f3dcea0d0832ff8076
Diffstat (limited to 'common.xml')
-rw-r--r--common.xml17
1 files changed, 13 insertions, 4 deletions
diff --git a/common.xml b/common.xml
index 88fbc49196..a1c086c57a 100644
--- a/common.xml
+++ b/common.xml
@@ -305,16 +305,20 @@
<property name="test.src" location="${result.dir}/../tests/src" />
<property name="test.classes" location="${result.dir}/tests/classes" />
+ <!-- Ensure report dir is empty before running tests -->
+ <property name="report.dir" location="${result.dir}/reports" />
+ <delete dir="${report.dir}" />
+ <mkdir dir="${report.dir}" />
- <junit printsummary="withOutAndErr" fork="yes">
- <formatter usefile="false" type="plain" />
+ <junit showoutput="no" printsummary="no" fork="yes">
+ <formatter type="xml" />
<jvmarg value="-ea" />
<classpath location="${test.classes}" />
<classpath location="${classes}" />
<classpath refid="classpath.compile.custom" />
<classpath refid="classpath.test.dependencies" />
- <batchtest fork="yes">
+ <batchtest fork="yes" todir="${report.dir}">
<fileset dir="${test.src}">
<exclude name="**/Abstract*" />
<exclude name="**/Mock*" />
@@ -363,7 +367,12 @@
<ivy:cachepath pathid="classpath.test.dependencies" conf="test" />
</target>
- <target name="clean">
+ <target name="remove-test-reports">
+ <fail unless="result.dir" message="No result.dir parameter given" />
+ <delete dir="${result.dir}/reports" />
+ </target>
+
+ <target name="clean" depends="remove-test-reports">
<fail unless="result.dir" message="No result.dir parameter given" />
<delete dir="${result.dir}" />
</target>