-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.xml
50 lines (39 loc) · 1.52 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
<?xml version="1.0"?>
<project name="backbone-spf" default="build-dev">
<property file="build.properties" />
<property name="lib.file" value="spf.js" />
<property name="test.dir" value="test" />
<property name="test.app.dir" value="${test.dir}/app" />
<property name="test.lib.file" value="${test.app.dir}/${lib.file}" />
<target name="build-test">
<copy file="${lib.file}" tofile="${test.lib.file}" overwrite="true" />
</target>
<target name="clean-test">
<delete file="${test.lib.file}" />
</target>
<!-- Server targets -->
<target name="start-test-server">
<exec executable="cmd.exe">
<arg line="/K start node ${devserver.js} -s ${test.server.port} -r ${test.app.dir}" />
</exec>
</target>
<target name="launch-in-browser">
<exec executable="cmd.exe">
<arg line="/K start http://localhost:${test.server.port}/app.html" />
</exec>
</target>
<target name="serve-test"
depends="build-test,
start-test-server,
launch-in-browser" />
<!-- Test targets -->
<target name="run-tests" depends="build-test, start-test-server">
<echo>Running tests</echo>
<property name="suite" value="test/suites"/>
<exec executable="python" failonerror="true">
<arg file="${casper.js}" />
<arg file="test/run.js" />
<arg file="${suite}" />
</exec>
</target>
</project>