sbsv2/raptor/test/smoke_suite/capability_arm.py
author timothy.murphy@nokia.com
Wed, 20 Jan 2010 17:45:18 +0000
branchwip
changeset 150 62d9f099315d
parent 147 sbsv2/raptor/test/smoke_suite/capability.py@bbe5275eca96
permissions -rw-r--r--
cleanups from reviews.
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
#
150
62d9f099315d cleanups from reviews.
timothy.murphy@nokia.com
parents: 147
diff changeset
     2
# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
145
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
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
    24
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
	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
    26
		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
    27
	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
    28
		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
    29
145
d3f40ec27032 test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff changeset
    30
	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
    31
	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
    32
			  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
    33
	targets = [
d3f40ec27032 test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff changeset
    34
		"$(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
    35
		"$(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
    36
		]	
d3f40ec27032 test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff changeset
    37
	buildtargets = [
d3f40ec27032 test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff changeset
    38
		]
d3f40ec27032 test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff changeset
    39
	mustmatch = [
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*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
    41
		"\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
    42
		"\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
    43
		"\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
    44
		"\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
    45
		"\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
    46
		"\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
    47
		"\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
    48
		"\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
    49
		"\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
    50
		"\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
    51
		"\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
    52
		"\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
    53
		"\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
    54
		"\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
    55
		"\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
    56
		"\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
    57
		"\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
    58
		"\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
    59
		"\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
    60
		"\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
    61
	]
d3f40ec27032 test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff changeset
    62
	mustnotmatch = [
d3f40ec27032 test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff changeset
    63
		"DRM"
d3f40ec27032 test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff changeset
    64
	]
d3f40ec27032 test: check removing then re-adding capabilities. Make sure output exe has the right caps.
timothy.murphy@nokia.com
parents:
diff changeset
    65
	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
    66
	
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.id = "0107"
150
62d9f099315d cleanups from reviews.
timothy.murphy@nokia.com
parents: 147
diff changeset
    68
	t.name = "capability_arm"
145
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.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
    70
	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
    71
	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
    72
	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
    73
	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
    74
	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
    75
	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
    76
	return t