forked from rhscqe/rhsc-gui-automation
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.xml
81 lines (65 loc) · 3.1 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
<?xml version="1.0" encoding="ISO-8859-1"?>
<project name="RHSC-SAHI" default="compile">
<property environment="env"/>
<property name="user.data" value="${env.SAHI_USERDATA_DIR}" location="./scripts"/>
<property name="sahi.dir" value="${env.SAHI_BASE}" location="."/>
<property name="test.build.dir" location="bin" />
<property name="test.src.dir" location="src" />
<property name="test.resources.dir" location="resources" />
<property name="test.output.dir" location="test-output" />
<property name="report.dir" value="test-output/Jenkins_Test_Suite"/>
<property name="te.properties" value="te/te.properties" />
<path id="utils.cp">
<fileset dir="${env.SAHI_BASE}/lib">
<include name="*.jar" />
</fileset>
</path>
<path id="tests.cp">
<pathelement location="${test.build.dir}" />
<fileset dir="lib">
<include name="*.jar" />
</fileset>
<path refid="utils.cp" />
</path>
<!--<taskdef name="sahi" classname="net.sf.sahi.ant.RunSahiTask" classpath="${env.SAHI_BASE}/lib/ant-sahi.jar"/>-->
<taskdef name="testng" classpathref="tests.cp" classname="org.testng.TestNGAntTask" />
<target name="compile" depends="clean">
<echo message="Compiling [${ant.project.name}] in ${basedir}" />
<mkdir dir="${test.build.dir}" />
<javac srcdir="${test.src.dir}" destdir="${test.build.dir}" classpathref="tests.cp" debug="on">
<compilerarg value="-Xlint:none"/>
</javac>
<mkdir dir="${test.build.dir}/resources"/>
<copy todir="${test.build.dir}/resources">
<fileset dir="${test.resources.dir}"/>
</copy>
<echo message="Done." />
</target>
<target name="run" description="run RHSC sahi java test" depends="compile">
<testng haltonfailure="false" classpathref="tests.cp" reporter="org.testng.reporters.JUnitXMLReporter" outputdir="${test.output.dir}" listeners="org.uncommons.reportng.HTMLReporter">
<xmlfileset dir="resources/testng-files" includes="testng-core.xml"/>
</testng>
</target>
<target name="run_U5" description="run RHSC sahi java test" depends="compile">
<property name="env.TEST_ENVIRONMENT_FILE" value="${test.resources.dir}/te/te-U5.properties"/>
<testng haltonfailure="false" classpathref="tests.cp" reporter="org.testng.reporters.JUnitXMLReporter" outputdir="${test.output.dir}" listeners="org.uncommons.reportng.HTMLReporter">
<xmlfileset dir="resources/testng-files" includes="testng-core-for-U5.xml"/>
</testng>
</target>
<target name="clean">
<echo message="Cleaning ${test.build.dir}"/>
<delete failonerror="true" quiet="false" includeemptydirs="true">
<fileset dir="${test.build.dir}" includes="**/*"/>
</delete>
<delete dir="${test.output.dir}"/>
</target>
<target name="cleanerTool" depends="compile" >
<echo message="Cleaning up rhsc"/>
<java classname="com.redhat.qe.storageconsole.helpers.RhscCleanerTool" classpathref="tests.cp" />
</target>
<target name="cleanerToolU5" depends="compile" >
<property name="env.TEST_ENVIRONMENT_FILE" value="${test.resources.dir}/te/te-U5.properties"/>
<echo message="Cleaning up rhsc"/>
<java classname="com.redhat.qe.storageconsole.helpers.RhscCleanerTool" classpathref="tests.cp" />
</target>
</project>