602
|
1 |
#
|
|
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
|
|
18 |
import generic_path
|
|
19 |
import os
|
|
20 |
|
|
21 |
def run():
|
|
22 |
t = SmokeTest()
|
|
23 |
t.usebash = True
|
|
24 |
result = SmokeTest.PASS
|
|
25 |
|
|
26 |
abs_epocroot = os.path.abspath(os.environ["EPOCROOT"])
|
|
27 |
cwd = os.getcwd().replace("\\","/")
|
|
28 |
|
|
29 |
relative_epocroot = os.path.relpath(abs_epocroot.replace("\\","/"),cwd)
|
|
30 |
|
|
31 |
|
|
32 |
description = """This tests the whatcomp filter. As a byproduct it uses (and thus smoke-tests) sbs_filter.py"""
|
|
33 |
command = "sbs -b smoke_suite/test_resources/simple/bld.inf -c %s -m ${SBSMAKEFILE} -f ${SBSLOGFILE} what && " + \
|
|
34 |
"EPOCROOT='%s' sbs_filter --filters FilterWhatComp < ${SBSLOGFILE} &&" % relative_epocroot + \
|
|
35 |
"EPOCROOT='%s' sbs_filter --filters FilterWhatComp < ${SBSLOGFILE}" % abs_epocroot
|
|
36 |
targets = [
|
|
37 |
]
|
|
38 |
buildtargets = [
|
|
39 |
]
|
|
40 |
|
|
41 |
mustmatch_pre = [
|
|
42 |
"-- abld -w",
|
|
43 |
".*Chdir .*/smoke_suite/test_resources/simple.*",
|
|
44 |
relative_epocroot + "/epoc32/release/armv5/urel/test.exe",
|
|
45 |
relative_epocroot + "/epoc32/release/armv5/urel/test.exe.map",
|
|
46 |
abs_epocroot + "/epoc32/release/armv5/urel/test.exe",
|
|
47 |
abs_epocroot + "/epoc32/release/armv5/urel/test.exe.map",
|
|
48 |
]
|
|
49 |
|
|
50 |
if os.sep == '\\':
|
|
51 |
mustmatch = [ i.replace("\\", "\\\\" ).replace("/","\\\\") for i in mustmatch_pre ]
|
|
52 |
else:
|
|
53 |
mustmatch = mustmatch_pre
|
|
54 |
|
|
55 |
mustnotmatch = [
|
|
56 |
"error: no (CHECK|WHAT) information found"
|
|
57 |
]
|
|
58 |
warnings = 0
|
|
59 |
|
|
60 |
t.id = "0106a"
|
|
61 |
t.name = "whatcomp_basic"
|
|
62 |
t.description = description
|
|
63 |
t.command = command % "arm.v5.urel.gcce4_4_1"
|
|
64 |
t.targets = targets
|
|
65 |
t.mustmatch = mustmatch
|
|
66 |
t.mustnotmatch = mustnotmatch
|
|
67 |
t.warnings = warnings
|
|
68 |
t.run()
|
|
69 |
|
|
70 |
t.id = "0106b"
|
|
71 |
t.name = "whatcomp_component_repeated"
|
|
72 |
t.description = """
|
|
73 |
It is possible for what information about a component to not be grouped
|
|
74 |
(i.e. for multiple whatlogs tags relating to a single component to be
|
|
75 |
interspersed with whatlog tags relating to other components).
|
|
76 |
Raptor must cope with that and must *not* report missing files under
|
|
77 |
the wrong component name."""
|
|
78 |
t.command = "sbs_filter --filters=FilterWhatComp < smoke_suite/test_resources/logexamples/what_component_repeated.log"
|
|
79 |
t.targets = []
|
|
80 |
t.mustmatch = []
|
|
81 |
t.mustmatch_multiline = [
|
|
82 |
"Chdir y:.ext.app.emailwizard.*epoc32.data.something.*"+
|
|
83 |
"Chdir y:.sf.mw.gsprofilesrv.ftuwizardmodel.*epoc32.release.armv5.something.*"+
|
|
84 |
"Chdir y:.ext.app.emailwizard.*epoc32.data.something_else"
|
|
85 |
]
|
|
86 |
|
|
87 |
t.mustnotmatch = []
|
|
88 |
t.warnings = 0
|
|
89 |
t.run()
|
|
90 |
|
|
91 |
t.id = "0106"
|
|
92 |
t.name = "whatcomp"
|
|
93 |
t.print_result()
|
|
94 |
return t
|