587
|
1 |
<?xml version="1.0"?>
|
|
2 |
<!--
|
|
3 |
============================================================================
|
|
4 |
Name : test_qt.ant.xml
|
|
5 |
Part of : Helium
|
|
6 |
|
|
7 |
Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
8 |
All rights reserved.
|
|
9 |
This component and the accompanying materials are made available
|
|
10 |
under the terms of the License "Eclipse Public License v1.0"
|
|
11 |
which accompanies this distribution, and is available
|
|
12 |
at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
13 |
|
|
14 |
Initial Contributors:
|
|
15 |
Nokia Corporation - initial contribution.
|
|
16 |
|
|
17 |
Contributors:
|
|
18 |
|
|
19 |
Description:
|
|
20 |
|
|
21 |
============================================================================
|
|
22 |
-->
|
|
23 |
<!--* @package compile -->
|
|
24 |
<project name="test-qt" xmlns:au="org.apache.ant.antunit" xmlns:hlm="http://www.nokia.com/helium">
|
|
25 |
<description>
|
|
26 |
Testing Qt targets.
|
|
27 |
</description>
|
|
28 |
<property environment="env"/>
|
|
29 |
|
|
30 |
<property name="helium.dir" location="../../../.." />
|
588
|
31 |
<import file="${helium.dir}/build.xml"/>
|
587
|
32 |
<property name="qt.temp.dir" location="${helium.build.dir}/antunit/qt" />
|
|
33 |
|
|
34 |
<target name="setUp">
|
|
35 |
<mkdir dir="${qt.temp.dir}" />
|
|
36 |
<!--delete dir="${qt.temp.dir}" />
|
|
37 |
<mkdir dir="${qt.temp.dir}" /-->
|
|
38 |
</target>
|
|
39 |
|
|
40 |
<!--target name="tearDown">
|
|
41 |
<delete dir="${qt.temp.dir}" />
|
|
42 |
</target-->
|
|
43 |
|
|
44 |
<target name="test-sysdef3-namespaced-qt-ant">
|
|
45 |
<property name="sysdef.configuration" value="demo" />
|
|
46 |
<fmpp sourceFile="${helium.dir}/tools/compile/qt/templates/run-qmake.ant.xml.ftl"
|
|
47 |
outputFile="${qt.temp.dir}/run-qmake3.ant.xml">
|
|
48 |
<data expandProperties="yes">
|
|
49 |
data: xml(${helium.dir}/tests/data/test-qt-sysdef3.xml)
|
|
50 |
ant: antProperties()
|
|
51 |
</data>
|
|
52 |
</fmpp>
|
|
53 |
<au:assertFileExists file="${qt.temp.dir}/run-qmake3.ant.xml" />
|
|
54 |
<loadfile property="run.qmake.out" srcfile="${qt.temp.dir}/run-qmake3.ant.xml" />
|
|
55 |
<au:assertTrue message="The output file must contain the -nomoc argument.">
|
|
56 |
<contains string="${run.qmake.out}" substring="-nomoc" />
|
|
57 |
</au:assertTrue>
|
|
58 |
<au:assertTrue message="The output file must contain helloworld.pro">
|
|
59 |
<contains string="${run.qmake.out}" substring="helloworld.pro" />
|
|
60 |
</au:assertTrue>
|
|
61 |
<au:assertTrue message="The output file must contain helloworldapi.pro">
|
|
62 |
<contains string="${run.qmake.out}" substring="helloworldapi.pro" />
|
|
63 |
</au:assertTrue>
|
645
|
64 |
<au:assertTrue message="The output file must contain sf/app/helloworldcons/group ${run.qmake.out}">
|
|
65 |
<contains string="${run.qmake.out}" substring="sf/app/helloworldcons/group" />
|
587
|
66 |
</au:assertTrue>
|
645
|
67 |
<au:assertTrue message="The output file must contain sf/mw/helloworldapi/group">
|
|
68 |
<contains string="${run.qmake.out}" substring="sf/mw/helloworldapi/group" />
|
587
|
69 |
</au:assertTrue>
|
|
70 |
</target>
|
|
71 |
|
|
72 |
<target name="test-sysdef151-namespaced-qt-ant">
|
|
73 |
<property name="sysdef.configuration" value="demo" />
|
645
|
74 |
<var name="sysdef3.enabled" value="false" />
|
587
|
75 |
<fmpp sourceFile="${helium.dir}/tools/compile/qt/templates/run-qmake.ant.xml.ftl"
|
|
76 |
outputFile="${qt.temp.dir}/run-qmake151.ant.xml">
|
|
77 |
<data expandProperties="yes">
|
|
78 |
data: xml(${helium.dir}/tests/data/test-qt-sysdef151.xml)
|
|
79 |
ant: antProperties()
|
|
80 |
</data>
|
|
81 |
</fmpp>
|
645
|
82 |
<var name="sysdef3.enabled" value="true" />
|
587
|
83 |
<au:assertFileExists file="${qt.temp.dir}/run-qmake151.ant.xml" />
|
|
84 |
<loadfile property="run.qmake.out" srcfile="${qt.temp.dir}/run-qmake151.ant.xml" />
|
|
85 |
<au:assertTrue message="The output file must contain the -nomoc argument.">
|
|
86 |
<contains string="${run.qmake.out}" substring="-nomoc" />
|
|
87 |
</au:assertTrue>
|
|
88 |
<au:assertTrue message="The output file must contain helloworld.pro">
|
|
89 |
<contains string="${run.qmake.out}" substring="helloworld.pro" />
|
|
90 |
</au:assertTrue>
|
|
91 |
<au:assertTrue message="The output file must contain helloworldapi.pro">
|
|
92 |
<contains string="${run.qmake.out}" substring="helloworldapi.pro" />
|
|
93 |
</au:assertTrue>
|
628
|
94 |
<au:assertTrue message="The output file must contain $${build.drive}/sf/app/HelloWorldCons/group">
|
|
95 |
<contains string="${run.qmake.out}" substring="$${build.drive}/sf/app/HelloWorldCons/group" />
|
587
|
96 |
</au:assertTrue>
|
628
|
97 |
<au:assertTrue message="The output file must contain $${build.drive}/sf/mw/HelloWorldAPI/group">
|
|
98 |
<contains string="${run.qmake.out}" substring="$${build.drive}/sf/mw/HelloWorldAPI/group" />
|
587
|
99 |
</au:assertTrue>
|
|
100 |
</target>
|
|
101 |
|
|
102 |
<target name="test-sysdef151-namespaced-qt-mk">
|
628
|
103 |
<propertyregex property="build.drive.slash" input="${build.drive}" regexp="\\" replace="/" />
|
|
104 |
<property name="build.drive.slash" value="${build.drive}" />
|
587
|
105 |
<property name="sysdef.configuration" value="demo" />
|
645
|
106 |
<var name="sysdef3.enabled" value="false" />
|
587
|
107 |
<fmpp sourceFile="${helium.dir}/tools/compile/qt/templates/run-qmake.mk.ftl"
|
|
108 |
outputFile="${qt.temp.dir}/run-qmake151.mk">
|
|
109 |
<data expandProperties="yes">
|
|
110 |
data: xml(${helium.dir}/tests/data/test-qt-sysdef151.xml)
|
|
111 |
ant: antProperties()
|
|
112 |
</data>
|
|
113 |
</fmpp>
|
645
|
114 |
<var name="sysdef3.enabled" value="true" />
|
587
|
115 |
<au:assertFileExists file="${qt.temp.dir}/run-qmake151.mk" />
|
|
116 |
<loadfile property="run.qmake.out" srcfile="${qt.temp.dir}/run-qmake151.mk" />
|
|
117 |
<au:assertTrue message="The output file must contain the -nomoc argument.">
|
|
118 |
<contains string="${run.qmake.out}" substring="-nomoc" />
|
|
119 |
</au:assertTrue>
|
|
120 |
<au:assertTrue message="The output file must contain helloworld.pro">
|
|
121 |
<contains string="${run.qmake.out}" substring="helloworld.pro" />
|
|
122 |
</au:assertTrue>
|
|
123 |
<au:assertTrue message="The output file must contain helloworldapi.pro">
|
|
124 |
<contains string="${run.qmake.out}" substring="helloworldapi.pro" />
|
|
125 |
</au:assertTrue>
|
645
|
126 |
<au:assertTrue message="The output file must contain -@cd ${build.drive.slash}/sf/mw/HelloWorldAPI/group && ${build.drive}/epoc32/tools/qmake -listgen -nomoc helloworldapi.pro, ${run.qmake.out}">
|
|
127 |
<contains string="${run.qmake.out}" substring="-@cd ${build.drive.slash}/sf/mw/HelloWorldAPI/group && ${build.drive}/epoc32/tools/qmake -listgen -nomoc helloworldapi.pro" />
|
587
|
128 |
</au:assertTrue>
|
645
|
129 |
<au:assertTrue message="The output file must contain -@cd ${build.drive.slash}/sf/app/HelloWorldCons/group && ${build.drive}/epoc32/tools/qmake -listgen -r helloworld.pro">
|
|
130 |
<contains string="${run.qmake.out}" substring="-@cd ${build.drive.slash}/sf/app/HelloWorldCons/group && ${build.drive}/epoc32/tools/qmake -listgen -r helloworld.pro" />
|
587
|
131 |
</au:assertTrue>
|
|
132 |
</target>
|
|
133 |
|
|
134 |
<target name="test-sysdef3-namespaced-qt-mk">
|
628
|
135 |
<propertyregex property="build.drive.slash" input="${build.drive}" regexp="\\" replace="/" global="true" />
|
|
136 |
<property name="build.drive.slash" value="${build.drive}" />
|
587
|
137 |
<property name="sysdef.configuration" value="demo" />
|
|
138 |
<fmpp sourceFile="${helium.dir}/tools/compile/qt/templates/run-qmake.mk.ftl"
|
|
139 |
outputFile="${qt.temp.dir}/run-qmake3.mk">
|
|
140 |
<data expandProperties="yes">
|
|
141 |
data: xml(${helium.dir}/tests/data/test-qt-sysdef3.xml)
|
|
142 |
ant: antProperties()
|
|
143 |
</data>
|
|
144 |
</fmpp>
|
|
145 |
<au:assertFileExists file="${qt.temp.dir}/run-qmake3.mk" />
|
628
|
146 |
<loadfile property="run.qmake.out" srcfile="${qt.temp.dir}/run-qmake3.mk" />
|
587
|
147 |
<au:assertTrue message="The output file must contain the -nomoc argument.">
|
|
148 |
<contains string="${run.qmake.out}" substring="-nomoc" />
|
|
149 |
</au:assertTrue>
|
|
150 |
<au:assertTrue message="The output file must contain helloworld.pro">
|
|
151 |
<contains string="${run.qmake.out}" substring="helloworld.pro" />
|
|
152 |
</au:assertTrue>
|
|
153 |
<au:assertTrue message="The output file must contain helloworldapi.pro">
|
|
154 |
<contains string="${run.qmake.out}" substring="helloworldapi.pro" />
|
|
155 |
</au:assertTrue>
|
645
|
156 |
<au:assertTrue message="The output file must contain sf/mw/helloworldapi/group && ${build.drive}/epoc32/tools/qmake -listgen -nomoc helloworldapi.pro, ${run.qmake.out}">
|
|
157 |
<contains string="${run.qmake.out}" substring="sf/mw/helloworldapi/group && ${build.drive}/epoc32/tools/qmake -listgen -nomoc helloworldapi.pro" />
|
587
|
158 |
</au:assertTrue>
|
645
|
159 |
<au:assertTrue message="The output file must contain sf/app/helloworldcons/group && ${build.drive}/epoc32/tools/qmake -listgen -r helloworld.pro">
|
|
160 |
<contains string="${run.qmake.out}" substring="sf/app/helloworldcons/group && ${build.drive}/epoc32/tools/qmake -listgen -r helloworld.pro" />
|
587
|
161 |
</au:assertTrue>
|
|
162 |
</target>
|
|
163 |
</project> |