author | timothy.murphy@nokia.com |
Wed, 20 Jan 2010 00:12:00 +0000 | |
branch | wip |
changeset 151 | d4605037b3b2 |
parent 147 | bbe5275eca96 |
permissions | -rw-r--r-- |
145
d3f40ec27032
test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff
changeset
|
1 |
# |
d3f40ec27032
test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff
changeset
|
2 |
# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
d3f40ec27032
test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff
changeset
|
3 |
# All rights reserved. |
d3f40ec27032
test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff
changeset
|
4 |
# This component and the accompanying materials are made available |
d3f40ec27032
test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff
changeset
|
5 |
# under the terms of the License "Eclipse Public License v1.0" |
d3f40ec27032
test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff
changeset
|
6 |
# which accompanies this distribution, and is available |
d3f40ec27032
test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff
changeset
|
7 |
# at the URL "http://www.eclipse.org/legal/epl-v10.html". |
d3f40ec27032
test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff
changeset
|
8 |
# |
d3f40ec27032
test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff
changeset
|
9 |
# Initial Contributors: |
d3f40ec27032
test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff
changeset
|
10 |
# Nokia Corporation - initial contribution. |
d3f40ec27032
test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff
changeset
|
11 |
# |
d3f40ec27032
test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff
changeset
|
12 |
# Contributors: |
d3f40ec27032
test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff
changeset
|
13 |
# |
d3f40ec27032
test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff
changeset
|
14 |
# Description: |
d3f40ec27032
test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff
changeset
|
15 |
# |
d3f40ec27032
test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff
changeset
|
16 |
|
d3f40ec27032
test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff
changeset
|
17 |
from raptor_tests import SmokeTest |
147
bbe5275eca96
fix bug 1570: actually *use* the capabilities and fix test for windows and for capability flags.
timothy.murphy@nokia.com
parents:
145
diff
changeset
|
18 |
import sys |
145
d3f40ec27032
test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff
changeset
|
19 |
|
d3f40ec27032
test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff
changeset
|
20 |
def run(): |
d3f40ec27032
test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff
changeset
|
21 |
t = SmokeTest() |
d3f40ec27032
test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff
changeset
|
22 |
t.usebash = True |
d3f40ec27032
test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff
changeset
|
23 |
result = SmokeTest.PASS |
d3f40ec27032
test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff
changeset
|
24 |
|
147
bbe5275eca96
fix bug 1570: actually *use* the capabilities and fix test for windows and for capability flags.
timothy.murphy@nokia.com
parents:
145
diff
changeset
|
25 |
|
bbe5275eca96
fix bug 1570: actually *use* the capabilities and fix test for windows and for capability flags.
timothy.murphy@nokia.com
parents:
145
diff
changeset
|
26 |
if sys.platform.startswith("win"): |
bbe5275eca96
fix bug 1570: actually *use* the capabilities and fix test for windows and for capability flags.
timothy.murphy@nokia.com
parents:
145
diff
changeset
|
27 |
elf2e32 = "$(EPOCROOT)/epoc32/tools/elf2e32.exe" |
bbe5275eca96
fix bug 1570: actually *use* the capabilities and fix test for windows and for capability flags.
timothy.murphy@nokia.com
parents:
145
diff
changeset
|
28 |
else: |
bbe5275eca96
fix bug 1570: actually *use* the capabilities and fix test for windows and for capability flags.
timothy.murphy@nokia.com
parents:
145
diff
changeset
|
29 |
elf2e32 = "$(EPOCROOT)/epoc32/tools/elf2e32" |
bbe5275eca96
fix bug 1570: actually *use* the capabilities and fix test for windows and for capability flags.
timothy.murphy@nokia.com
parents:
145
diff
changeset
|
30 |
|
145
d3f40ec27032
test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff
changeset
|
31 |
description = """This test attempts to check that an exe gets the capabilities that we requested. It's ARM specific since it uses elf2e32. Tries to demonstrate capabilties being turned off then on in the mmp.""" |
d3f40ec27032
test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff
changeset
|
32 |
command = "sbs -b smoke_suite/test_resources/simple/capability.inf -c %s -m ${SBSMAKEFILE} -f ${SBSLOGFILE} && " + \ |
147
bbe5275eca96
fix bug 1570: actually *use* the capabilities and fix test for windows and for capability flags.
timothy.murphy@nokia.com
parents:
145
diff
changeset
|
33 |
elf2e32 + " --dump=s --e32input=$(EPOCROOT)/epoc32/release/armv5/urel/test_capability.exe" |
145
d3f40ec27032
test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff
changeset
|
34 |
targets = [ |
d3f40ec27032
test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff
changeset
|
35 |
"$(EPOCROOT)/epoc32/release/armv5/urel/test_capability.exe", |
d3f40ec27032
test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff
changeset
|
36 |
"$(EPOCROOT)/epoc32/release/armv5/urel/test_capability.exe.map" |
d3f40ec27032
test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff
changeset
|
37 |
] |
d3f40ec27032
test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff
changeset
|
38 |
buildtargets = [ |
d3f40ec27032
test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff
changeset
|
39 |
] |
d3f40ec27032
test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff
changeset
|
40 |
mustmatch = [ |
d3f40ec27032
test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff
changeset
|
41 |
"\s*Secure ID: 10003a5c$", |
d3f40ec27032
test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff
changeset
|
42 |
"\s*Vendor ID: 00000000$", |
147
bbe5275eca96
fix bug 1570: actually *use* the capabilities and fix test for windows and for capability flags.
timothy.murphy@nokia.com
parents:
145
diff
changeset
|
43 |
"\s*Capabilities: 00000000 000fffbf$", |
145
d3f40ec27032
test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff
changeset
|
44 |
"\s*CommDD$", |
d3f40ec27032
test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff
changeset
|
45 |
"\s*PowerMgmt$", |
d3f40ec27032
test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff
changeset
|
46 |
"\s*MultimediaDD$", |
d3f40ec27032
test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff
changeset
|
47 |
"\s*ReadDeviceData$", |
d3f40ec27032
test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff
changeset
|
48 |
"\s*WriteDeviceData$", |
d3f40ec27032
test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff
changeset
|
49 |
"\s*TrustedUI$", |
d3f40ec27032
test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff
changeset
|
50 |
"\s*DiskAdmin$", |
d3f40ec27032
test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff
changeset
|
51 |
"\s*NetworkControl$", |
d3f40ec27032
test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff
changeset
|
52 |
"\s*AllFiles$", |
d3f40ec27032
test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff
changeset
|
53 |
"\s*SwEvent$", |
d3f40ec27032
test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff
changeset
|
54 |
"\s*NetworkServices$", |
d3f40ec27032
test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff
changeset
|
55 |
"\s*LocalServices$", |
d3f40ec27032
test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff
changeset
|
56 |
"\s*ReadUserData$", |
d3f40ec27032
test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff
changeset
|
57 |
"\s*WriteUserData$", |
d3f40ec27032
test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff
changeset
|
58 |
"\s*Location$", |
d3f40ec27032
test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff
changeset
|
59 |
"\s*SurroundingsDD$", |
d3f40ec27032
test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff
changeset
|
60 |
"\s*UserEnvironment$", |
d3f40ec27032
test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff
changeset
|
61 |
"\s*TCB$" |
d3f40ec27032
test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff
changeset
|
62 |
] |
d3f40ec27032
test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff
changeset
|
63 |
mustnotmatch = [ |
d3f40ec27032
test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff
changeset
|
64 |
"DRM" |
d3f40ec27032
test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff
changeset
|
65 |
] |
d3f40ec27032
test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff
changeset
|
66 |
warnings = 0 |
d3f40ec27032
test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff
changeset
|
67 |
|
d3f40ec27032
test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff
changeset
|
68 |
t.id = "0107" |
d3f40ec27032
test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff
changeset
|
69 |
t.name = "capability" |
d3f40ec27032
test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff
changeset
|
70 |
t.description = description |
d3f40ec27032
test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff
changeset
|
71 |
t.command = command % "arm.v5.urel.gcce4_4_1" |
d3f40ec27032
test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff
changeset
|
72 |
t.targets = targets |
d3f40ec27032
test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff
changeset
|
73 |
t.mustmatch = mustmatch |
d3f40ec27032
test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff
changeset
|
74 |
t.mustnotmatch = mustnotmatch |
d3f40ec27032
test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff
changeset
|
75 |
t.warnings = warnings |
d3f40ec27032
test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff
changeset
|
76 |
t.run() |
d3f40ec27032
test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff
changeset
|
77 |
return t |