-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.xml
More file actions
98 lines (83 loc) · 3.59 KB
/
build.xml
File metadata and controls
98 lines (83 loc) · 3.59 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
<?xml version="1.0" encoding="UTF-8"?>
<!-- IATI workbench: produce and use IATI data
Copyright (C) 2016-2022, drostan.org and data4development.org
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<project name="IATI Engine" xmlns:if="ant:if" xmlns:unless="ant:unless">
<description>
IATI Workbench
</description>
<!-- make environment variables available -->
<property environment="env"/>
<!-- optionally set the workspace directory to something under /workspace -->
<property name="workspace" value=""/>
<!-- within the container, use /workspace -->
<property name="ws" value="/workspace/${workspace}" if:set="env.container"/>
<!-- on a host system, use the current working directory as workspace -->
<property name="ws" value="${env.PWD}/${workspace}" unless:set="env.container"/>
<!-- when running Ant with -logger org.apache.tools.ant.XmlLogger -->
<!-- the XmlLogger.file property seems to be ignored here -->
<property name="XmlLogger.file" value="${ws}/output/ant-log.xml"/>
<property name="ant.XmlLogger.stylesheet.uri" value=""/>
<!--
Many build targets will be included from separate build files in their own
folders. Only targets in this build file will benefit from command-line
autocompletion.
-->
<import file="lib/build.xml"/>
<import file="spreadsheet-iati/build.xml"/>
<import file="${ws}/config/build.iati-workbench.xml" optional="yes"/>
<!-- Xspec tests -->
<property name="xspec.dir" location="tmp"/>
<include file="lib/xspec/build.xml"/>
<!--Set up the project environment.-->
<target name="init">
<echo message="Working dir ${ws}"/>
<mkdir dir="${ws}/src"/>
<mkdir dir="${ws}/dest"/>
<mkdir dir="${ws}/config"/>
<mkdir dir="${ws}/tmp"/>
<mkdir dir="${ws}/input"/>
<mkdir dir="${ws}/output"/>
<mkdir dir="${ws}/reports"/>
</target>
<target name="clean"
depends="init"
description="Clean intermediary results.">
<delete>
<fileset dir="${ws}/tmp" includes="*"/>
</delete>
<echo>Intermediate results have been deleted from tmp directory.</echo>
</target>
<target name="test" description="Run xspec tests">
<antcall target="xspec.xspec" inheritall="false">
<param name="xspec.xml" location="tests/lib-csvxml-s2i.xspec"/>
</antcall>
<antcall target="xspec.xspec" inheritall="false">
<param name="xspec.xml" location="tests/merge-activities.xspec"/>
</antcall>
<antcall target="xspec.xspec" inheritall="false">
<param name="xspec.xml" location="tests/default-templates.xspec"/>
</antcall>
<fileset id="results" dir="." includes="tmp/*-result.html"/>
<copy todir="${ws}" if:set="env.container">
<fileset refid="results"/>
</copy>
<property name="resultfiles" refid="results"/>
<echo>Xspec result files: ${resultfiles}</echo>
</target>
<target name="tests" description="Run all the tests (don't stop at first failure)">
<antcall target="test">
<param name="xspec.fail" value="false"/>
</antcall>
</target>
</project>