forked from Riverside-Software/pct
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tests.xml
91 lines (81 loc) · 3.9 KB
/
tests.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
83
84
85
86
87
88
89
90
91
<?xml version="1.0" encoding="utf-8"?>
<project name="PCT-Tests" xmlns:jacoco="antlib:org.jacoco.ant">
<!-- Default values when using command line -->
<property environment="env" />
<property name="DLC" value="${env.DLC}" />
<property name="PROFILER" value="false" />
<property name="TESTLIBS" value="${basedir}/lib" />
<!-- Only used for OE version number -->
<taskdef resource="PCT.properties" />
<ProgressVersion dlcHome="${DLC}" majorVersion="OE_MAJOR_VERSION" minorVersion="OE_MINOR_VERSION" shortVersion="OE_VERSION" bitness="OE_ARCH" />
<!-- Assume version 12 when in local development -->
<condition property="GROUPS" value="v11,v12">
<not><isset property="OE_MAJOR_VERSION" /></not>
</condition>
<!-- Groups to be executed depending on OpenEdge major version -->
<condition property="GROUPS" value="v11">
<equals arg1="${OE_MAJOR_VERSION}" arg2="11" />
</condition>
<condition property="GROUPS" value="v11,v12">
<equals arg1="${OE_MAJOR_VERSION}" arg2="12" />
</condition>
<!-- Excluded group depending on OS -->
<condition property="EXCLUDES-OS" value="unix" else="win">
<os family="windows" />
</condition>
<!-- Excluded group depending on version -->
<condition property="EXCLUDES-VERSION" value="nov12" else="">
<equals arg1="${OE_MAJOR_VERSION}" arg2="12" />
</condition>
<condition property="VERSION" value="dlc${OE_MAJOR_VERSION}" else="dlc11">
<isset property="OE_MAJOR_VERSION" />
</condition>
<path id="test.run.cp">
<pathelement location="build/test" />
<fileset dir="dist" includes="PCT.jar" />
<fileset dir="lib" includes="*.jar" />
<fileset dir="${ant.library.dir}" includes="ant.jar,ant-launcher.jar" />
</path>
<path id="testng.cp">
<fileset dir="lib" includes="testng-6.13.1.jar,jcommander-1.30.jar" />
</path>
<path id="jacoco.cp">
<fileset dir="lib" includes="jacocoant-0.8.7.jar" />
</path>
<target name="init">
<unzip src="dist/testcases.zip" dest="." />
<mkdir dir="testbox/PCTCompileExt" />
<copy todir="testbox/PCTCompileExt">
<fileset dir="testbox/PCTCompile" />
</copy>
<!-- Only in testXX, test cases with number greater than 100 are reserved for PCTCompileExt -->
<replace dir="testbox/PCTCompileExt" includes="test??/build.xml" token="PCTCompile" value="PCTCompileExt" />
<replace dir="testbox/PCTCompileExt" includes="test??/build.xml" token="pct:compile" value="pct:compile_ext" />
<echo message="Using Ant '${ant.version}' in '${ant.home}'" />
<echo message="Using Java ${ant.java.version} - Java home: ${java.home}" />
<echo message="Using OpenEdge ${OE_VERSION}" />
</target>
<target name="test">
<!-- On Windows : ant -file tests.xml test -->
<mkdir dir="test-output" />
<mkdir dir="profiler" />
<taskdef resource="testngtasks" classpathref="testng.cp" />
<taskdef uri="antlib:org.jacoco.ant" resource="org/jacoco/ant/antlib.xml" classpathref="jacoco.cp" />
<jacoco:coverage destFile="profiler/jacoco-${TESTENV}.exec">
<testng workingDir="testbox" outputdir="test-output" useDefaultListeners="true" groups="${GROUPS}" excludedGroups="${EXCLUDES-OS},${EXCLUDES-VERSION}" suiteName="${TESTENV} tests">
<classfileset dir="build/test" includes="**/*Test.class" excludes="**/*BrokerTest.class" />
<classpath refid="test.run.cp" />
<jvmarg line="-DDLC="${DLC}" -DPROFILER=${PROFILER} -DTESTLIBS=${TESTLIBS} -DVERSION=${VERSION}" />
</testng>
</jacoco:coverage>
</target>
<target name="dist" depends="test">
<copy file="test-output/emailable-report.html" tofile="emailable-report-${TESTENV}.html" />
<zip destFile="oe-profiler-data-${TESTENV}.zip">
<fileset dir="testbox" includes="**/profiler*.out" />
</zip>
<zip destFile="junitreports-${TESTENV}.zip">
<zipfileset dir="test-output/junitreports" includes="*.xml" prefix="junitreports-${TESTENV}" />
</zip>
</target>
</project>