3
|
1 |
#
|
|
2 |
# Copyright (c) 2009 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 GenericSmokeTest
|
|
18 |
|
|
19 |
def run():
|
|
20 |
result = GenericSmokeTest.PASS
|
|
21 |
|
|
22 |
t = GenericSmokeTest()
|
|
23 |
t.id = "0072a"
|
|
24 |
t.name = "filter_missing"
|
|
25 |
t.command = "sbs --filters=NonExistingFilter"
|
|
26 |
t.mustmatch = [
|
|
27 |
".*requested filters not found.*NonExistingFilter.*"
|
|
28 |
]
|
|
29 |
t.errors = 1
|
|
30 |
t.returncode = 1
|
|
31 |
t.run()
|
|
32 |
if t.result == GenericSmokeTest.FAIL:
|
|
33 |
result = GenericSmokeTest.FAIL
|
|
34 |
|
|
35 |
t.id = "0072b"
|
|
36 |
t.name = "filter_crashes"
|
|
37 |
t.usebash = True
|
|
38 |
t.command = "cp -f smoke_suite/test_resources/filter_test/testfilter_exceptions.py " \
|
|
39 |
+ "$SBS_HOME/python/plugins ; " \
|
|
40 |
+ "sbs -n --filters=FilterTestCrash,FilterLogFile,FilterTerminal " \
|
|
41 |
+ "-b smoke_suite/test_resources/simple/bld.inf " \
|
|
42 |
+ "-m ${SBSMAKEFILE} -f ${SBSLOGFILE} ; " \
|
|
43 |
+ "rm -f $SBS_HOME/python/plugins/testfilter_exceptions.py"
|
|
44 |
t.errors = 0
|
|
45 |
t.returncode = 0
|
|
46 |
t.exceptions = 1
|
|
47 |
t.mustmatch = [
|
|
48 |
".*A test exception in a filter was generated.*",
|
|
49 |
".*sbs: build log in.*"
|
|
50 |
]
|
|
51 |
|
|
52 |
t.run()
|
|
53 |
if t.result == GenericSmokeTest.FAIL:
|
|
54 |
result = GenericSmokeTest.FAIL
|
|
55 |
|
|
56 |
t.id = "72"
|
|
57 |
t.name = "filter_missing"
|
|
58 |
t.result = result
|
|
59 |
t.print_result()
|
|
60 |
return t
|