-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathbuild.xml
executable file
·82 lines (64 loc) · 3.01 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<project name="testng-xslt" basedir=".">
<property name="src.dir" value="src"/>
<property name="lib.dir" value="lib"/>
<property name="test.dir" value="test"/>
<property name="version" value="1.2"/>
<path id="test.classpath">
<fileset dir="${lib.dir}" includes="*.jar"/>
</path>
<target name="test">
<antcall target="testcase">
<param name="dir" value="single"/>
</antcall>
<antcall target="test.css"/>
<antcall target="testcase">
<param name="dir" value="split-suite"/>
</antcall>
<antcall target="testcase">
<param name="dir" value="split-suite-testcase"/>
</antcall>
<antcall target="test.runtimeTotals"/>
</target>
<libfileset dir="${lib.dir}" includes="*.jar"/>
<target name="testcase">
<property name="dir" value=""/>
<mkdir dir="${test.dir}/${dir}/output"/>
<xslt in="${test.dir}/${dir}/testng-results.xml" style="src/main/resources/testng-results.xsl"
out="${test.dir}/${dir}/output/index.html" classpathref="test.classpath" processor="SaxonLiaison">
<param name="testNgXslt.outputDir" expression="${basedir}/${test.dir}/${dir}/output/"/>
</xslt>
</target>
<target name="test.css">
<mkdir dir="${test.dir}/custom-css/output"/>
<xslt in="${test.dir}/custom-css/testng-results.xml" style="src/main/resources/testng-results.xsl"
out="${test.dir}/custom-css/output/index.html" classpathref="test.classpath" processor="SaxonLiaison">
<param name="testNgXslt.outputDir" expression="${basedir}/${test.dir}/custom-css/output/"/>
<param name="testNgXslt.cssFile" expression="../custom.css"/>
</xslt>
</target>
<target name="test.runtimeTotals">
<mkdir dir="${test.dir}/runtime-totals/output"/>
<xslt in="${test.dir}/runtime-totals/testng-results.xml" style="src/main/resources/testng-results.xsl"
out="${test.dir}/runtime-totals/output/index.html" classpathref="test.classpath" processor="SaxonLiaison">
<param name="testNgXslt.outputDir" expression="${basedir}/${test.dir}/runtime-totals/output/"/>
<param name="testNgXslt.showRuntimeTotals" expression="true"/>
</xslt>
</target>
<target name="dist">
<delete dir="." includes="*.zip"/>
<zip destfile="reporty-ng-${version}.zip">
<fileset dir="." includes="src/**"/>
<fileset dir="." includes="lib/**"/>
<fileset dir="." includes="test/**"/>
<fileset dir="." includes="build.xml"/>
<fileset dir="." includes="pom.xml"/>
</zip>
</target>
<target name="clean">
<delete dir="${test.dir}/single/output"/>
<delete dir="${test.dir}/custom-css/output"/>
<delete dir="${test.dir}/split-suite/output"/>
<delete dir="${test.dir}/split-suite-testcase/output"/>
<delete dir="${test.dir}/runtime-totals/output"/>
</target>
</project>