test: check removing then re-adding capabilities. Make sure output exe has the right caps.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/capability.py Tue Jan 19 18:26:48 2010 +0000
@@ -0,0 +1,70 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+
+from raptor_tests import SmokeTest
+
+def run():
+ t = SmokeTest()
+ t.usebash = True
+ result = SmokeTest.PASS
+
+ 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."""
+ command = "sbs -b smoke_suite/test_resources/simple/capability.inf -c %s -m ${SBSMAKEFILE} -f ${SBSLOGFILE} && " + \
+ "$(EPOCROOT)/epoc32/tools/elf2e32 --dump=s --e32input=$(EPOCROOT)/epoc32/release/armv5/urel/test_capability.exe"
+ targets = [
+ "$(EPOCROOT)/epoc32/release/armv5/urel/test_capability.exe",
+ "$(EPOCROOT)/epoc32/release/armv5/urel/test_capability.exe.map"
+ ]
+ buildtargets = [
+ ]
+ mustmatch = [
+ "\s*Secure ID: 10003a5c$",
+ "\s*Vendor ID: 00000000$",
+ "\s*Capabilities: 00000000 000ffebe$",
+ "\s*CommDD$",
+ "\s*PowerMgmt$",
+ "\s*MultimediaDD$",
+ "\s*ReadDeviceData$",
+ "\s*WriteDeviceData$",
+ "\s*TrustedUI$",
+ "\s*DiskAdmin$",
+ "\s*NetworkControl$",
+ "\s*AllFiles$",
+ "\s*SwEvent$",
+ "\s*NetworkServices$",
+ "\s*LocalServices$",
+ "\s*ReadUserData$",
+ "\s*WriteUserData$",
+ "\s*Location$",
+ "\s*SurroundingsDD$",
+ "\s*UserEnvironment$",
+ "\s*TCB$"
+ ]
+ mustnotmatch = [
+ "DRM"
+ ]
+ warnings = 0
+
+ t.id = "0107"
+ t.name = "capability"
+ t.description = description
+ t.command = command % "arm.v5.urel.gcce4_4_1"
+ t.targets = targets
+ t.mustmatch = mustmatch
+ t.mustnotmatch = mustnotmatch
+ t.warnings = warnings
+ t.run()
+ return t
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/simple/capability.inf Tue Jan 19 18:26:48 2010 +0000
@@ -0,0 +1,22 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+PRJ_PLATFORMS
+ARMV5 ARMV7 WINSCW ARMV5SMP
+
+PRJ_MMPFILES
+capability.mmp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/simple/capability.mmp Tue Jan 19 18:26:48 2010 +0000
@@ -0,0 +1,34 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+TARGET test_capability
+TARGETTYPE EXE
+
+// Test backslash to / here:
+TARGETPATH \sys\bin
+
+UID 0x100039ce 0x00000001
+LIBRARY euser.lib
+SECUREID 0x10003a5c
+SYSTEMINCLUDE /epoc32/include
+SOURCE test.cpp test1.c++ test2.cxx test3.Cpp test4.cc test5.CC test6.C++
+MACRO TEST_MACRO_THAT_DOES_NOTHING
+PAGED
+EPOCCALLDLLENTRYPOINTS
+EPOCSTACKSIZE 8192
+EPOCHEAPSIZE 0x5000 65535
+EPOCPROCESSPRIORITY low
+capability ALL -TCB -ProtServ TCB ProtServ -DRM