-
Notifications
You must be signed in to change notification settings - Fork 28
/
build.xml
123 lines (104 loc) · 4.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
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
<project name="FeatureHouse" default="jar" basedir=".">
<description>
FeatureHouse: Automatic, language-independent software composition and merging
</description>
<property name="srcfstgen" location="./fstgen/src:./fstgen/test:./CIDE2_ast/src:./CIDE_generateAST/src" />
<property name="srcfstcomp" location="./fstcomp:./fstgen/src:./fstgen/test:./CIDE2_ast/src:./CIDE_generateAST/src" />
<property name="srcfstmerge" location="./fstmerge:./fstcomp:./fstgen/src:./fstgen/test:./CIDE2_ast/src:./CIDE_generateAST/src" />
<property name="build-dir" location="build" />
<property name="jar-dir" location="jar" />
<property name="test-dir" location="test" />
<property name="result-dir" location="result" />
<presetdef name="my.javac">
<javac includeantruntime="false" />
</presetdef>
<tstamp>
<format property="current.time" pattern="yyyMMdd" />
</tstamp>
<target name="fstcomp">
<mkdir dir="${build-dir}"/>
<my.javac sourcepath="${srcfstcomp}" destdir="${build-dir}" srcdir="./fstcomp/composer/"/>
</target>
<target name="fstmerge">
<mkdir dir="${build-dir}"/>
<my.javac sourcepath="${srcfstmerge}" destdir="${build-dir}" srcdir="./fstmerge/merger/"/>
</target>
<target name="jar" depends="fstcomp,fstmerge" description="generate featurehouse.jar" >
<mkdir dir="${jar-dir}"/>
<jar jarfile="${jar-dir}/featurehouse_${current.time}.jar" basedir="${build-dir}">
<manifest>
<attribute name="Main-Class" value="composer.FSTGenComposer" />
</manifest>
</jar>
</target>
<target name="test-compile-fstcomp">
<mkdir dir="${test-dir}" />
<mkdir dir="${test-dir}/fstcomp-build" />
<my.javac classpath="./fstgen/lib/junit-4.8.2.jar" sourcepath="${srcfstcomp}" destdir="${test-dir}/fstcomp-build" srcdir="./fstcomp/test/" excludes="*testfiles/**"/>
<copy todir="${test-dir}/fstcomp">
<fileset dir="./fstcomp/test/">
<include name="*testfiles/**" />
</fileset>
</copy>
<copy todir="${test-dir}/fstcomp">
<fileset dir="./fstcomp/examples/">
<include name="Java/GPL/**" />
</fileset>
</copy>
</target>
<target name="test-fstcomp" depends="test-compile-fstcomp">
<mkdir dir="${result-dir}/fstcomp" />
<mkdir dir="${result-dir}/fstcomp/output" />
<junit printsummary="off" haltonfailure="no" failureproperty="test.failed">
<classpath>
<pathelement location="./fstgen/lib/junit-4.8.2.jar" />
<pathelement location="${test-dir}/fstcomp-build" />
</classpath>
<formatter type="brief" usefile="false"/>
<batchtest fork="yes" todir="${result-dir}/fstcomp">
<!--formatter type="plain" usefile="false"/-->
<fileset dir="${test-dir}/fstcomp-build" >
<include name="fstcomp/**Test.class" />
</fileset>
</batchtest>
</junit>
<fail message="Some tests failed!" if="test.failed" />
</target>
<target name="test-compile-fstgen">
<mkdir dir="${test-dir}" />
<mkdir dir="${test-dir}/fstgen-build" />
<my.javac classpath="./fstgen/lib/junit-4.8.2.jar" sourcepath="${srcfstgen}" destdir="${test-dir}/fstgen-build" srcdir="./fstgen/test/" />
<copy todir="${test-dir}">
<fileset dir="./fstgen/test/">
<include name="*testfiles/**" />
</fileset>
</copy>
</target>
<target name="test-fstgen" depends="test-compile-fstgen">
<mkdir dir="${result-dir}/fstgen" />
<junit printsummary="off" haltonfailure="no" failureproperty="test.failed">
<classpath>
<pathelement location="./fstgen/lib/junit-4.8.2.jar" />
<pathelement location="${test-dir}/fstgen-build" />
</classpath>
<formatter type="brief" usefile="false"/>
<batchtest fork="yes" todir="${result-dir}/fstgen">
<!--formatter type="plain" usefile="false"/-->
<fileset dir="${test-dir}/fstgen-build" >
<include name="*Test.class" />
</fileset>
</batchtest>
</junit>
<fail message="Some tests failed!" if="test.failed" />
</target>
<target name="test-compile" depends="test-compile-fstgen,test-compile-fstcomp">
</target>
<target name="test" depends="test-compile,test-fstgen,test-fstcomp">
</target>
<target name="clean" description="clean up" >
<delete dir="${build-dir}"/>
<delete dir="${jar-dir}"/>
<delete dir="${test-dir}"/>
<delete dir="${result-dir}"/>
</target>
</project>