|
1
|
<project name="hotel" default="zip" basedir=".">
|
|
2
|
|
|
3
|
<description>Measure Conversion Code Coverage</description>
|
|
4
|
|
|
5
|
<property name="fwd.home" value="." />
|
|
6
|
<property name="app.4gl.src" value="." />
|
|
7
|
<property name="fwd.src.home" value="${fwd.home}/p2j/src" />
|
|
8
|
<property name="app.4gl.src" value="./abl/" />
|
|
9
|
<property name="app.4gl.pattern" value="*.[pPwW]" />
|
|
10
|
<property name="fwd.lib.home" value="${fwd.home}/p2j/build/lib" />
|
|
11
|
<property name="jacoco.exec" value="${basedir}/coverage/jacoco.exec"/>
|
|
12
|
<property name="deploy.home" value="${basedir}/deploy" />
|
|
13
|
<property name="fwd.build.home" value="${fwd.home}/p2j/build" />
|
|
14
|
<property name="output.dir.name" value="coverage" />
|
|
15
|
<property name="output.dir" value="${basedir}/${output.dir.name}" />
|
|
16
|
<property name="zfile" value="zfile_set.txt" />
|
|
17
|
<property name="p2j.home" value="." />
|
|
18
|
<property name="p2jlib.home" value="${p2j.home}/p2j/build/lib" />
|
|
19
|
|
|
20
|
<tstamp>
|
|
21
|
<format property="LOG_STAMP" pattern="yyyyMMdd_HHmmss" />
|
|
22
|
</tstamp>
|
|
23
|
|
|
24
|
<path id="compile.classpath">
|
|
25
|
<fileset dir="${fwd.lib.home}" includes="*.jar"/>
|
|
26
|
</path>
|
|
27
|
|
|
28
|
|
|
29
|
<target name="init">
|
|
30
|
<tstamp/>
|
|
31
|
|
|
32
|
|
|
33
|
<copy todir="${app.4gl.src}">
|
|
34
|
<fileset dir="${fwd.src.home}/4gl/embedded/" includes="**" />
|
|
35
|
</copy>
|
|
36
|
|
|
37
|
<copy todir="${deploy.home}/lib">
|
|
38
|
<fileset dir="${p2jlib.home}">
|
|
39
|
<include name="org.jacoco.*.jar" />
|
|
40
|
<include name="asm*9.8.jar"/>
|
|
41
|
</fileset>
|
|
42
|
</copy>
|
|
43
|
|
|
44
|
|
|
45
|
<taskdef name="jacocoagent" classname="org.jacoco.ant.AgentTask">
|
|
46
|
<classpath>
|
|
47
|
<pathelement location="${deploy.home}/lib/org.jacoco.ant-0.8.13.jar"/>
|
|
48
|
<pathelement location="${deploy.home}/lib/org.jacoco.core-0.8.13.jar"/>
|
|
49
|
<pathelement location="${deploy.home}/lib/org.jacoco.agent-0.8.13.jar"/>
|
|
50
|
</classpath>
|
|
51
|
</taskdef>
|
|
52
|
|
|
53
|
<taskdef name="jacocoreport" classname="org.jacoco.ant.ReportTask">
|
|
54
|
<classpath>
|
|
55
|
<pathelement location="${deploy.home}/lib/org.jacoco.ant-0.8.13.jar"/>
|
|
56
|
<pathelement location="${deploy.home}/lib/org.jacoco.core-0.8.13.jar"/>
|
|
57
|
<pathelement location="${deploy.home}/lib/org.jacoco.report-0.8.13.jar"/>
|
|
58
|
<fileset dir="${deploy.home}/lib">
|
|
59
|
<include name="asm*9.8.jar"/>
|
|
60
|
</fileset>
|
|
61
|
</classpath>
|
|
62
|
</taskdef>
|
|
63
|
|
|
64
|
<jacocoagent property="agentvmparam" destfile="${jacoco.exec}"/>
|
|
65
|
</target>
|
|
66
|
|
|
67
|
<target name="check-zfile-set">
|
|
68
|
<available file="${zfile}" property="zfile-set"/>
|
|
69
|
</target>
|
|
70
|
|
|
71
|
<target name="convert.zset"
|
|
72
|
depends="init, check-zfile-set"
|
|
73
|
description="Convert the 4GL source code to Java source code, using the z-file set file as input."
|
|
74
|
if="zfile-set">
|
|
75
|
<record name="cvt_${LOG_STAMP}.log" action="start"/>
|
|
76
|
<echo message="fileset in use: ${zfile}"/>
|
|
77
|
<java classname="com.goldencode.p2j.convert.ConversionDriver"
|
|
78
|
fork="true"
|
|
79
|
failonerror="true"
|
|
80
|
dir="${basedir}">
|
|
81
|
<jvmarg value="${agentvmparam}"/>
|
|
82
|
<jvmarg value="-server"/>
|
|
83
|
<jvmarg value="-Xmx4G"/>
|
|
84
|
<jvmarg value="-XX:-OmitStackTraceInFastThrow"/>
|
|
85
|
<jvmarg value="-DP2J_HOME=${fwd.home}"/>
|
|
86
|
<arg value="-ZId2"/>
|
|
87
|
<arg value="f2+m0+cb"/>
|
|
88
|
<arg value="${zfile}"/>
|
|
89
|
<classpath refid="compile.classpath"/>
|
|
90
|
</java>
|
|
91
|
<record name="cvt_${LOG_STAMP}.log" action="stop"/>
|
|
92
|
</target>
|
|
93
|
|
|
94
|
<target name="report" depends="convert.zset">
|
|
95
|
<jacocoreport>
|
|
96
|
<executiondata>
|
|
97
|
<file file="${jacoco.exec}"/>
|
|
98
|
</executiondata>
|
|
99
|
<structure name="JaCoCo Report">
|
|
100
|
<classfiles>
|
|
101
|
<fileset dir="${fwd.build.home}/classes/com/goldencode/p2j">
|
|
102
|
<include name="**/*.class"/>
|
|
103
|
</fileset>
|
|
104
|
</classfiles>
|
|
105
|
<sourcefiles encoding="UTF-8">
|
|
106
|
<fileset dir="${fwd.src.home}">
|
|
107
|
<include name="**/*.java"/>
|
|
108
|
</fileset>
|
|
109
|
</sourcefiles>
|
|
110
|
</structure>
|
|
111
|
<html destdir="${output.dir}"/>
|
|
112
|
</jacocoreport>
|
|
113
|
</target>
|
|
114
|
|
|
115
|
<target name="zip" depends="report">
|
|
116
|
<zip destfile="${basedir}/${output.dir.name}.zip"
|
|
117
|
basedir="${output.dir}"/>
|
|
118
|
</target>
|
|
119
|
</project>
|