File: build.xml

package info (click to toggle)
db 5.1.29-9%2Bdeb8u1
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 150,396 kB
  • sloc: ansic: 400,169; java: 94,399; tcl: 70,967; sh: 37,399; cs: 30,758; cpp: 21,132; perl: 14,227; xml: 9,854; makefile: 3,777; yacc: 1,003; awk: 942; sql: 801; erlang: 461; python: 216; php: 24; asm: 14
file content (149 lines) | stat: -rw-r--r-- 5,448 bytes parent folder | download | duplicates (3)
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
<project name="RepmgrTests" default="test" basedir=".">
    <property name="tests" value="Test*"/>
    <property name="verbose" value="false"/>
    <property name="db" location="../../../build_unix"/>
    <property name="db46" location="../../../../db-4.6.21/build_unix"/>
    <property name="db47" location="../../../../db-4.7.25/build_unix"/>
    <property name="junit.jar" location="${user.home}/lib/junit-4.4.jar"/>
    <property name="upgrades.cp.propfile" 
              location="${basedir}/upgrades/test/repmgrtests/classpaths.properties"/>

    <condition property="jlp" value="${db}/.libs:${db46}/.libs:${db47}/.libs">
        <not>
            <os family="windows"/>
        </not>
    </condition>

    <path id="class.path">
        <pathelement location="${junit.jar}"/>
        <pathelement location="${db}/db.jar"/>
        <pathelement location="${basedir}/tests"/>
    </path>

    <path id="upgrades.class.path">
        <pathelement location="${junit.jar}"/>
        <pathelement location="${basedir}/upgrades/test"/>
        <pathelement location="${basedir}/tests"/>
    </path>

    <path id="upgrades.v46.class.path">
        <pathelement location="${junit.jar}"/>
        <pathelement location="${db46}/db.jar"/>
        <pathelement location="${basedir}/upgrades/test"/>
        <pathelement location="${basedir}/upgrades/v46"/>
    </path>

    <path id="upgrades.v47.class.path">
        <pathelement location="${junit.jar}"/>
        <pathelement location="${db47}/db.jar"/>
        <pathelement location="${basedir}/upgrades/test"/>
        <pathelement location="${basedir}/upgrades/v47"/>
        <pathelement location="${basedir}/tests"/>
    </path>

    <path id="upgrades.new.class.path">
        <pathelement location="${junit.jar}"/>
        <pathelement location="${db}/db.jar"/>
        <pathelement location="${basedir}/upgrades/test"/>
        <pathelement location="${basedir}/upgrades/current"/>
    </path>

    <target name="compile.upgrades">
        <javac srcdir="${basedir}/upgrades/test" debug="true">
            <classpath refid="upgrades.class.path"/>
        </javac>
    </target>

    <target name="compile.upgrades.v46">
        <javac srcdir="${basedir}/upgrades/v46" debug="true">
            <classpath refid="upgrades.v46.class.path"/>
        </javac>
    </target>
    
    <target name="compile.upgrades.v47">
        <javac srcdir="${basedir}/upgrades/v47" debug="true">
            <classpath refid="upgrades.v47.class.path"/>
        </javac>
    </target>
    
    <target name="compile.upgrades.new">
        <javac srcdir="${basedir}/upgrades/current" debug="true">
            <classpath refid="upgrades.new.class.path"/>
        </javac>
    </target>
    
    <target name="compile">
        <javac srcdir="${basedir}/tests" debug="true">
            <classpath refid="class.path"/>
        </javac>
    </target>

    <target name="clean" depends="clean.java,clean.beam,clean.tests">
      <delete file="${upgrades.cp.propfile}"/>
    </target>

    <target name="clean.java">
      <delete>
        <fileset dir="${basedir}/tests" includes="**/*.class"/>
        <fileset dir="${basedir}/upgrades" includes="**/*.class"/>
      </delete>
    </target>

    <target name="clean.beam">
      <delete>
        <fileset dir="${basedir}/fiddler" includes="*.beam"/>
      </delete>
    </target>

    <target name="clean.tests">
      <delete>
        <fileset dir="${basedir}" includes="TEST-*.txt"/>
        <fileset dir="${basedir}" includes="*.fiddler.out"/>
      </delete>
      <delete dir="${basedir}/TESTDIR"/>
    </target>

    <target name="test" description="run tests" depends="compile">
        <junit failureproperty="testsfailed">
            <classpath refid="class.path"/>

            <sysproperty key="java.library.path" value="${jlp}"/>
            <sysproperty key="VERB_REPLICATION" value="${verbose}"/>

            <batchtest fork="yes">
                <fileset dir="${basedir}/tests">
                    <include name="**/${tests}.java"/>
                </fileset>
            </batchtest>
            <formatter type="brief"/>
        </junit>
        <fail if="testsfailed"/>
    </target>

    <target name="test.upgrades" description="run mixed-version tests" 
    depends="compile,compile.upgrades,compile.upgrades.new,compile.upgrades.v46,compile.upgrades.v47,config.upgrade.classpaths">
        <junit failureproperty="testsfailed">
            <classpath refid="upgrades.class.path"/>
            <sysproperty key="java.library.path" value="${jlp}"/>
            <sysproperty key="VERB_REPLICATION" value="${verbose}"/>
            <batchtest fork="yes">
                <fileset dir="${basedir}/upgrades/test">
                    <include name="**/${tests}.java"/>
                </fileset>
            </batchtest>
            <formatter type="brief"/>
        </junit>
        <fail if="testsfailed"/>
    </target>

    <target name="config.upgrade.classpaths">
        <propertyfile file="${upgrades.cp.propfile}">
            <entry key="db.46" value="${db46}/db.jar"/>
            <entry key="db.47" value="${db47}/db.jar"/>
            <entry key="db" value="${db}/db.jar"/>
            <entry key="test.46" value="${basedir}/upgrades/v46/"/>
            <entry key="test.47" value="${basedir}/upgrades/v47/"/>
            <entry key="test" value="${basedir}/upgrades/current/"/>
        </propertyfile>
    </target>
</project>