Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: a145f7fd4c6b4253ff403b85ceb51598d3828a6b (plain) (blame)
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
<?xml version="1.0" encoding="UTF-8"?>
<project
    name="Automated Eclipse Testing"
    default="runtests"
    basedir=".">

<!-- This file is only called from "runTests2.xml" which is a "production only" 
test file so much of what is here could be combined with runTests2.xml
and in some cases they may do things redundantly.
 -->

    <target name="runtests">
        <!-- <delete dir="${testDir}" quiet="true" /> -->
        <mkdir dir="${testDir}" />
        <property
            name="testResults"
            value="${testDir}/testresults" />
        <fail unless="testFramework" />
        <fail unless="testDir" />
        <echo message="testFramework: ${testFramework}" />
        <echo message="testDir: ${testDir}" />
        <echo message="buildId: ${buildId}" />

        <!--set up testing directory-->
        <unzip
            src="${testFramework}"
            dest="${testDir}"
            overwrite="false">
            <patternset>
                <exclude name="**/equinoxp2tests.properties" />
                <exclude name="**/test.xml" />
            </patternset>
        </unzip>

        <echo message="    properties in runTests.xml" />
        <echo message="    executionDir ${executionDir}" />
        <echo message="    testExecutable ${testExecutable}" />
        <echo message="    testScript ${testScript}" />
        <echo message="    args ${args}" />
        <echo message="    ANT_OPTS: ${ANT_OPTS}" />

        <!--callback to custom script for post setup-->
        <!-- <ant antfile="${customTest}" target="customSetup" dir="${basedir}" /> -->
        <condition
            property="executionArguments"
            value="/c ${testScript} ${args}">
            <and>
                <os family="windows" />
            </and>
        </condition>
        <property
            name="executionArguments"
            value="${testScript} ${args}" />

        <!--run the tests-->
        <exec
            dir="${executionDir}"
            executable="${testExecutable}">
            <arg line="${executionArguments}" />
        </exec>
    </target>

</project>

Back to the top