|
1 |
|
2 from raptor_tests import SmokeTest |
|
3 from raptor_tests import AntiTargetSmokeTest |
|
4 |
|
5 def run(): |
|
6 result = SmokeTest.PASS |
|
7 failed = [] |
|
8 |
|
9 # 102a - 102b Test running trace compiler on one mmp with different source files controlled macros. |
|
10 t = AntiTargetSmokeTest() |
|
11 t.description = "Testcases (ID 102a - 102c) test trace compiler running with variants and macros" |
|
12 |
|
13 # 1st time build includes var_source1 and var_source2 for variant_source.mmp |
|
14 t.id = "102a" |
|
15 t.name = "TC_variant_source_var1" |
|
16 t.command = "sbs -b smoke_suite/test_resources/tracecompiler/variant_source/group/bld.inf -c default.tc_var1" + \ |
|
17 " --configpath=test/smoke_suite/test_resources/tracecompiler/variant_source" |
|
18 t.targets = [ |
|
19 "$(EPOCROOT)/epoc32/release/armv5/udeb/invariant_source.exe", |
|
20 "$(EPOCROOT)/epoc32/release/armv5/udeb/variant_source.exe", |
|
21 "$(EPOCROOT)/epoc32/release/armv5/urel/invariant_source.exe", |
|
22 "$(EPOCROOT)/epoc32/release/armv5/urel/variant_source.exe", |
|
23 "$(EPOCROOT)/epoc32/release/winscw/udeb/invariant_source.exe", |
|
24 "$(EPOCROOT)/epoc32/release/winscw/udeb/variant_source.exe", |
|
25 "$(EPOCROOT)/epoc32/release/winscw/urel/invariant_source.exe", |
|
26 "$(EPOCROOT)/epoc32/release/winscw/urel/variant_source.exe", |
|
27 "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/variant_source/traces/inv_sourceTraces.h", |
|
28 "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/variant_source/traces/var_source1Traces.h", |
|
29 "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/variant_source/traces/var_source2Traces.h", |
|
30 "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/variant_source/traces/fixed_id.definitions", |
|
31 "$(EPOCROOT)/epoc32/ost_dictionaries/invariant_source_0x10000002_Dictionary.xml", |
|
32 "$(EPOCROOT)/epoc32/ost_dictionaries/variant_source_0x10000003_Dictionary.xml", |
|
33 "$(EPOCROOT)/epoc32/include/internal/symbiantraces/autogen/invariant_source_0x10000002_TraceDefinitions.h", |
|
34 "$(EPOCROOT)/epoc32/include/internal/symbiantraces/autogen/variant_source_0x10000003_TraceDefinitions.h" |
|
35 ] |
|
36 t.addbuildtargets('smoke_suite/test_resources/tracecompiler/variant_source/group/bld.inf', [ |
|
37 "invariant_source_/armv5/udeb/inv_source.o", |
|
38 "invariant_source_/armv5/udeb/inv_source.o.d", |
|
39 "invariant_source_/armv5/urel/inv_source.o", |
|
40 "invariant_source_/armv5/urel/inv_source.o.d", |
|
41 "invariant_source_/winscw/udeb/inv_source.o", |
|
42 "invariant_source_/winscw/udeb/inv_source.o.d", |
|
43 "invariant_source_/winscw/urel/inv_source.o", |
|
44 "invariant_source_/winscw/urel/inv_source.o.d", |
|
45 "invariant_source_/tracecompile_invariant_source_10000002.done", |
|
46 "variant_source_/armv5/udeb/var_source1.o", |
|
47 "variant_source_/armv5/udeb/var_source1.o.d", |
|
48 "variant_source_/armv5/udeb/var_source2.o", |
|
49 "variant_source_/armv5/udeb/var_source2.o.d", |
|
50 "variant_source_/armv5/urel/var_source1.o", |
|
51 "variant_source_/armv5/urel/var_source1.o.d", |
|
52 "variant_source_/armv5/urel/var_source2.o", |
|
53 "variant_source_/armv5/urel/var_source2.o.d", |
|
54 "variant_source_/winscw/udeb/var_source1.o", |
|
55 "variant_source_/winscw/udeb/var_source1.o.d", |
|
56 "variant_source_/winscw/udeb/var_source2.o", |
|
57 "variant_source_/winscw/udeb/var_source2.o.d", |
|
58 "variant_source_/winscw/urel/var_source1.o", |
|
59 "variant_source_/winscw/urel/var_source1.o.d", |
|
60 "variant_source_/winscw/urel/var_source2.o", |
|
61 "variant_source_/winscw/urel/var_source2.o.d", |
|
62 "variant_source_/tracecompile_variant_source_10000003.done" |
|
63 ]) |
|
64 t.antitargets = [ |
|
65 "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/variant_source/traces/var_source3Traces.h" |
|
66 ] |
|
67 t.addbuildantitargets('smoke_suite/test_resources/tracecompiler/variant_source/group/bld.inf', [ |
|
68 "variant_source_/armv5/udeb/var_source3.o", |
|
69 "variant_source_/armv5/urel/var_source3.o", |
|
70 "variant_source_/winscw/udeb/var_source3.o", |
|
71 "variant_source_/winscw/urel/var_source3.o" |
|
72 ]) |
|
73 t.run("windows") |
|
74 if t.result == SmokeTest.FAIL: |
|
75 result = SmokeTest.FAIL |
|
76 failed.append(t.name) |
|
77 |
|
78 # 2nd time build includes var_source1 and var_source3 for variant_source.mmp |
|
79 t = SmokeTest() |
|
80 t.id = "102b" |
|
81 t.name = "TC_variant_source_var2" |
|
82 t.command = "sbs -b smoke_suite/test_resources/tracecompiler/variant_source/group/bld.inf -c default.tc_var2" + \ |
|
83 " --configpath=test/smoke_suite/test_resources/tracecompiler/variant_source" |
|
84 t.targets = [ |
|
85 "$(EPOCROOT)/epoc32/release/armv5/udeb/invariant_source.exe", |
|
86 "$(EPOCROOT)/epoc32/release/armv5/udeb/variant_source.exe", |
|
87 "$(EPOCROOT)/epoc32/release/armv5/urel/invariant_source.exe", |
|
88 "$(EPOCROOT)/epoc32/release/armv5/urel/variant_source.exe", |
|
89 "$(EPOCROOT)/epoc32/release/winscw/udeb/invariant_source.exe", |
|
90 "$(EPOCROOT)/epoc32/release/winscw/udeb/variant_source.exe", |
|
91 "$(EPOCROOT)/epoc32/release/winscw/urel/invariant_source.exe", |
|
92 "$(EPOCROOT)/epoc32/release/winscw/urel/variant_source.exe", |
|
93 "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/variant_source/traces/inv_sourceTraces.h", |
|
94 "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/variant_source/traces/var_source1Traces.h", |
|
95 "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/variant_source/traces/var_source2Traces.h", |
|
96 "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/variant_source/traces/var_source3Traces.h", |
|
97 "$(EPOCROOT)/epoc32/ost_dictionaries/invariant_source_0x10000002_Dictionary.xml", |
|
98 "$(EPOCROOT)/epoc32/ost_dictionaries/variant_source_0x10000003_Dictionary.xml", |
|
99 "$(EPOCROOT)/epoc32/include/internal/symbiantraces/autogen/invariant_source_0x10000002_TraceDefinitions.h", |
|
100 "$(EPOCROOT)/epoc32/include/internal/symbiantraces/autogen/variant_source_0x10000003_TraceDefinitions.h" |
|
101 ] |
|
102 t.addbuildtargets('smoke_suite/test_resources/tracecompiler/variant_source/group/bld.inf', [ |
|
103 "invariant_source_/armv5/udeb/inv_source.o", |
|
104 "invariant_source_/armv5/udeb/inv_source.o.d", |
|
105 "invariant_source_/armv5/urel/inv_source.o", |
|
106 "invariant_source_/armv5/urel/inv_source.o.d", |
|
107 "invariant_source_/winscw/udeb/inv_source.o", |
|
108 "invariant_source_/winscw/udeb/inv_source.o.d", |
|
109 "invariant_source_/winscw/urel/inv_source.o", |
|
110 "invariant_source_/winscw/urel/inv_source.o.d", |
|
111 "invariant_source_/tracecompile_invariant_source_10000002.done", |
|
112 "variant_source_/armv5/udeb/var_source1.o", |
|
113 "variant_source_/armv5/udeb/var_source1.o.d", |
|
114 "variant_source_/armv5/udeb/var_source3.o", |
|
115 "variant_source_/armv5/udeb/var_source3.o.d", |
|
116 "variant_source_/armv5/urel/var_source1.o", |
|
117 "variant_source_/armv5/urel/var_source1.o.d", |
|
118 "variant_source_/armv5/urel/var_source3.o", |
|
119 "variant_source_/armv5/urel/var_source3.o.d", |
|
120 "variant_source_/winscw/udeb/var_source1.o", |
|
121 "variant_source_/winscw/udeb/var_source1.o.d", |
|
122 "variant_source_/winscw/udeb/var_source3.o", |
|
123 "variant_source_/winscw/udeb/var_source3.o.d", |
|
124 "variant_source_/winscw/urel/var_source1.o", |
|
125 "variant_source_/winscw/urel/var_source1.o.d", |
|
126 "variant_source_/winscw/urel/var_source3.o", |
|
127 "variant_source_/winscw/urel/var_source3.o.d", |
|
128 "variant_source_/tracecompile_variant_source_10000003.done" |
|
129 ]) |
|
130 t.run("windows") |
|
131 if t.result == SmokeTest.FAIL: |
|
132 result = SmokeTest.FAIL |
|
133 failed.append(t.name) |
|
134 |
|
135 |
|
136 # Build multiple variants together, which involves different source files in one mmp |
|
137 # Raptor only call trace compiler once no matter how many variants |
|
138 # In this example, ".phone" 1 2 3 involve tc_a b c respectively, and all involve tc_main |
|
139 t = SmokeTest() |
|
140 t.id = "102c" |
|
141 t.name = "TC_multiple_variants" |
|
142 t.command = "sbs -b smoke_suite/test_resources/tracecompiler/multiple_variants/group/bld.inf" + \ |
|
143 " -c armv5.phone1 -c armv5.phone2 -c armv5.phone3" + \ |
|
144 " --configpath=test/smoke_suite/test_resources/tracecompiler/multiple_variants" |
|
145 t.targets = [ |
|
146 "$(EPOCROOT)/epoc32/release/armv5.phone1/udeb/tc_variants.exe", |
|
147 "$(EPOCROOT)/epoc32/release/armv5.phone1/urel/tc_variants.exe", |
|
148 "$(EPOCROOT)/epoc32/release/armv5.phone2/udeb/tc_variants.exe", |
|
149 "$(EPOCROOT)/epoc32/release/armv5.phone2/urel/tc_variants.exe", |
|
150 "$(EPOCROOT)/epoc32/release/armv5.phone3/udeb/tc_variants.exe", |
|
151 "$(EPOCROOT)/epoc32/release/armv5.phone3/urel/tc_variants.exe", |
|
152 "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/multiple_variants/traces/tc_mainTraces.h", |
|
153 "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/multiple_variants/traces/tc_aTraces.h", |
|
154 "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/multiple_variants/traces/tc_bTraces.h", |
|
155 "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/multiple_variants/traces/tc_cTraces.h", |
|
156 "$(EPOCROOT)/epoc32/ost_dictionaries/tc_variants_0x10000004_Dictionary.xml", |
|
157 "$(EPOCROOT)/epoc32/include/internal/symbiantraces/autogen/tc_variants_0x10000004_TraceDefinitions.h" |
|
158 ] |
|
159 t.addbuildtargets('smoke_suite/test_resources/tracecompiler/multiple_variants/group/bld.inf', [ |
|
160 "tc_variants_/armv5.phone1/udeb/tc_main.o", |
|
161 "tc_variants_/armv5.phone1/udeb/tc_a.o", |
|
162 "tc_variants_/armv5.phone1/urel/tc_main.o", |
|
163 "tc_variants_/armv5.phone1/urel/tc_a.o", |
|
164 "tc_variants_/armv5.phone2/udeb/tc_main.o", |
|
165 "tc_variants_/armv5.phone2/udeb/tc_b.o", |
|
166 "tc_variants_/armv5.phone2/urel/tc_main.o", |
|
167 "tc_variants_/armv5.phone2/urel/tc_b.o", |
|
168 "tc_variants_/armv5.phone3/udeb/tc_main.o", |
|
169 "tc_variants_/armv5.phone3/udeb/tc_c.o", |
|
170 "tc_variants_/armv5.phone3/urel/tc_main.o", |
|
171 "tc_variants_/armv5.phone3/urel/tc_c.o", |
|
172 "tc_variants_/tracecompile_tc_variants_10000004.done" |
|
173 ]) |
|
174 t.run("windows") |
|
175 if t.result == SmokeTest.FAIL: |
|
176 result = SmokeTest.FAIL |
|
177 failed.append(t.name) |
|
178 |
|
179 |
|
180 # 102d and 102e is to test a very rare situation, where one mmpfile includes 3 children mmpfiles, |
|
181 # which are guarded by macros. They share some source file, and two share the same UID3. |
|
182 # When build them together, Raptor should be able to distinguish them and run trace compiler |
|
183 # on each of them. |
|
184 t = SmokeTest() |
|
185 t.id = "102d" |
|
186 t.name = "TC_mum_children_mmps_build" |
|
187 t.command = "sbs -b smoke_suite/test_resources/tracecompiler/mum_children_mmps/group/bld.inf" + \ |
|
188 " -c armv5.tc_var1 -c armv5.tc_var2 -c armv5.tc_var3" + \ |
|
189 " --configpath=test/smoke_suite/test_resources/tracecompiler/mum_children_mmps" |
|
190 t.targets = [ |
|
191 "$(EPOCROOT)/epoc32/release/armv5/udeb/child1.exe", |
|
192 "$(EPOCROOT)/epoc32/release/armv5/urel/child1.exe", |
|
193 "$(EPOCROOT)/epoc32/release/armv5/udeb/child2.exe", |
|
194 "$(EPOCROOT)/epoc32/release/armv5/urel/child2.exe", |
|
195 "$(EPOCROOT)/epoc32/release/armv5/udeb/child3.exe", |
|
196 "$(EPOCROOT)/epoc32/release/armv5/urel/child3.exe", |
|
197 "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces_child1_exe/child1Traces.h", |
|
198 "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces_child1_exe/commonTraces.h", |
|
199 "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces_child2_exe/child2Traces.h", |
|
200 "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces_child2_exe/commonTraces.h", |
|
201 "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces_child3_exe/child3Traces.h", |
|
202 "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces_child3_exe/commonTraces.h", |
|
203 "$(EPOCROOT)/epoc32/ost_dictionaries/child1_exe_0x11100001_Dictionary.xml", |
|
204 "$(EPOCROOT)/epoc32/ost_dictionaries/child2_exe_0x11100002_Dictionary.xml", |
|
205 "$(EPOCROOT)/epoc32/ost_dictionaries/child3_exe_0x11100002_Dictionary.xml", |
|
206 "$(EPOCROOT)/epoc32/include/internal/symbiantraces/autogen/child1_exe_0x11100001_TraceDefinitions.h", |
|
207 "$(EPOCROOT)/epoc32/include/internal/symbiantraces/autogen/child2_exe_0x11100002_TraceDefinitions.h", |
|
208 "$(EPOCROOT)/epoc32/include/internal/symbiantraces/autogen/child3_exe_0x11100002_TraceDefinitions.h" |
|
209 ] |
|
210 t.addbuildtargets('smoke_suite/test_resources/tracecompiler/mum_children_mmps/group/bld.inf', [ |
|
211 "child1_/armv5/udeb/child1.o", |
|
212 "child1_/armv5/udeb/common.o", |
|
213 "child1_/armv5/urel/child1.o", |
|
214 "child1_/armv5/urel/common.o", |
|
215 "child1_/tracecompile_child1_exe_11100001.done", |
|
216 "child2_/armv5/udeb/child2.o", |
|
217 "child2_/armv5/udeb/common.o", |
|
218 "child2_/armv5/urel/child2.o", |
|
219 "child2_/armv5/urel/common.o", |
|
220 "child2_/tracecompile_child2_exe_11100002.done", |
|
221 "child3_/armv5/udeb/child3.o", |
|
222 "child3_/armv5/udeb/common.o", |
|
223 "child3_/armv5/urel/child3.o", |
|
224 "child3_/armv5/urel/common.o", |
|
225 "child3_/tracecompile_child3_exe_11100002.done" |
|
226 ]) |
|
227 t.warnings = 3 |
|
228 t.run("windows") |
|
229 if t.result == SmokeTest.FAIL: |
|
230 result = SmokeTest.FAIL |
|
231 failed.append(t.name) |
|
232 |
|
233 # Clean mmp A then build mmp B and C. As common.cpp is shared by A B and C, commonTraces.h would be |
|
234 # cleaned when cleaning mmp A. But as B and C aren't cleaned, Raptor wouldn't run trace compiler on |
|
235 # B and C, thus commonTraces.h wouldn't be generated again, so be missing for mmp B and C. |
|
236 # The solution is to use new trace path "traces_<TARGET>_<TARGETTYPE>" instead of "traces" so shared |
|
237 # source has different copy of trace headers for different projects. |
|
238 t = SmokeTest() |
|
239 t.id = "102e" |
|
240 t.name = "TC_mum_children_mmps_clean" |
|
241 t.command = "sbs -b smoke_suite/test_resources/tracecompiler/mum_children_mmps/group/bld.inf" + \ |
|
242 " --configpath=test/smoke_suite/test_resources/tracecompiler/mum_children_mmps" + \ |
|
243 " -c armv5.tc_var1 CLEAN && " + \ |
|
244 "sbs -b smoke_suite/test_resources/tracecompiler/mum_children_mmps/group/bld.inf" + \ |
|
245 " --configpath=test/smoke_suite/test_resources/tracecompiler/mum_children_mmps" + \ |
|
246 " -c armv5.tc_var2 -c armv5.tc_var3" |
|
247 t.targets = [ |
|
248 "$(EPOCROOT)/epoc32/release/armv5/udeb/child2.exe", |
|
249 "$(EPOCROOT)/epoc32/release/armv5/urel/child2.exe", |
|
250 "$(EPOCROOT)/epoc32/release/armv5/udeb/child3.exe", |
|
251 "$(EPOCROOT)/epoc32/release/armv5/urel/child3.exe", |
|
252 "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces_child2_exe/child2Traces.h", |
|
253 "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces_child2_exe/commonTraces.h", |
|
254 "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces_child3_exe/child3Traces.h", |
|
255 "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces_child3_exe/commonTraces.h", |
|
256 "$(EPOCROOT)/epoc32/ost_dictionaries/child2_exe_0x11100002_Dictionary.xml", |
|
257 "$(EPOCROOT)/epoc32/ost_dictionaries/child3_exe_0x11100002_Dictionary.xml", |
|
258 "$(EPOCROOT)/epoc32/include/internal/symbiantraces/autogen/child2_exe_0x11100002_TraceDefinitions.h", |
|
259 "$(EPOCROOT)/epoc32/include/internal/symbiantraces/autogen/child3_exe_0x11100002_TraceDefinitions.h" |
|
260 ] |
|
261 t.addbuildtargets('smoke_suite/test_resources/tracecompiler/mum_children_mmps/group/bld.inf', [ |
|
262 "child2_/armv5/udeb/child2.o", |
|
263 "child2_/armv5/udeb/common.o", |
|
264 "child2_/armv5/urel/child2.o", |
|
265 "child2_/armv5/urel/common.o", |
|
266 "child2_/tracecompile_child2_exe_11100002.done", |
|
267 "child3_/armv5/udeb/child3.o", |
|
268 "child3_/armv5/udeb/common.o", |
|
269 "child3_/armv5/urel/child3.o", |
|
270 "child3_/armv5/urel/common.o", |
|
271 "child3_/tracecompile_child3_exe_11100002.done" |
|
272 ]) |
|
273 t.warnings = 3 |
|
274 t.run("windows") |
|
275 if t.result == SmokeTest.FAIL: |
|
276 result = SmokeTest.FAIL |
|
277 failed.append(t.name) |
|
278 |
|
279 |
|
280 t.name = "tracecompiler_variants" |
|
281 t.result = result |
|
282 |
|
283 print "\nOverall Result : " + result.upper() + "\n" |
|
284 if result == SmokeTest.FAIL: |
|
285 print len(failed), "tests failed:" |
|
286 for x in failed: |
|
287 print x |
|
288 print |
|
289 |
|
290 t.id = "102" |
|
291 return t |
|
292 |