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