sbsv2/raptor/test/smoke_suite/capability.py
author timothy.murphy@nokia.com
Tue, 19 Jan 2010 19:12:34 +0000
branchwip
changeset 146 43570e9211f9
parent 145 d3f40ec27032
child 147 bbe5275eca96
permissions -rw-r--r--
Merge test + fix for bug 1570
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
d3f40ec27032 test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff changeset
    18
d3f40ec27032 test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff changeset
    19
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
    20
	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
    21
	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
    22
	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
    23
d3f40ec27032 test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff changeset
    24
	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
    25
	command = "sbs -b smoke_suite/test_resources/simple/capability.inf -c %s -m ${SBSMAKEFILE} -f ${SBSLOGFILE} && " + \
d3f40ec27032 test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff changeset
    26
			"$(EPOCROOT)/epoc32/tools/elf2e32   --dump=s  --e32input=$(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
    27
	targets = [
d3f40ec27032 test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff changeset
    28
		"$(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
    29
		"$(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
    30
		]	
d3f40ec27032 test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff changeset
    31
	buildtargets = [
d3f40ec27032 test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff changeset
    32
		]
d3f40ec27032 test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff changeset
    33
	mustmatch = [
d3f40ec27032 test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff changeset
    34
		"\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
    35
		"\s*Vendor ID: 00000000$",
d3f40ec27032 test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff changeset
    36
		"\s*Capabilities: 00000000 000ffebe$",
d3f40ec27032 test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff changeset
    37
		"\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
    38
		"\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
    39
		"\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
    40
		"\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
    41
		"\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
    42
		"\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
    43
		"\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
    44
		"\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
    45
		"\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
    46
		"\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
    47
		"\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
    48
		"\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
    49
		"\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
    50
		"\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
    51
		"\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
    52
		"\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
    53
		"\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
    54
		"\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
    55
	]
d3f40ec27032 test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff changeset
    56
	mustnotmatch = [
d3f40ec27032 test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff changeset
    57
		"DRM"
d3f40ec27032 test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff changeset
    58
	]
d3f40ec27032 test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff changeset
    59
	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
    60
	
d3f40ec27032 test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff changeset
    61
	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
    62
	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
    63
	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
    64
	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
    65
	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
    66
	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
    67
	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
    68
	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
    69
	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
    70
	return t