forked from opencadc/vostools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
73 lines (61 loc) · 2.35 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<!DOCTYPE project>
<project default="build" basedir=".">
<!-- Generic properties -->
<property environment="env"/>
<property file="${env.A}/compilers/setup.ant.python.properties" />
<import file="${env.A}/compilers/setup.ant.python.targets.xml"/>
<!--*+
************************************************************************
**** C A N A D I A N A S T R O N O M Y D A T A C E N T R E *****
*
* System Name: build.xml
*
* Purpose:
* Over-ride default ant behaviour.
*
* Date : Nov 5, 2009
*
**** C A N A D I A N A S T R O N O M Y D A T A C E N T R E *****
************************************************************************
*-->
<!-- project-specific properties -->
<property name="project" value="vos" />
<property file="local.build.properties" />
<!-- Where and how to identify installed versions of python -->
<property name="pythonbin" value="./venv/bin"/>
<!-- This version would allow ant to do the build for all versions of python2
in /usr/bin.
<property name="pythonpattern" value="python2.?"/>
For cadcVOFS, we only want python2.7 -->
<property name="pythonpattern" value="python"/>
<target name="test">
<foreachversion executablebin="${pythonbin}"
executablepattern="${pythonpattern}"
propertyname="python.executable"
target="test_executable"/>
</target>
<target name="test_executable">
<echo message="test ${build}/lib using ${python.executable}"/>
<apply executable="${python.executable}"
dir="vos/test"
failonerror="true">
<env key="PYTHONPATH" value="${basedir}:${env.PYTHONPATH}"/>
<fileset dir="vos/test" includes="Test*.py" excludes="TestAll.py"/>
</apply>
</target>
<target name="test_all">
<foreachversion executablebin="${pythonbin}"
executablepattern="${pythonpattern}"
propertyname="python.executable"
target="test_all_executable"/>
</target>
<target name="test_all_executable" depends="compile">
<echo message="test ${build}/lib using ${python.executable}"/>
<apply executable="${python.executable}"
dir="test/test_vos">
<env key="PYTHONPATH" value="${build}/lib:${env.PYTHONPATH}"/>
<fileset dir="test/test_vos" includes="test*.py"/>
</apply>
</target>
<target name="build" depends="compile" />
</project>