summaryrefslogtreecommitdiffstats
path: root/scilab/build.qa.incl.xml
diff options
context:
space:
mode:
authorAntoine ELIAS <antoine.elias@scilab-enterprises.com>2016-11-13 12:04:44 +0100
committerAntoine ELIAS <antoine.elias@scilab-enterprises.com>2016-11-13 14:03:36 +0100
commitba0902ab6a77ca532086b5b4f27d67489be4b814 (patch)
tree3bdaf3c398f4f32dffb1fc14e017f8a98bd0a729 /scilab/build.qa.incl.xml
parenta7015d45ff3ac2f10c1564d14fb0f6669478a806 (diff)
parenta53c2c4f46b1ea42d908b751310cb6bd92b7a870 (diff)
downloadscilab-windows.zip
scilab-windows.tar.gz
Merge remote-tracking branch 'origin/master' into windowswindows
Change-Id: I80edbceb67381ca1af2b19ef82ee08fc5b385909
Diffstat (limited to 'scilab/build.qa.incl.xml')
-rw-r--r--scilab/build.qa.incl.xml68
1 files changed, 33 insertions, 35 deletions
diff --git a/scilab/build.qa.incl.xml b/scilab/build.qa.incl.xml
index c5819a5..db9b6fb 100644
--- a/scilab/build.qa.incl.xml
+++ b/scilab/build.qa.incl.xml
@@ -1,14 +1,14 @@
1 <project name="common_qa"> 1 <project name="common_qa">
2 <!-- Unitary testing + code coverage --> 2 <!-- Unitary testing + code coverage -->
3 3
4 <property name="base.dir" location="../../"/> 4 <property name="base.dir" location="../../"/>
5 5
6 <!-- JAR names --> 6 <!-- JAR names -->
7 <property file="${base.dir}/scilab-lib.properties"/> 7 <property file="${base.dir}/scilab-lib.properties"/>
8 <property file="${base.dir}/scilab-lib-doc.properties"/> 8 <property file="${base.dir}/scilab-lib-doc.properties"/>
9 <!-- Configure ANT flags --> 9 <!-- Configure ANT flags -->
10 <property file="${base.dir}/scilab.properties"/> 10 <property file="${base.dir}/scilab.properties"/>
11 11
12 <!-- Where we can find the test sources --> 12 <!-- Where we can find the test sources -->
13 <property name="test.dir" location="tests/"/> 13 <property name="test.dir" location="tests/"/>
14 <property name="src.test.dir" location="${test.dir}/java/"/> 14 <property name="src.test.dir" location="${test.dir}/java/"/>
@@ -18,14 +18,14 @@
18 <property name="report.codecoverage.dir" location="${report.test.dir}/codecoverage/"/> 18 <property name="report.codecoverage.dir" location="${report.test.dir}/codecoverage/"/>
19 <property name="report.codecoverage.html.dir" location="${report.test.dir}/html-codecoverage/"/> 19 <property name="report.codecoverage.html.dir" location="${report.test.dir}/html-codecoverage/"/>
20 <property name="report.codecoverage.xml.dir" location="${report.test.dir}/xml-codecoverage/"/> 20 <property name="report.codecoverage.xml.dir" location="${report.test.dir}/xml-codecoverage/"/>
21 21
22 <!-- Check style definitions --> 22 <!-- Check style definitions -->
23 <property name="checkstyle.config.file" value="${base.dir}/checkstyle/scilab_checkstyle_convention.xml"/> 23 <property name="checkstyle.config.file" value="${base.dir}/checkstyle/scilab_checkstyle_convention.xml"/>
24 <property name="checkstyle.stylesheet" value="${thirdparty.dir}/checkstyle/contrib/checkstyle-noframes-sorted.xsl"/> 24 <property name="checkstyle.stylesheet" value="${thirdparty.dir}/checkstyle/contrib/checkstyle-noframes-sorted.xsl"/>
25 <property name="checkstyle.report.dir" value="${build.dir}/checkstyle"/> 25 <property name="checkstyle.report.dir" value="${build.dir}/checkstyle"/>
26 <property name="checkstyle.xml.report.file" value="${checkstyle.report.dir}/checkstyle_errors.xml"/> 26 <property name="checkstyle.xml.report.file" value="${checkstyle.report.dir}/checkstyle_errors.xml"/>
27 <property name="checkstyle.html.report.file" value="${checkstyle.report.dir}/checkstyle_errors.htm"/> 27 <property name="checkstyle.html.report.file" value="${checkstyle.report.dir}/checkstyle_errors.htm"/>
28 28
29 <path id="unittest.classpath"> 29 <path id="unittest.classpath">
30 <pathelement location="${junit4.jar}"/> 30 <pathelement location="${junit4.jar}"/>
31 <pathelement location="${hamcrest-all.jar}"/> 31 <pathelement location="${hamcrest-all.jar}"/>
@@ -33,16 +33,16 @@
33 <path id="cobertura_classpath"> 33 <path id="cobertura_classpath">
34 <pathelement location="${cobertura.jar}"/> 34 <pathelement location="${cobertura.jar}"/>
35 </path> 35 </path>
36 36
37 <!-- Clean test --> 37 <!-- Clean test -->
38 <target name="clean-test" description="Clean test files"> 38 <target name="clean-test" description="Clean test files">
39 <delete dir="${build.test.dir}"/> 39 <delete dir="${build.test.dir}"/>
40 </target> 40 </target>
41 41
42 <target name="existing-tests"> 42 <target name="existing-tests">
43 <available property="test-present" file="${src.test.dir}"/> 43 <available property="test-present" file="${src.test.dir}"/>
44 </target> 44 </target>
45 45
46 <!-- Compile test sources --> 46 <!-- Compile test sources -->
47 <target name="compile-test" description="Build tests" depends="existing-tests, clean-test, jar" if="test-present"> 47 <target name="compile-test" description="Build tests" depends="existing-tests, clean-test, jar" if="test-present">
48 <!-- clean the test to make sure it will build properly --> 48 <!-- clean the test to make sure it will build properly -->
@@ -53,7 +53,7 @@
53 </classpath> 53 </classpath>
54 </javac> 54 </javac>
55 </target> 55 </target>
56 56
57 <taskdef resource="checkstyletask.properties" classpathref="checkstyle.classpath"/> 57 <taskdef resource="checkstyletask.properties" classpathref="checkstyle.classpath"/>
58 <!-- Checkstyle process --> 58 <!-- Checkstyle process -->
59 <target name="checkstyle" depends="checkstyle-init" description="Generates a report of code convention violations."> 59 <target name="checkstyle" depends="checkstyle-init" description="Generates a report of code convention violations.">
@@ -74,19 +74,17 @@
74 <target name="checkstyle-clean"> 74 <target name="checkstyle-clean">
75 <delete dir="${checkstyle.report.dir}"/> 75 <delete dir="${checkstyle.report.dir}"/>
76 </target> 76 </target>
77 77
78 78
79 <!-- Allows the override of the forkMode by local build.xml --> 79 <!-- Allows the override of the forkMode by local build.xml -->
80 <condition property="forkModeAlreadySet"> 80 <condition property="forkModeAlreadySet">
81 <isset property="junit.forkMode" /> 81 <isset property="junit.forkMode" />
82 </condition> 82 </condition>
83 83
84 <target name="validate"> 84 <target name="validate">
85 <!-- Empty target to be override by other build.xml --> 85 <!-- Empty target to be override by other build.xml -->
86 </target> 86 </target>
87 87
88 <taskdef classpathref="cobertura_classpath" resource="tasks.properties" />
89
90 <target name="instrument"> 88 <target name="instrument">
91 <cobertura-instrument todir="${instrumented.classes.test.dir}" datafile="${report.test.dir}/${library.name}.ser"> 89 <cobertura-instrument todir="${instrumented.classes.test.dir}" datafile="${report.test.dir}/${library.name}.ser">
92 <fileset dir="${classes.dir}"> 90 <fileset dir="${classes.dir}">
@@ -94,16 +92,16 @@
94 </fileset> 92 </fileset>
95 </cobertura-instrument> 93 </cobertura-instrument>
96 </target> 94 </target>
97 95
98 <target name="codecoverage" depends="compile-test, instrument, test"> 96 <target name="codecoverage" depends="compile-test, instrument, test">
99 <cobertura-merge> 97 <cobertura-merge>
100 <fileset dir="${report.test.dir}"> 98 <fileset dir="${report.test.dir}">
101 <include name="*.ser" /> 99 <include name="*.ser" />
102 </fileset> 100 </fileset>
103 </cobertura-merge> 101 </cobertura-merge>
104 102
105 <cobertura-report format="html" destdir="${report.codecoverage.html.dir}"> 103 <cobertura-report format="html" destdir="${report.codecoverage.html.dir}">
106 104
107 <fileset dir="${library.action_binding.src.dir}"> 105 <fileset dir="${library.action_binding.src.dir}">
108 <include name="**/*.java" /> 106 <include name="**/*.java" />
109 </fileset> 107 </fileset>
@@ -126,9 +124,9 @@
126 <include name="**/*.java" /> 124 <include name="**/*.java" />
127 </fileset> 125 </fileset>
128 </cobertura-report> 126 </cobertura-report>
129 127
130 <cobertura-report format="xml" destdir="${report.codecoverage.xml.dir}"> 128 <cobertura-report format="xml" destdir="${report.codecoverage.xml.dir}">
131 129
132 <fileset dir="${library.action_binding.src.dir}"> 130 <fileset dir="${library.action_binding.src.dir}">
133 <include name="**/*.java" /> 131 <include name="**/*.java" />
134 </fileset> 132 </fileset>
@@ -151,14 +149,14 @@
151 <include name="**/*.java" /> 149 <include name="**/*.java" />
152 </fileset> 150 </fileset>
153 </cobertura-report> 151 </cobertura-report>
154 152
155 </target> 153 </target>
156 154
157 155
158 <target name="detectForkMode" unless="forkModeAlreadySet"> 156 <target name="detectForkMode" unless="forkModeAlreadySet">
159 <property name="junit.forkMode" value="perBatch"/> 157 <property name="junit.forkMode" value="perBatch"/>
160 </target> 158 </target>
161 159
162 <target name="test" depends="existing-tests, compile-test, validate, detectForkMode" if="test-present"> 160 <target name="test" depends="existing-tests, compile-test, validate, detectForkMode" if="test-present">
163 <mkdir dir="${report.xml.test.dir}" /> 161 <mkdir dir="${report.xml.test.dir}" />
164 <mkdir dir="${report.html.test.dir}" /> 162 <mkdir dir="${report.html.test.dir}" />
@@ -166,11 +164,11 @@
166 <junit fork="yes" forkmode="${junit.forkMode}" failureproperty="junit.failure"> 164 <junit fork="yes" forkmode="${junit.forkMode}" failureproperty="junit.failure">
167 <sysproperty key="net.sourceforge.cobertura.datafile" 165 <sysproperty key="net.sourceforge.cobertura.datafile"
168 file="${report.test.dir}/${library.name}.ser" /> 166 file="${report.test.dir}/${library.name}.ser" />
169 167
170 168
171 <classpath location="${instrumented.classes.test.dir}"/> 169 <classpath location="${instrumented.classes.test.dir}"/>
172 <classpath location="${classes.test.dir}"/> 170 <classpath location="${classes.test.dir}"/>
173 171
174 <classpath> 172 <classpath>
175 <path refid="unittest.classpath"/> 173 <path refid="unittest.classpath"/>
176 <path refid="compile.classpath"/> 174 <path refid="compile.classpath"/>
@@ -178,30 +176,30 @@
178 <pathelement location="${classes.test.dir}"/> 176 <pathelement location="${classes.test.dir}"/>
179 <pathelement location="${classes.dir}"/> 177 <pathelement location="${classes.dir}"/>
180 </classpath> 178 </classpath>
181 179
182 180
183 <!-- Where ${basedir} is the module base directory --> 181 <!-- Where ${basedir} is the module base directory -->
184 <env key="SCI" value="${basedir}/../.."/> 182 <env key="SCI" value="${basedir}/../.."/>
185 <jvmarg value="-DtestngTests=1"/> 183 <jvmarg value="-DtestngTests=1"/>
186 <jvmarg value="-Djava.library.path=${base.dir}/modules/.libs/:${base.dir}/modules/javasci/.libs/:${base.dir}/modules/types/.libs/:${base.dir}/modules/localization/.libs/:${base.dir}/modules/commons/.libs/:${base.dir}/modules/action_binding/.libs/:${base.dir}/thirdparty/:${base.dir}/bin/:/usr/lib/jni/:/usr/lib64/jni:/usr/lib/java/:/usr/lib64/java:"/> 184 <jvmarg value="-Djava.library.path=${base.dir}/modules/.libs/:${base.dir}/modules/javasci/.libs/:${base.dir}/modules/types/.libs/:${base.dir}/modules/localization/.libs/:${base.dir}/modules/commons/.libs/:${base.dir}/modules/action_binding/.libs/:${base.dir}/thirdparty/:${base.dir}/bin/:/usr/lib/jni/:/usr/lib64/jni:/usr/lib/java/:/usr/lib64/java:"/>
187 185
188 <formatter type="brief" useFile="no" /> 186 <formatter type="brief" useFile="no" />
189 <formatter type="xml" /> 187 <formatter type="xml" />
190 188
191 <batchtest fork="yes" todir="${report.xml.test.dir}" > 189 <batchtest fork="yes" todir="${report.xml.test.dir}" >
192 <fileset dir="tests/java/"> 190 <fileset dir="tests/java/">
193 <include name="**/*.java"/> 191 <include name="**/*.java"/>
194 </fileset> 192 </fileset>
195 </batchtest> 193 </batchtest>
196 </junit> 194 </junit>
197 195
198 <junitreport todir="${report.xml.test.dir}"> 196 <junitreport todir="${report.xml.test.dir}">
199 <fileset dir="${report.xml.test.dir}"> 197 <fileset dir="${report.xml.test.dir}">
200 <include name="*.xml"/> 198 <include name="*.xml"/>
201 </fileset> 199 </fileset>
202 <report format="frames" todir="${report.html.test.dir}"/> 200 <report format="frames" todir="${report.html.test.dir}"/>
203 </junitreport> 201 </junitreport>
204 202
205 <fail if="junit.failure" message="Unit test(s) failed. See the report"/> 203 <fail if="junit.failure" message="Unit test(s) failed. See the report"/>
206 </target> 204 </target>
207</project> 205</project>