-
Notifications
You must be signed in to change notification settings - Fork 114
/
build.xml
73 lines (63 loc) · 2.76 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
<project name="avida" default="install" basedir=".">
<property name="root" location=""/>
<property name="build" location="cbuild"/>
<target name="builddir">
<mkdir dir="${build}"/>
</target>
<target name="configure" depends="builddir">
<exec dir="${build}" executable="cmake" failonerror="true">
<arg path="${root}"/>
</exec>
</target>
<target name="compile" depends="configure">
<exec dir="${build}" osfamily="unix" executable="make" failonerror="true"/>
</target>
<target name="install" depends="compile">
<exec dir="${build}" osfamily="unix" executable="make" failonerror="true">
<arg value="install"/>
</exec>
</target>
<target name="tcmalloc" depends="builddir">
<exec dir="${build}" executable="cmake" failonerror="true">
<arg path="${root}/libs/tcmalloc-1.4"/>
</exec>
<exec dir="${build}" osfamily="unix" executable="make" failonerror="true">
<arg value="install"/>
</exec>
</target>
<target name="move-platform-consistencytesting-targets" if="platform">
<delete file="${build}/work/avida" quiet="true"/>
<copy file="${build}/work/platform=${platform}/avida" todir="${build}/work"/>
</target>
<target name="check-for-consistencytesting-targets" depends="move-platform-consistencytesting-targets">
<available file="${build}/work/avida" property="avida.built"/>
<fail unless="avida.built">unable to locate avida</fail>
</target>
<target name="consistencytest" depends="check-for-consistencytesting-targets" if="avida.built">
<chmod file="${build}/work/avida" perm="ugo+rx"/>
<mkdir dir="${build}/reports"/>
<exec dir="${root}" osfamily="unix" executable="python" failonerror="true">
<arg path="${root}/avida-core/tests/_testrunner/testrunner.py"/>
<arg value="--mode=slave"/>
<arg value="--xml-report=${build}/reports/avida.xml"/>
</exec>
</target>
<target name="move-platform-unittesting-targets" if="platform">
<copy file="${build}/bin/platform=${platform}/apto-test" todir="${build}/bin"/>
</target>
<target name="check-for-unittesting-targets" depends="move-platform-unittesting-targets">
<available file="${build}/bin/apto-test" property="apto-test.built"/>
<fail unless="apto-test.built">unable to locate apto-test</fail>
</target>
<target name="unittest" depends="check-for-unittesting-targets" if="apto-test.built">
<chmod file="${build}/bin/apto-test" perm="ugo+rx"/>
<mkdir dir="${build}/reports"/>
<exec dir="${root}" osfamily="unix" executable="${build}/bin/apto-test" failonerror="false">
<arg value="--gtest_output=xml:${build}/reports/apto.xml"/>
</exec>
</target>
<target name="test" depends="unittest,consistencytest"/>
<target name="clean">
<delete dir="${build}"/>
</target>
</project>