|
1 <?xml version="1.0" encoding="UTF-8"?> |
|
2 <!-- This build file is for the sole purpose of running the unit tests that are located in --> |
|
3 <!-- this plug-in in the local development environment. It may be disposed of if not used. --> |
|
4 |
|
5 <project name="com.symbian.smt.gui.unittest" basedir="."> |
|
6 |
|
7 <!-- User Property --> |
|
8 <property name="reports.dir" value="${basedir}/report" /> |
|
9 <property name="coverage.dir" value="${reports.dir}/coverage" /> |
|
10 <property name="junit.dir" value="${reports.dir}/junit" /> |
|
11 <property name="destination.results.folder" value="${basedir}/results" /> |
|
12 |
|
13 <property name="main.build" value="${basedir}/build.xml/" /> |
|
14 |
|
15 <target name="clean" description="Clean the plug-in: com.symbian.smt.gui.unittest"> |
|
16 <ant antfile="${main.build}" target="clean" inheritall="false" /> |
|
17 <delete dir="${reports.dir}" /> |
|
18 </target> |
|
19 |
|
20 <target name="run.junit"> |
|
21 <mkdir dir="${reports.dir}" /> |
|
22 <mkdir dir="${junit.dir}" /> |
|
23 <mkdir dir="${coverage.dir}" /> |
|
24 |
|
25 <property name="instr.jar.folder" value="${basedir}/bin" /> |
|
26 <property name="jars" value="${instr.jar.folder}" /> |
|
27 <property name="current.version" value="1.1.1" /> |
|
28 <property name="version" value="${current.version}" /> |
|
29 <property name="jar" value="${jars}/com.symbian.smt.gui_${version}.jar" /> |
|
30 |
|
31 <path id="classpath.test"> |
|
32 <pathelement path="${jar}" /> |
|
33 <pathelement path="${basedir}/@dot/" /> |
|
34 <pathelement path="${basedir}/../lib/cglib-nodep-2.1_3.jar" /> |
|
35 <pathelement path="${basedir}/../lib/jmock-cglib-1.1.0.jar" /> |
|
36 <pathelement path="${basedir}/../lib/jmock-1.1.0.jar" /> |
|
37 <pathelement path="${basedir}/../lib/emma.jar" /> |
|
38 <pathelement path="${basedir}/../lib/junit-4.1.jar" /> |
|
39 |
|
40 <pathelement path="${basedir}/../com.symbian.smt.gui/@dot" /> |
|
41 <pathelement path="${basedir}/../com.symbian.smt.gui/bin" /> |
|
42 |
|
43 <pathelement path="${basedir}/@dot" /> |
|
44 <pathelement path="${basedir}/bin" /> |
|
45 </path> |
|
46 |
|
47 <path id="required.plugins"> |
|
48 <fileset dir="${basedir}/../shared/"> |
|
49 <include name="*.jar"/> |
|
50 </fileset> |
|
51 </path> |
|
52 |
|
53 |
|
54 <junit printsummary="withOutAndErr" fork="yes" haltonfailure="no" failureproperty="junit.failed"> |
|
55 <classpath> |
|
56 <path refid="classpath.test" /> |
|
57 <path refid="required.plugins" /> |
|
58 </classpath> |
|
59 <formatter type="xml" /> |
|
60 <formatter type="plain" /> |
|
61 <batchtest todir="${junit.dir}"> |
|
62 <fileset dir="${basedir}/src"> |
|
63 <include name="**/*Test.java" /> |
|
64 </fileset> |
|
65 </batchtest> |
|
66 <jvmarg value="-Djava.library.path=${basedir}/../shared;${java.library.path}" /> |
|
67 <jvmarg value="-Demma.coverage.out.file=${coverage.dir}/smtgui_runtime.ec " /> |
|
68 </junit> |
|
69 |
|
70 <!--<fail message="JUnit test failure." if="junit.failed" />--> |
|
71 </target> |
|
72 |
|
73 <target name="gather.results"> |
|
74 <copy todir="${destination.results.folder}" failonerror="true" overwrite="true"> |
|
75 <fileset dir="${reports.dir}" /> |
|
76 </copy> |
|
77 </target> |
|
78 |
|
79 </project> |