Repository navigation
Expand file tree
/
Copy pathbuild.xml
More file actions
101 lines (86 loc) · 4.14 KB
/
Copy pathbuild.xml
File metadata and controls
101 lines (86 loc) · 4.14 KB
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
<?xml version="1.0" ?>
<!-- -->
<project name="swarmTest" basedir="." default="bootstrapTest">
<!-- Directories -->
<property name="build.dir" value="../../build"/>
<!-- Properties -->
<property name="firefoxVersion" value="Firefox-4.0"/>
<!-- firefox.properties must provide property |firefox| value the full .exe name -->
<property file="${firefoxVersion}/firefox.properties"/>
<property file="${firefoxVersion}/swarm.properties"/>
<property file="ant.properties"/>
<!-- If the local.properties does not give a server, then default wins -->
<property name="testListServer" value="https://getfirebug.com"/>
<makeurl file="${basedir}/.." property="swarmServer"/>
<target name="clean">
<delete dir="${build.dir}/profile"/>
<mkdir dir="${build.dir}/profile"/>
<mkdir dir="${build.dir}/profile/extensions"/>
</target>
<target name="allFirefoxDirs">
<!-- Ant is extremely lame as far as I can tell -->
<antcall target="test">
<param name="firefoxVersion" value="./Firefox-3.6"/>
</antcall>
</target>
<target name="alreadyInstalledSwarm" if="firefox.exists">
<available property="annotations.exist" file="${build.dir}/profile/firebug/annotations.json" />
</target>
<target name="alreadyInstalledFirefox">
<available property="firefox.exists" file="${firefox}" />
</target>
<target name="firefoxInstall" unless="$firefox.exists">
<echo message="Set property 'firefox=_exe name_' with forward slashes in ${basedir}/${firefoxVersion}/firefox.properties"/>
</target>
<target name="installSwarm" depends="alreadyInstalledSwarm" if="firefox.exists" unless="annotations.exist">
<!-- pre-install some preferences to avoid popup stuff during install run -->
<copy file="user.js" todir="${build.dir}/profile"/>
<!-- pre-install the link to the swarm extension -->
<echo file="${build.dir}/profile/extensions/swarms@getfirebug.com" message="${basedir}\.."/>
<exec executable="${firefox}">
<arg value="-no-remote"/>
<arg value="-profile"/>
<arg value="${build.dir}/profile"/>
</exec>
</target>
<target name="bootstrapTest" depends="clean, alreadyInstalledFirefox, installSwarm" if="firefox.exists">
<echo message="done?"/>
</target>
<target name="test" depends="alreadyInstalledFirefox, firefoxInstall, installSwarm" if="firefox.exists">
<!-- first wait for the install to begin -->
<waitfor maxwait="10" maxwaitunit="minute">
<available file="${build.dir}/profile/extensions/firebug@software.joehewitt.com.xpi"/>
</waitfor>
<!-- then wait for the install process to exit -->
<waitfor maxwait="10" maxwaitunit="minute">
<not>
<available file="${build.dir}/profile/parent.lock"/>
</not>
</waitfor>
<exec executable="${firefox}" output="${build.dir}/fbtestOutput.txt">
<arg value="-no-remote"/>
<arg value="-jsconsole"/>
<arg value="-profile"/>
<arg value="${build.dir}/profile"/>
<arg value="-runFBTests"/>
<arg value="${testListServer}/${testlist}"/>
</exec>
</target>
<target name="just-launch-ff" depends="alreadyInstalledFirefox, firefoxInstall, installSwarm" if="firefox.exists">
<!-- first wait for the install to begin -->
<waitfor maxwait="10" maxwaitunit="minute">
<available file="${build.dir}/profile/extensions/firebug@software.joehewitt.com.xpi"/>
</waitfor>
<!-- then wait for the install process to exit -->
<waitfor maxwait="10" maxwaitunit="minute">
<not>
<available file="${build.dir}/profile/parent.lock"/>
</not>
</waitfor>
<exec executable="${firefox}" output="${build.dir}/justLaunchFF.txt">
<arg value="-no-remote"/>
<arg value="-profile"/>
<arg value="${build.dir}/profile"/>
</exec>
</target>
</project>