author | Richard Taylor <richard.i.taylor@nokia.com> |
Fri, 30 Apr 2010 13:26:13 +0100 | |
branch | wip |
changeset 504 | ea75c3a64a17 |
parent 502 | b4aaa46b1beb |
permissions | -rw-r--r-- |
498 | 1 |
# |
2 |
# Copyright (c) 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 |
||
502
b4aaa46b1beb
refactor tools2 for --query
Richard Taylor <richard.i.taylor@nokia.com>
parents:
499
diff
changeset
|
17 |
import raptor_tests |
498 | 18 |
|
19 |
def run(): |
|
20 |
||
502
b4aaa46b1beb
refactor tools2 for --query
Richard Taylor <richard.i.taylor@nokia.com>
parents:
499
diff
changeset
|
21 |
t = raptor_tests.SmokeTest() |
498 | 22 |
t.description = "Test the --query command-line option" |
23 |
||
24 |
t.name = "query_cli_alias" |
|
25 |
t.command = "sbs --query=aliases" |
|
26 |
t.mustmatch_singleline = [ |
|
504
ea75c3a64a17
change to lowercase method names
Richard Taylor <richard.i.taylor@nokia.com>
parents:
502
diff
changeset
|
27 |
"<sbs version='2\.\d+\.\d+'>", |
498 | 28 |
"<alias.*name='armv5_urel'.*/>", |
29 |
"<alias.*name='armv5_udeb'.*/>", |
|
30 |
"<alias.*name='winscw_urel'.*/>", |
|
31 |
"<alias.*name='winscw_udeb'.*/>", |
|
32 |
"<alias.*name='tools2_rel'.*/>", |
|
33 |
"<alias.*name='tools2_deb'.*/>", |
|
34 |
"</sbs>" |
|
35 |
] |
|
36 |
t.mustnotmatch_singleline = [ |
|
37 |
"<alias.*name='make'.*/>", |
|
38 |
"<alias.*name='emake'.*/>" |
|
39 |
] |
|
40 |
t.run() |
|
41 |
||
42 |
t.name = "query_cli_product" |
|
43 |
t.command = "sbs --query=products --configpath=test/smoke_suite/test_resources/bv" |
|
44 |
t.mustmatch_singleline = [ |
|
504
ea75c3a64a17
change to lowercase method names
Richard Taylor <richard.i.taylor@nokia.com>
parents:
502
diff
changeset
|
45 |
"<sbs version='2\.\d+\.\d+'>", |
498 | 46 |
"<product.*name='test_bv_1'.*/>", |
47 |
"<product.*name='test_bv_2'.*/>", |
|
48 |
"<product.*name='test_bv_3'.*/>", |
|
49 |
"</sbs>" |
|
50 |
] |
|
51 |
t.mustnotmatch_singleline = [ |
|
52 |
"<product.*name='arm'.*/>", |
|
53 |
"<product.*name='root'.*/>" |
|
54 |
] |
|
55 |
t.run() |
|
56 |
||
57 |
t.name = "query_cli_config" |
|
58 |
t.command = "sbs --query=config[armv5_urel]" |
|
59 |
t.mustmatch_singleline = [ |
|
504
ea75c3a64a17
change to lowercase method names
Richard Taylor <richard.i.taylor@nokia.com>
parents:
502
diff
changeset
|
60 |
"<sbs version='2\.\d+\.\d+'>", |
498 | 61 |
"fullname='arm\.v5\.urel\.rvct.*'", |
62 |
"outputpath='.*/epoc32/release/armv5/urel'", |
|
63 |
"</sbs>" |
|
64 |
] |
|
65 |
t.mustnotmatch_singleline = [] |
|
66 |
t.run() |
|
67 |
||
499
cad3b96a4fb1
refactoring for --query
Richard Taylor <richard.i.taylor@nokia.com>
parents:
498
diff
changeset
|
68 |
t.name = "query_cli_config_bv" |
cad3b96a4fb1
refactoring for --query
Richard Taylor <richard.i.taylor@nokia.com>
parents:
498
diff
changeset
|
69 |
t.command = "sbs --query=config[armv5_urel.test_bv_1] --configpath=test/smoke_suite/test_resources/bv" |
cad3b96a4fb1
refactoring for --query
Richard Taylor <richard.i.taylor@nokia.com>
parents:
498
diff
changeset
|
70 |
t.mustmatch_singleline = [ |
504
ea75c3a64a17
change to lowercase method names
Richard Taylor <richard.i.taylor@nokia.com>
parents:
502
diff
changeset
|
71 |
"<sbs version='2\.\d+\.\d+'>", |
499
cad3b96a4fb1
refactoring for --query
Richard Taylor <richard.i.taylor@nokia.com>
parents:
498
diff
changeset
|
72 |
"fullname='arm\.v5\.urel\.rvct._.\.test_bv_1'", |
504
ea75c3a64a17
change to lowercase method names
Richard Taylor <richard.i.taylor@nokia.com>
parents:
502
diff
changeset
|
73 |
"outputpath='.*/epoc32/release/armv5\.one/urel'", |
499
cad3b96a4fb1
refactoring for --query
Richard Taylor <richard.i.taylor@nokia.com>
parents:
498
diff
changeset
|
74 |
"</sbs>" |
cad3b96a4fb1
refactoring for --query
Richard Taylor <richard.i.taylor@nokia.com>
parents:
498
diff
changeset
|
75 |
] |
cad3b96a4fb1
refactoring for --query
Richard Taylor <richard.i.taylor@nokia.com>
parents:
498
diff
changeset
|
76 |
t.mustnotmatch_singleline = [] |
cad3b96a4fb1
refactoring for --query
Richard Taylor <richard.i.taylor@nokia.com>
parents:
498
diff
changeset
|
77 |
t.run() |
cad3b96a4fb1
refactoring for --query
Richard Taylor <richard.i.taylor@nokia.com>
parents:
498
diff
changeset
|
78 |
|
cad3b96a4fb1
refactoring for --query
Richard Taylor <richard.i.taylor@nokia.com>
parents:
498
diff
changeset
|
79 |
t.name = "query_cli_config_others" |
cad3b96a4fb1
refactoring for --query
Richard Taylor <richard.i.taylor@nokia.com>
parents:
498
diff
changeset
|
80 |
t.command = "sbs --query=config[winscw_urel] --query=config[tools2_rel]" |
502
b4aaa46b1beb
refactor tools2 for --query
Richard Taylor <richard.i.taylor@nokia.com>
parents:
499
diff
changeset
|
81 |
|
b4aaa46b1beb
refactor tools2 for --query
Richard Taylor <richard.i.taylor@nokia.com>
parents:
499
diff
changeset
|
82 |
if t.onWindows: |
b4aaa46b1beb
refactor tools2 for --query
Richard Taylor <richard.i.taylor@nokia.com>
parents:
499
diff
changeset
|
83 |
t2 = "tools2" |
b4aaa46b1beb
refactor tools2 for --query
Richard Taylor <richard.i.taylor@nokia.com>
parents:
499
diff
changeset
|
84 |
else: |
b4aaa46b1beb
refactor tools2 for --query
Richard Taylor <richard.i.taylor@nokia.com>
parents:
499
diff
changeset
|
85 |
t2 = raptor_tests.ReplaceEnvs("tools2/$(HOSTPLATFORM_DIR)") |
b4aaa46b1beb
refactor tools2 for --query
Richard Taylor <richard.i.taylor@nokia.com>
parents:
499
diff
changeset
|
86 |
|
499
cad3b96a4fb1
refactoring for --query
Richard Taylor <richard.i.taylor@nokia.com>
parents:
498
diff
changeset
|
87 |
t.mustmatch_singleline = [ |
504
ea75c3a64a17
change to lowercase method names
Richard Taylor <richard.i.taylor@nokia.com>
parents:
502
diff
changeset
|
88 |
"<sbs version='2\.\d+\.\d+'>", |
499
cad3b96a4fb1
refactoring for --query
Richard Taylor <richard.i.taylor@nokia.com>
parents:
498
diff
changeset
|
89 |
"outputpath='.*/epoc32/release/winscw/urel'", |
502
b4aaa46b1beb
refactor tools2 for --query
Richard Taylor <richard.i.taylor@nokia.com>
parents:
499
diff
changeset
|
90 |
"outputpath='.*/epoc32/release/%s/rel'" % t2, |
499
cad3b96a4fb1
refactoring for --query
Richard Taylor <richard.i.taylor@nokia.com>
parents:
498
diff
changeset
|
91 |
"</sbs>" |
cad3b96a4fb1
refactoring for --query
Richard Taylor <richard.i.taylor@nokia.com>
parents:
498
diff
changeset
|
92 |
] |
cad3b96a4fb1
refactoring for --query
Richard Taylor <richard.i.taylor@nokia.com>
parents:
498
diff
changeset
|
93 |
t.mustnotmatch_singleline = [] |
cad3b96a4fb1
refactoring for --query
Richard Taylor <richard.i.taylor@nokia.com>
parents:
498
diff
changeset
|
94 |
t.run() |
cad3b96a4fb1
refactoring for --query
Richard Taylor <richard.i.taylor@nokia.com>
parents:
498
diff
changeset
|
95 |
|
498 | 96 |
t.name = "query_cli_bad" |
97 |
t.command = "sbs --query=nonsense" |
|
98 |
t.mustmatch_singleline = [ |
|
504
ea75c3a64a17
change to lowercase method names
Richard Taylor <richard.i.taylor@nokia.com>
parents:
502
diff
changeset
|
99 |
"<sbs version='2\.\d+\.\d+'>", |
498 | 100 |
"exception 'unknown query' with query 'nonsense'", |
101 |
"</sbs>" |
|
102 |
] |
|
103 |
t.mustnotmatch_singleline = [] |
|
104 |
t.errors = 1 |
|
105 |
t.returncode = 1 |
|
106 |
t.run() |
|
107 |
||
108 |
t.name = "query_cli" |
|
109 |
t.print_result() |
|
110 |
return t |