forked from zachleat/Humane-Dates
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
55 lines (47 loc) · 1.91 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
<project name="JsTestDriver-Boilerplate" default="test" basedir=".">
<description>Sample boilerplate for a test driven JS/CSS project.</description>
<!-- set global properties for this build -->
<property name="server.port" value="8081"/>
<property name="lib.dir" location="lib"/>
<property name="jstestdriver.jar" location="${lib.dir}/jsTestDriver-1.2.2.jar"/>
<property name="test.dir" location="src-test"/>
<property name="jstestdriver.conf" location="jsTestDriver.conf"/>
<property name="jstestdriver.output.dir" location="${test.dir}/output"/>
<property name="browser.safari" value="${lib.dir}/launch-safari.sh"/>
<property name="browser.chrome" value="${lib.dir}/launch-chrome.sh"/>
<property name="browser.firefox" value="${lib.dir}/launch-firefox.sh"/>
<target name="install">
<chmod perm="+x" type="file">
<fileset dir="${lib.dir}">
<include name="*.sh"/>
</fileset>
</chmod>
<!-- Fails silently if the profile already exists. -->
<exec executable="/bin/bash" dir="${lib.dir}">
<arg value="init-firefox.sh" />
</exec>
</target>
<target name="test">
<mkdir dir="${jstestdriver.output.dir}"/>
<java jar="${jstestdriver.jar}" fork="true">
<arg value="--config"/>
<arg value="${jstestdriver.conf}"/>
<arg value="--browser"/>
<arg value="${browser.firefox},${browser.safari},${browser.chrome}"/>
<arg value="--tests"/>
<arg value="all"/>
<arg value="--port"/>
<arg value="${server.port}"/>
<arg value="--testOutput"/>
<arg value="${jstestdriver.output.dir}"/>
</java>
<!-- FIXME this will quit all Safari windows, even existing ones. -->
<exec executable="/bin/bash" dir="${lib.dir}">
<arg value="quit-safari.sh" />
</exec>
</target>
<target name="clean">
<delete dir="${jstestdriver.output.dir}"/>
<mkdir dir="${jstestdriver.output.dir}"/>
</target>
</project>