blob: b11d8066497d3ee6b69222b67f6ffb13f33f87ab (
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
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
|
<?xml version="1.0" encoding="UTF-8"?>
<project name="RelEng Automated Tests" default="run" basedir=".">
<!-- The property ${eclipse-home} should be passed into this script -->
<!-- sets the properties eclipse-home, and library-file -->
<property name="eclipse-home" value="${basedir}/../../" />
<property name="library-file" value="${eclipse-home}/plugins/org.eclipse.test/library.xml" />
<property name="org.eclipse.releng.tests" value="org.eclipse.releng.tests_3.1.0" />
<!-- This target holds all initialization code that needs to be done for -->
<!-- all tests that are to be run. Initialization for individual tests -->
<!-- should be done within the body of the suite target. -->
<target name="init">
<tstamp />
<condition property="tar.gz">
<contains string="${runtimeArchive}" substring=".tar.gz" />
</condition>
<condition property="location" value="/builds/t">
<equals arg1="${os}" arg2="win32" />
</condition>
<property name="location" value="${basedir}/releng" />
<property name="locationcompare" value="${basedir}/relengcompare" />
<property name="locationcomparecurrent" value="${basedir}/relengcomparecurrent" />
</target>
<!-- This target holds code to cleanup the testing environment after the tests -->
<!-- have been run. You can use this to delete temporary files that are created. -->
<target name="cleanup">
<delete dir="${location}" quiet="true" />
<delete dir="${locationcompare}" />
</target>
<!--if file is a tar.gz file and not a zip, extract the SDK on which to execute chkpii before starting tests-->
<target name="setup" if="tar.gz">
<property name="archiveDir" value="${eclipse-home}/../.." />
<delete dir="${location}" />
<mkdir dir="${location}" />
<exec dir="${location}" executable="tar">
<arg line="-xzf ${archiveDir}/${runtimeArchive}" />
</exec>
<condition property="notMac">
<not>
<os family="mac" />
</not>
</condition>
<antcall target="setupcompare" />
</target>
<target name="setupcompare" if="notMac">
<!-- only run compare test on Linux machine since it is the fastest machine.
Also, the compare tool only parses feature.xmls so it only needs to be run on one machine -->
<delete dir="${locationcompare}" />
<mkdir dir="${locationcompare}" />
<property name="locationcomparetemp" value="${locationcompare}/temp" />
<delete dir="${locationcomparetemp}" />
<mkdir dir="${locationcomparetemp}" />
<delete dir="${locationcompare}" />
<mkdir dir="${locationcompare}" />
<property name="locationcomparetemp" value="${locationcompare}/temp" />
<delete dir="${locationcomparetemp}" />
<mkdir dir="${locationcomparetemp}" />
<property file="${basedir}/../../equinoxp2tests.properties" />
<p2.mirror source="${org.eclipse.equinox.p2.tests.last.release.build.repo}" ignoreErrors="true">
<destination kind="metadata" location="file://${locationcomparetemp}" name="Current build Repo" />
<destination kind="artifact" location="file://${locationcomparetemp}" name="Current build Repo" />
</p2.mirror>
<p2.repo2runnable destination="${locationcompare}">
<source dir="${locationcompare}" includes="temp" />
</p2.repo2runnable>
<delete dir="${locationcomparetemp}" />
<delete dir="${locationcomparecurrent}" />
<mkdir dir="${locationcomparecurrent}" />
<property name="locationcomparecurrenttemp" value="${locationcomparecurrent}/temp" />
<delete dir="${locationcomparecurrenttemp}" />
<mkdir dir="${locationcomparecurrenttemp}" />
<p2.mirror source="${org.eclipse.equinox.p2.tests.current.build.repo}" ignoreErrors="true">
<destination kind="metadata" location="file://${locationcomparecurrenttemp}" name="Current build Repo" />
<destination kind="artifact" location="file://${locationcomparecurrenttemp}" name="Current build Repo" />
</p2.mirror>
<p2.repo2runnable destination="${locationcomparecurrent}">
<source dir="${locationcomparecurrent}" includes="temp" />
</p2.repo2runnable>
<delete dir="${locationcomparecurrenttemp}" />
<replace file="${basedir}/plugins/${org.eclipse.releng.tests}/compare.properties" token="@new@" value="${locationcomparecurrent}/features" />
<replace file="${basedir}/plugins/${org.eclipse.releng.tests}/compare.properties" token="@old@" value="${locationcompare}/features" />
<property name="versionOutputDir" value="${locationcompare}/../../../results/versiontool" />
<mkdir dir="${versionOutputDir}" />
<exec dir="${versionOutputDir}" executable="/bin/touch" failonerror="false" os="Linux">
<arg line="results.xml" />
</exec>
<property name="versionOutputFile" value="${versionOutputDir}/results.xml" />
<echo message="locationcompare ${locationcompare} versionOutputDir ${versionOutputDir} versionOutputFile ${versionOutputFile}" />
<replace file="${basedir}/plugins/${org.eclipse.releng.tests}/compare.properties" token="@output@" value="${versionOutputFile}" />
<replace file="${basedir}/plugins/${org.eclipse.releng.tests}/compare.properties" token="@compareoptions@" value="${basedir}/plugins/${org.eclipse.releng.tests}/compareoptions.properties" />
</target>
<!-- This target runs the test suite. Any actions that need to happen after all -->
<!-- the tests have been run should go here. -->
<target name="run" depends="init,BuildTests">
<ant target="collect" antfile="${library-file}" dir="${eclipse-home}">
<property name="includes" value="org*.xml" />
<property name="output-file" value="org.eclipse.releng.tests.xml" />
</ant>
</target>
<target name="BuildTests" depends="init,cleanup,setup">
<ant target="core-test" antfile="${library-file}" dir="${eclipse-home}">
<property name="data-dir" value="${location}" />
<property name="plugin-name" value="org.eclipse.releng.tests" />
<property name="classname" value="org.eclipse.releng.tests.BuildTests" />
<property name="plugin-path" value="${eclipse-home}/plugins/${org.eclipse.releng.tests}" />
<property name="vmargs" value="-DRELENGTEST.JAVADOC.URLS=file:///${eclipse-home}/../../org.eclipse.platform.doc.isv.javadoc.txt,file:///${eclipse-home}/../../org.eclipse.jdt.doc.isv.javadoc.txt,file:///${eclipse-home}/../../org.eclipse.pde.doc.user.javadoc.txt -DRELENGTEST.COMPARATOR.URL=file:///${eclipse-home}/../../comparatorlog.txt" />
</ant>
</target>
</project>
|