1 |
1 # |
2 from raptor_tests import CheckWhatSmokeTest |
2 # Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). |
|
3 # All rights reserved. |
|
4 # This component and the accompanying materials are made available |
|
5 # under the terms of the License "Eclipse Public License v1.0" |
|
6 # which accompanies this distribution, and is available |
|
7 # at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 # |
|
9 # Initial Contributors: |
|
10 # Nokia Corporation - initial contribution. |
|
11 # |
|
12 # Contributors: |
|
13 # |
|
14 # Description: |
|
15 # |
|
16 |
|
17 from raptor_tests import SmokeTest |
3 from raptor_tests import AntiTargetSmokeTest |
18 from raptor_tests import AntiTargetSmokeTest |
4 |
19 |
5 def run(): |
20 def run(): |
6 result = CheckWhatSmokeTest.PASS |
21 result = SmokeTest.PASS |
7 failed = [] |
22 failed = [] |
8 |
23 |
9 t = CheckWhatSmokeTest() |
24 t = SmokeTest() |
10 t.description = "Testcases (ID 0101a - 0101d) test trace compiler" |
25 t.description = "Testcases (ID 0101a - 0101d) test trace compiler" |
11 # General test for trace compiler, which generates |
26 # General test for trace compiler, which generates |
12 # 1. trace headers like <source>Traces.h |
27 # 1. trace headers like <source>Traces.h |
13 # 2. fixed_id.definitions |
28 # 2. fixed_id.definitions |
14 # 3. dictionary files like <project name>_<UID>_Dictionary.xml |
29 # 3. dictionary files like <project name>_<UID>_Dictionary.xml |
47 "testtc_dll/armv5/urel/wlanhwinitpermparser.o.d", |
62 "testtc_dll/armv5/urel/wlanhwinitpermparser.o.d", |
48 "testtc_dll/armv5/urel/testTC_urel_objects.via", |
63 "testtc_dll/armv5/urel/testTC_urel_objects.via", |
49 "testtc_dll/armv5/urel/testTC{000a0000}.def", |
64 "testtc_dll/armv5/urel/testTC{000a0000}.def", |
50 "testtc_dll/tracecompile_testTC_1000008d.done" |
65 "testtc_dll/tracecompile_testTC_1000008d.done" |
51 ]) |
66 ]) |
52 t.stdout = [ |
|
53 "<build>$(EPOCROOT)/epoc32/OST_Dictionaries/testTC_0x1000008d_Dictionary.xml</build>", |
|
54 "<build>$(EPOCROOT)/epoc32/include/internal/SymbianTraces/autogen/testTC_0x1000008d_TraceDefinitions.h</build>" |
|
55 ] |
|
56 # Trace compiler doesn't work on Linux for time being. Once it's fixed, will apply all |
67 # Trace compiler doesn't work on Linux for time being. Once it's fixed, will apply all |
57 # trace compiler tests to linux as well. |
68 # trace compiler tests to linux as well. |
58 t.run("windows") |
69 t.run("windows") |
59 if t.result == CheckWhatSmokeTest.FAIL: |
70 if t.result == SmokeTest.FAIL: |
60 result = CheckWhatSmokeTest.FAIL |
71 result = SmokeTest.FAIL |
61 failed.append(t.name) |
72 failed.append(t.name) |
62 |
73 |
63 # General CLEAN test for trace compiler outputs |
74 # General CLEAN test for trace compiler outputs |
64 t = AntiTargetSmokeTest() |
75 t = AntiTargetSmokeTest() |
65 t.id = "101b" |
76 t.id = "101b" |
72 ] |
83 ] |
73 t.addbuildantitargets('smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf', [ |
84 t.addbuildantitargets('smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf', [ |
74 "testtc_dll/tracecompile_testTC_1000008d.done" |
85 "testtc_dll/tracecompile_testTC_1000008d.done" |
75 ]) |
86 ]) |
76 t.run("windows") |
87 t.run("windows") |
77 if t.result == CheckWhatSmokeTest.FAIL: |
88 if t.result == SmokeTest.FAIL: |
78 result = CheckWhatSmokeTest.FAIL |
89 result = SmokeTest.FAIL |
79 failed.append(t.name) |
90 failed.append(t.name) |
80 |
91 |
81 t = CheckWhatSmokeTest() |
92 t = SmokeTest() |
82 t.id = "101c" |
93 t.id = "101c" |
83 t.name = "TC_bv_path" |
94 t.name = "TC_bv_path" |
84 t.command = "sbs -b smoke_suite/test_resources/tracecompiler/TC_featurevariant/group/bld.inf -c armv5.tracecompiler" |
95 t.command = "sbs -b smoke_suite/test_resources/tracecompiler/TC_featurevariant/group/bld.inf -c armv5.tracecompiler" |
85 t.targets = [ |
96 t.targets = [ |
86 "$(EPOCROOT)/epoc32/release/armv5/udeb/HelloWorld.exe", |
97 "$(EPOCROOT)/epoc32/release/armv5/udeb/HelloWorld.exe", |
99 "helloworld_exe/armv5/urel/HelloWorld.o", |
110 "helloworld_exe/armv5/urel/HelloWorld.o", |
100 "helloworld_exe/armv5/urel/HelloWorld.o.d", |
111 "helloworld_exe/armv5/urel/HelloWorld.o.d", |
101 "helloworld_exe/armv5/urel/HelloWorld_urel_objects.via", |
112 "helloworld_exe/armv5/urel/HelloWorld_urel_objects.via", |
102 "helloworld_exe/tracecompile_HelloWorld_e78a5aa3.done" |
113 "helloworld_exe/tracecompile_HelloWorld_e78a5aa3.done" |
103 ]) |
114 ]) |
104 t.stdout = [ |
115 t.run("windows") |
105 "<build>$(EPOCROOT)/epoc32/OST_Dictionaries/HelloWorld_0xe78a5aa3_Dictionary.xml</build>", |
116 if t.result == SmokeTest.FAIL: |
106 "<build>$(EPOCROOT)/epoc32/include/internal/SymbianTraces/autogen/HelloWorld_0xe78a5aa3_TraceDefinitions.h</build>" |
117 result = SmokeTest.FAIL |
107 ] |
|
108 t.run("windows") |
|
109 if t.result == CheckWhatSmokeTest.FAIL: |
|
110 result = CheckWhatSmokeTest.FAIL |
|
111 failed.append(t.name) |
118 failed.append(t.name) |
112 |
119 |
113 # 101d-101f test trace compiler auto mechanism, which is used to avoid wasting time on source |
120 # 101d-101f test trace compiler auto mechanism, which is used to avoid wasting time on source |
114 # containing no osttraces. |
121 # containing no osttraces. |
115 # Trace compiler only runs when there are osttraces code in source. Raptor decides this by |
122 # Trace compiler only runs when there are osttraces code in source. Raptor decides this by |
116 # checking whether there is a "traces" or "traces_<prj_name>" folder in USERINCLUDE in a mmp file. |
123 # checking whether there is a "traces" or "traces_<prj_name>" folder in USERINCLUDE in a mmp file. |
117 t = CheckWhatSmokeTest() |
124 t = SmokeTest() |
118 t.id = "101d" |
125 t.id = "101d" |
119 t.name = "TC_autorun1" |
126 t.name = "TC_autorun1" |
120 # Run - USERINCLUDE ../traces_autorun1 |
127 # Run - USERINCLUDE ../traces_autorun1 |
121 t.command = "sbs -b smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf -c armv5.tracecompiler" + \ |
128 t.command = "sbs -b smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf -c armv5.tracecompiler" + \ |
122 " -p autorun1.mmp" |
129 " -p autorun1.mmp" |
128 "test_/armv5/udeb/test.o", |
135 "test_/armv5/udeb/test.o", |
129 "test_/armv5/urel/test.o", |
136 "test_/armv5/urel/test.o", |
130 "test_/tracecompile_autorun1_00000001.done" |
137 "test_/tracecompile_autorun1_00000001.done" |
131 ]) |
138 ]) |
132 t.run("windows") |
139 t.run("windows") |
133 if t.result == CheckWhatSmokeTest.FAIL: |
140 if t.result == SmokeTest.FAIL: |
134 result = CheckWhatSmokeTest.FAIL |
141 result = SmokeTest.FAIL |
135 failed.append(t.name) |
142 failed.append(t.name) |
136 |
143 |
137 t = AntiTargetSmokeTest() |
144 t = AntiTargetSmokeTest() |
138 t.id = "101e" |
145 t.id = "101e" |
139 t.name = "TC_autorun2" |
146 t.name = "TC_autorun2" |
152 ]) |
159 ]) |
153 t.addbuildantitargets('smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf', [ |
160 t.addbuildantitargets('smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf', [ |
154 "test_/tracecompile_autorun2_00000001.done" |
161 "test_/tracecompile_autorun2_00000001.done" |
155 ]) |
162 ]) |
156 t.run("windows") |
163 t.run("windows") |
157 if t.result == CheckWhatSmokeTest.FAIL: |
164 if t.result == SmokeTest.FAIL: |
158 result = CheckWhatSmokeTest.FAIL |
165 result = SmokeTest.FAIL |
159 failed.append(t.name) |
166 failed.append(t.name) |
160 |
167 |
161 t = AntiTargetSmokeTest() |
168 t = AntiTargetSmokeTest() |
162 t.id = "101f" |
169 t.id = "101f" |
163 t.name = "TC_autorun3" |
170 t.name = "TC_autorun3" |
176 ]) |
183 ]) |
177 t.addbuildantitargets('smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf', [ |
184 t.addbuildantitargets('smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf', [ |
178 "test_/tracecompile_autorun3_00000001.done" |
185 "test_/tracecompile_autorun3_00000001.done" |
179 ]) |
186 ]) |
180 t.run("windows") |
187 t.run("windows") |
181 if t.result == CheckWhatSmokeTest.FAIL: |
188 if t.result == SmokeTest.FAIL: |
182 result = CheckWhatSmokeTest.FAIL |
189 result = SmokeTest.FAIL |
183 failed.append(t.name) |
190 failed.append(t.name) |
184 |
191 |
185 # Test trace compiler doesn't run when it is switched off |
192 # Test trace compiler doesn't run when it is switched off |
186 # Trace compiler switch is off by default. To turn it on use variant ".tracecompiler". |
193 # Trace compiler switch is off by default. To turn it on use variant ".tracecompiler". |
187 t = AntiTargetSmokeTest() |
194 t = AntiTargetSmokeTest() |
200 ]) |
207 ]) |
201 t.addbuildantitargets('smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf', [ |
208 t.addbuildantitargets('smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf', [ |
202 "test_/tracecompile_autorun1_00000001.done" |
209 "test_/tracecompile_autorun1_00000001.done" |
203 ]) |
210 ]) |
204 t.run("windows") |
211 t.run("windows") |
205 if t.result == CheckWhatSmokeTest.FAIL: |
212 if t.result == SmokeTest.FAIL: |
206 result = CheckWhatSmokeTest.FAIL |
213 result = SmokeTest.FAIL |
207 failed.append(t.name) |
214 failed.append(t.name) |
208 |
215 |
209 |
216 |
210 t.name = "traceccompiler_general" |
217 t.name = "tracecompiler_general" |
211 t.result = result |
218 t.result = result |
212 |
219 |
213 print "\nOverall Result : " + result.upper() + "\n" |
220 print "\nOverall Result : " + result.upper() + "\n" |
214 if result == CheckWhatSmokeTest.FAIL: |
221 if result == SmokeTest.FAIL: |
215 print len(failed), "tests failed:" |
222 print len(failed), "tests failed:" |
216 for x in failed: |
223 for x in failed: |
217 print x |
224 print x |
218 print |
225 print |
219 |
226 |