author | Iain Williamson <iain.williamson@nokia.com> |
Tue, 12 Jan 2010 10:47:39 +0000 | |
branch | fix |
changeset 161 | 62c28226cde4 |
parent 3 | e1eecf4d390d |
child 163 | c3eca3dd5925 |
permissions | -rw-r--r-- |
3 | 1 |
|
161
62c28226cde4
Bug 1494 - Trace compiler files not in whatlog - FIX and TESTS though UNTESTED
Iain Williamson <iain.williamson@nokia.com>
parents:
3
diff
changeset
|
2 |
from raptor_tests import CheckWhatSmokeTest |
3 | 3 |
from raptor_tests import AntiTargetSmokeTest |
4 |
||
5 |
def run(): |
|
161
62c28226cde4
Bug 1494 - Trace compiler files not in whatlog - FIX and TESTS though UNTESTED
Iain Williamson <iain.williamson@nokia.com>
parents:
3
diff
changeset
|
6 |
result = CheckWhatSmokeTest.PASS |
3 | 7 |
failed = [] |
8 |
||
161
62c28226cde4
Bug 1494 - Trace compiler files not in whatlog - FIX and TESTS though UNTESTED
Iain Williamson <iain.williamson@nokia.com>
parents:
3
diff
changeset
|
9 |
t = CheckWhatSmokeTest() |
3 | 10 |
t.description = "Testcases (ID 0101a - 0101d) test trace compiler" |
11 |
# General test for trace compiler, which generates |
|
12 |
# 1. trace headers like <source>Traces.h |
|
13 |
# 2. fixed_id.definitions |
|
14 |
# 3. dictionary files like <project name>_<UID>_Dictionary.xml |
|
15 |
# 4. trace definitions like <project name>_<UID>_TraceDefinitions.h |
|
16 |
t.id = "101a" |
|
17 |
t.name = "TC_general" |
|
18 |
t.command = "sbs -b smoke_suite/test_resources/tracecompiler/testTC/group/bld.inf -c armv5.tracecompiler" |
|
19 |
t.targets = [ |
|
20 |
"$(EPOCROOT)/epoc32/release/armv5/lib/testTC.dso", |
|
21 |
"$(EPOCROOT)/epoc32/release/armv5/lib/testTC{000a0000}.dso", |
|
22 |
"$(EPOCROOT)/epoc32/release/armv5/udeb/testTC.dll", |
|
23 |
"$(EPOCROOT)/epoc32/release/armv5/udeb/testTC.dll.map", |
|
24 |
"$(EPOCROOT)/epoc32/release/armv5/urel/testTC.dll", |
|
25 |
"$(EPOCROOT)/epoc32/release/armv5/urel/testTC.dll.map", |
|
26 |
"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/testTC/traces/wlanhwinitTraces.h", |
|
27 |
"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/testTC/traces/wlanhwinitmainTraces.h", |
|
28 |
"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/testTC/traces/wlanhwinitpermparserTraces.h", |
|
29 |
"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/testTC/traces/fixed_id.definitions", |
|
30 |
"$(EPOCROOT)/epoc32/ost_dictionaries/testTC_0x1000008d_Dictionary.xml", |
|
31 |
"$(EPOCROOT)/epoc32/include/internal/symbiantraces/autogen/testTC_0x1000008d_TraceDefinitions.h" |
|
32 |
] |
|
33 |
t.addbuildtargets('smoke_suite/test_resources/tracecompiler/testTC/group/bld.inf', [ |
|
34 |
"testtc_dll/armv5/udeb/wlanhwinit.o", |
|
35 |
"testtc_dll/armv5/udeb/wlanhwinit.o.d", |
|
36 |
"testtc_dll/armv5/udeb/wlanhwinitmain.o", |
|
37 |
"testtc_dll/armv5/udeb/wlanhwinitmain.o.d", |
|
38 |
"testtc_dll/armv5/udeb/wlanhwinitpermparser.o", |
|
39 |
"testtc_dll/armv5/udeb/wlanhwinitpermparser.o.d", |
|
40 |
"testtc_dll/armv5/udeb/testTC_udeb_objects.via", |
|
41 |
"testtc_dll/armv5/udeb/testTC{000a0000}.def", |
|
42 |
"testtc_dll/armv5/urel/wlanhwinit.o", |
|
43 |
"testtc_dll/armv5/urel/wlanhwinit.o.d", |
|
44 |
"testtc_dll/armv5/urel/wlanhwinitmain.o", |
|
45 |
"testtc_dll/armv5/urel/wlanhwinitmain.o.d", |
|
46 |
"testtc_dll/armv5/urel/wlanhwinitpermparser.o", |
|
47 |
"testtc_dll/armv5/urel/wlanhwinitpermparser.o.d", |
|
48 |
"testtc_dll/armv5/urel/testTC_urel_objects.via", |
|
49 |
"testtc_dll/armv5/urel/testTC{000a0000}.def", |
|
50 |
"testtc_dll/tracecompile_testTC_1000008d.done" |
|
51 |
]) |
|
161
62c28226cde4
Bug 1494 - Trace compiler files not in whatlog - FIX and TESTS though UNTESTED
Iain Williamson <iain.williamson@nokia.com>
parents:
3
diff
changeset
|
52 |
t.stdout = [ |
62c28226cde4
Bug 1494 - Trace compiler files not in whatlog - FIX and TESTS though UNTESTED
Iain Williamson <iain.williamson@nokia.com>
parents:
3
diff
changeset
|
53 |
"<build>$(EPOCROOT)/epoc32/OST_Dictionaries/testTC_0x1000008d_Dictionary.xml</build>", |
62c28226cde4
Bug 1494 - Trace compiler files not in whatlog - FIX and TESTS though UNTESTED
Iain Williamson <iain.williamson@nokia.com>
parents:
3
diff
changeset
|
54 |
"<build>$(EPOCROOT)/epoc32/include/internal/SymbianTraces/autogen/testTC_0x1000008d_TraceDefinitions.h</build>" |
62c28226cde4
Bug 1494 - Trace compiler files not in whatlog - FIX and TESTS though UNTESTED
Iain Williamson <iain.williamson@nokia.com>
parents:
3
diff
changeset
|
55 |
] |
3 | 56 |
# 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. |
|
58 |
t.run("windows") |
|
161
62c28226cde4
Bug 1494 - Trace compiler files not in whatlog - FIX and TESTS though UNTESTED
Iain Williamson <iain.williamson@nokia.com>
parents:
3
diff
changeset
|
59 |
if t.result == CheckWhatSmokeTest.FAIL: |
62c28226cde4
Bug 1494 - Trace compiler files not in whatlog - FIX and TESTS though UNTESTED
Iain Williamson <iain.williamson@nokia.com>
parents:
3
diff
changeset
|
60 |
result = CheckWhatSmokeTest.FAIL |
3 | 61 |
failed.append(t.name) |
62 |
||
63 |
# General CLEAN test for trace compiler outputs |
|
64 |
t = AntiTargetSmokeTest() |
|
65 |
t.id = "101b" |
|
66 |
t.name = "TC_general_CLEAN" |
|
67 |
t.command = "sbs -b smoke_suite/test_resources/tracecompiler/testTC/group/bld.inf -c armv5.tracecompiler CLEAN" |
|
68 |
t.antitargets = [ |
|
69 |
"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/testTC/traces/wlanhwinitTraces.h", |
|
70 |
"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/testTC/traces/wlanhwinitmainTraces.h", |
|
71 |
"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/testTC/traces/wlanhwinitpermparserTraces.h" |
|
72 |
] |
|
73 |
t.addbuildantitargets('smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf', [ |
|
74 |
"testtc_dll/tracecompile_testTC_1000008d.done" |
|
75 |
]) |
|
76 |
t.run("windows") |
|
161
62c28226cde4
Bug 1494 - Trace compiler files not in whatlog - FIX and TESTS though UNTESTED
Iain Williamson <iain.williamson@nokia.com>
parents:
3
diff
changeset
|
77 |
if t.result == CheckWhatSmokeTest.FAIL: |
62c28226cde4
Bug 1494 - Trace compiler files not in whatlog - FIX and TESTS though UNTESTED
Iain Williamson <iain.williamson@nokia.com>
parents:
3
diff
changeset
|
78 |
result = CheckWhatSmokeTest.FAIL |
3 | 79 |
failed.append(t.name) |
80 |
||
161
62c28226cde4
Bug 1494 - Trace compiler files not in whatlog - FIX and TESTS though UNTESTED
Iain Williamson <iain.williamson@nokia.com>
parents:
3
diff
changeset
|
81 |
t = CheckWhatSmokeTest() |
3 | 82 |
t.id = "101c" |
83 |
t.name = "TC_bv_path" |
|
84 |
t.command = "sbs -b smoke_suite/test_resources/tracecompiler/TC_featurevariant/group/bld.inf -c armv5.tracecompiler" |
|
85 |
t.targets = [ |
|
86 |
"$(EPOCROOT)/epoc32/release/armv5/udeb/HelloWorld.exe", |
|
87 |
"$(EPOCROOT)/epoc32/release/armv5/udeb/HelloWorld.exe.map", |
|
88 |
"$(EPOCROOT)/epoc32/release/armv5/urel/HelloWorld.exe", |
|
89 |
"$(EPOCROOT)/epoc32/release/armv5/urel/HelloWorld.exe.map", |
|
90 |
"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/TC_featurevariant/traces/HelloWorldTraces.h", |
|
91 |
"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/TC_featurevariant/traces/fixed_id.definitions", |
|
92 |
"$(EPOCROOT)/epoc32/ost_dictionaries/HelloWorld_0xe78a5aa3_Dictionary.xml", |
|
93 |
"$(EPOCROOT)/epoc32/include/internal/symbiantraces/autogen/HelloWorld_0xe78a5aa3_TraceDefinitions.h" |
|
94 |
] |
|
95 |
t.addbuildtargets('smoke_suite/test_resources/tracecompiler/TC_featurevariant/group/bld.inf', [ |
|
96 |
"helloworld_exe/armv5/udeb/HelloWorld.o", |
|
97 |
"helloworld_exe/armv5/udeb/HelloWorld.o.d", |
|
98 |
"helloworld_exe/armv5/udeb/HelloWorld_udeb_objects.via", |
|
99 |
"helloworld_exe/armv5/urel/HelloWorld.o", |
|
100 |
"helloworld_exe/armv5/urel/HelloWorld.o.d", |
|
101 |
"helloworld_exe/armv5/urel/HelloWorld_urel_objects.via", |
|
102 |
"helloworld_exe/tracecompile_HelloWorld_e78a5aa3.done" |
|
103 |
]) |
|
161
62c28226cde4
Bug 1494 - Trace compiler files not in whatlog - FIX and TESTS though UNTESTED
Iain Williamson <iain.williamson@nokia.com>
parents:
3
diff
changeset
|
104 |
t.stdout = [ |
62c28226cde4
Bug 1494 - Trace compiler files not in whatlog - FIX and TESTS though UNTESTED
Iain Williamson <iain.williamson@nokia.com>
parents:
3
diff
changeset
|
105 |
"<build>$(EPOCROOT)/epoc32/OST_Dictionaries/HelloWorld_0xe78a5aa3_Dictionary.xml</build>", |
62c28226cde4
Bug 1494 - Trace compiler files not in whatlog - FIX and TESTS though UNTESTED
Iain Williamson <iain.williamson@nokia.com>
parents:
3
diff
changeset
|
106 |
"<build>$(EPOCROOT)/epoc32/include/internal/SymbianTraces/autogen/HelloWorld_0xe78a5aa3_TraceDefinitions.h</build>" |
62c28226cde4
Bug 1494 - Trace compiler files not in whatlog - FIX and TESTS though UNTESTED
Iain Williamson <iain.williamson@nokia.com>
parents:
3
diff
changeset
|
107 |
] |
3 | 108 |
t.run("windows") |
161
62c28226cde4
Bug 1494 - Trace compiler files not in whatlog - FIX and TESTS though UNTESTED
Iain Williamson <iain.williamson@nokia.com>
parents:
3
diff
changeset
|
109 |
if t.result == CheckWhatSmokeTest.FAIL: |
62c28226cde4
Bug 1494 - Trace compiler files not in whatlog - FIX and TESTS though UNTESTED
Iain Williamson <iain.williamson@nokia.com>
parents:
3
diff
changeset
|
110 |
result = CheckWhatSmokeTest.FAIL |
3 | 111 |
failed.append(t.name) |
112 |
||
113 |
# 101d-101f test trace compiler auto mechanism, which is used to avoid wasting time on source |
|
114 |
# containing no osttraces. |
|
115 |
# 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. |
|
161
62c28226cde4
Bug 1494 - Trace compiler files not in whatlog - FIX and TESTS though UNTESTED
Iain Williamson <iain.williamson@nokia.com>
parents:
3
diff
changeset
|
117 |
t = CheckWhatSmokeTest() |
3 | 118 |
t.id = "101d" |
119 |
t.name = "TC_autorun1" |
|
120 |
# Run - USERINCLUDE ../traces_autorun1 |
|
121 |
t.command = "sbs -b smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf -c armv5.tracecompiler" + \ |
|
122 |
" -p autorun1.mmp" |
|
123 |
t.targets = [ |
|
124 |
"$(EPOCROOT)/epoc32/release/armv5/udeb/test.exe", |
|
125 |
"$(EPOCROOT)/epoc32/release/armv5/urel/test.exe", |
|
126 |
] |
|
127 |
t.addbuildtargets('smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf', [ |
|
128 |
"test_/armv5/udeb/test.o", |
|
129 |
"test_/armv5/urel/test.o", |
|
130 |
"test_/tracecompile_autorun1_00000001.done" |
|
131 |
]) |
|
132 |
t.run("windows") |
|
161
62c28226cde4
Bug 1494 - Trace compiler files not in whatlog - FIX and TESTS though UNTESTED
Iain Williamson <iain.williamson@nokia.com>
parents:
3
diff
changeset
|
133 |
if t.result == CheckWhatSmokeTest.FAIL: |
62c28226cde4
Bug 1494 - Trace compiler files not in whatlog - FIX and TESTS though UNTESTED
Iain Williamson <iain.williamson@nokia.com>
parents:
3
diff
changeset
|
134 |
result = CheckWhatSmokeTest.FAIL |
3 | 135 |
failed.append(t.name) |
136 |
||
137 |
t = AntiTargetSmokeTest() |
|
138 |
t.id = "101e" |
|
139 |
t.name = "TC_autorun2" |
|
140 |
# No run - USERINCLUDE ./tracesnotmatch |
|
141 |
t.command = "sbs -b smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf -c armv5.tracecompiler" + \ |
|
142 |
" -p autorun2.mmp CLEAN " + \ |
|
143 |
"&& sbs -b smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf -c armv5.tracecompiler" + \ |
|
144 |
" -p autorun2.mmp" |
|
145 |
t.targets = [ |
|
146 |
"$(EPOCROOT)/epoc32/release/armv5/udeb/test.exe", |
|
147 |
"$(EPOCROOT)/epoc32/release/armv5/urel/test.exe", |
|
148 |
] |
|
149 |
t.addbuildtargets('smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf', [ |
|
150 |
"test_/armv5/udeb/test.o", |
|
151 |
"test_/armv5/urel/test.o", |
|
152 |
]) |
|
153 |
t.addbuildantitargets('smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf', [ |
|
154 |
"test_/tracecompile_autorun2_00000001.done" |
|
155 |
]) |
|
156 |
t.run("windows") |
|
161
62c28226cde4
Bug 1494 - Trace compiler files not in whatlog - FIX and TESTS though UNTESTED
Iain Williamson <iain.williamson@nokia.com>
parents:
3
diff
changeset
|
157 |
if t.result == CheckWhatSmokeTest.FAIL: |
62c28226cde4
Bug 1494 - Trace compiler files not in whatlog - FIX and TESTS though UNTESTED
Iain Williamson <iain.williamson@nokia.com>
parents:
3
diff
changeset
|
158 |
result = CheckWhatSmokeTest.FAIL |
3 | 159 |
failed.append(t.name) |
160 |
||
161 |
t = AntiTargetSmokeTest() |
|
162 |
t.id = "101f" |
|
163 |
t.name = "TC_autorun3" |
|
164 |
# No run - no UID |
|
165 |
t.command = "sbs -b smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf -c armv5.tracecompiler" + \ |
|
166 |
" -p autorun3.mmp CLEAN " + \ |
|
167 |
"&& sbs -b smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf -c armv5.tracecompiler" + \ |
|
168 |
" -p autorun3.mmp" |
|
169 |
t.targets = [ |
|
170 |
"$(EPOCROOT)/epoc32/release/armv5/udeb/test.exe", |
|
171 |
"$(EPOCROOT)/epoc32/release/armv5/urel/test.exe", |
|
172 |
] |
|
173 |
t.addbuildtargets('smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf', [ |
|
174 |
"test_/armv5/udeb/test.o", |
|
175 |
"test_/armv5/urel/test.o", |
|
176 |
]) |
|
177 |
t.addbuildantitargets('smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf', [ |
|
178 |
"test_/tracecompile_autorun3_00000001.done" |
|
179 |
]) |
|
180 |
t.run("windows") |
|
161
62c28226cde4
Bug 1494 - Trace compiler files not in whatlog - FIX and TESTS though UNTESTED
Iain Williamson <iain.williamson@nokia.com>
parents:
3
diff
changeset
|
181 |
if t.result == CheckWhatSmokeTest.FAIL: |
62c28226cde4
Bug 1494 - Trace compiler files not in whatlog - FIX and TESTS though UNTESTED
Iain Williamson <iain.williamson@nokia.com>
parents:
3
diff
changeset
|
182 |
result = CheckWhatSmokeTest.FAIL |
3 | 183 |
failed.append(t.name) |
184 |
||
185 |
# 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". |
|
187 |
t = AntiTargetSmokeTest() |
|
188 |
t.id = "101g" |
|
189 |
t.name = "TC_switch_off" |
|
190 |
t.command = "sbs -b smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf -c armv5.tracecompiler" + \ |
|
191 |
" -p autorun1.mmp CLEAN " + \ |
|
192 |
"&& sbs -b smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf -c armv5 -p autorun1.mmp" |
|
193 |
t.targets = [ |
|
194 |
"$(EPOCROOT)/epoc32/release/armv5/udeb/test.exe", |
|
195 |
"$(EPOCROOT)/epoc32/release/armv5/urel/test.exe", |
|
196 |
] |
|
197 |
t.addbuildtargets('smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf', [ |
|
198 |
"test_/armv5/udeb/test.o", |
|
199 |
"test_/armv5/urel/test.o" |
|
200 |
]) |
|
201 |
t.addbuildantitargets('smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf', [ |
|
202 |
"test_/tracecompile_autorun1_00000001.done" |
|
203 |
]) |
|
204 |
t.run("windows") |
|
161
62c28226cde4
Bug 1494 - Trace compiler files not in whatlog - FIX and TESTS though UNTESTED
Iain Williamson <iain.williamson@nokia.com>
parents:
3
diff
changeset
|
205 |
if t.result == CheckWhatSmokeTest.FAIL: |
62c28226cde4
Bug 1494 - Trace compiler files not in whatlog - FIX and TESTS though UNTESTED
Iain Williamson <iain.williamson@nokia.com>
parents:
3
diff
changeset
|
206 |
result = CheckWhatSmokeTest.FAIL |
3 | 207 |
failed.append(t.name) |
208 |
||
209 |
||
210 |
t.name = "traceccompiler_general" |
|
211 |
t.result = result |
|
212 |
||
213 |
print "\nOverall Result : " + result.upper() + "\n" |
|
161
62c28226cde4
Bug 1494 - Trace compiler files not in whatlog - FIX and TESTS though UNTESTED
Iain Williamson <iain.williamson@nokia.com>
parents:
3
diff
changeset
|
214 |
if result == CheckWhatSmokeTest.FAIL: |
3 | 215 |
print len(failed), "tests failed:" |
216 |
for x in failed: |
|
217 |
print x |
|
218 |
||
219 |
||
220 |
return t |
|
221 |