--- a/sbsv2/raptor/python/raptor_meta.py Tue Mar 16 17:04:08 2010 +0000
+++ b/sbsv2/raptor/python/raptor_meta.py Thu Mar 18 14:31:08 2010 +0000
@@ -1335,6 +1335,7 @@
self.BuildVariant.AddOperation(raptor_data.Set("PAGEDCODE_OPTION", "unpaged"))
self.__debug( "Set switch " + varname + " ON")
self.__pageConflict.append(varname)
+
elif varname == 'UNPAGEDDATA':
self.BuildVariant.AddOperation(raptor_data.Set("PAGEDDATA_OPTION", "unpaged"))
self.__debug( "Set switch " + varname + " ON")
@@ -1343,6 +1344,7 @@
elif varname == 'NOLINKTIMECODEGENERATION':
self.BuildVariant.AddOperation(raptor_data.Set("LTCG",""))
self.__debug( "Set switch " + varname + " OFF")
+
elif varname == 'NOMULTIFILECOMPILATION':
self.BuildVariant.AddOperation(raptor_data.Set("MULTIFILE_ENABLED",""))
self.__debug( "Set switch " + varname + " OFF")
@@ -1352,21 +1354,19 @@
self.__debuggable = "udeb urel"
else:
self.__Raptor.Warn("DEBUGGABLE keyword ignored as DEBUGGABLE_UDEBONLY is already specified")
+
elif varname == 'DEBUGGABLE_UDEBONLY':
if self.__debuggable != "":
self.__Raptor.Warn("DEBUGGABLE keyword has no effect as DEBUGGABLE or DEBUGGABLE_UDEBONLY is already set")
self.__debuggable = "udeb"
+
elif varname == 'FEATUREVARIANT':
self.BuildVariant.AddOperation(raptor_data.Set(varname,"1"))
self.featureVariant = True
+
elif varname in ['COMPRESSTARGET', 'NOCOMPRESSTARGET', 'INFLATECOMPRESSTARGET', 'BYTEPAIRCOMPRESSTARGET']:
- if self.__compressionKeyword:
- self.__Raptor.Warn("%s keyword in %s overrides earlier use of %s" % (varname, self.__currentMmpFile, self.__compressionKeyword))
- self.BuildVariant.AddOperation(raptor_data.Set(self.__compressionKeyword,""))
- self.__debug( "Set switch " + varname + " OFF")
- self.BuildVariant.AddOperation(raptor_data.Set(varname,"1"))
- self.__debug( "Set switch " + varname + " ON")
- self.__compressionKeyword = varname
+ self.resolveCompressionKeyword(varname)
+
else:
self.__debug( "Set switch "+toks[0]+" ON")
self.BuildVariant.AddOperation(raptor_data.Set(prefix+varname, "1"))
@@ -2247,12 +2247,21 @@
for x in self.__pageConflict:
if x == "PAGEDCODE" or x == "UNPAGEDCODE":
self.__Raptor.Warn("Both PAGEDCODE and UNPAGEDCODE are specified. The last one %s will take effect" % x)
+ if x == "PAGEDCODE":
+ self.resolveCompressionKeyword("BYTEPAIRCOMPRESSTARGET")
break
+ elif "PAGEDCODE" in self.__pageConflict:
+ self.resolveCompressionKeyword("BYTEPAIRCOMPRESSTARGET")
+
if "PAGEDDATA" in self.__pageConflict and "UNPAGEDDATA" in self.__pageConflict:
for x in self.__pageConflict:
if x == "PAGEDDATA" or x == "UNPAGEDDATA":
self.__Raptor.Warn("Both PAGEDDATA and UNPAGEDDATA are specified. The last one %s will take effect" % x)
+ if x == "PAGEDDATA":
+ self.resolveCompressionKeyword("BYTEPAIRCOMPRESSTARGET")
break
+ elif "PAGEDDATA" in self.__pageConflict:
+ self.resolveCompressionKeyword("BYTEPAIRCOMPRESSTARGET")
# Set Debuggable
self.BuildVariant.AddOperation(raptor_data.Set("DEBUGGABLE", self.__debuggable))
@@ -2271,6 +2280,19 @@
"""Target type in lower case - the standard format"""
return self.__targettype.lower()
+ def resolveCompressionKeyword(self, aCompressionKeyword):
+ """If a compression keyword is set more than once either explicitly
+ or implicitly a warning is given and the last one takes effect
+ """
+ if self.__compressionKeyword and self.__compressionKeyword != aCompressionKeyword:
+ self.__Raptor.Warn("%s keyword in %s overrides earlier use of %s" % \
+ (aCompressionKeyword, self.__currentMmpFile, self.__compressionKeyword))
+ self.BuildVariant.AddOperation(raptor_data.Set(self.__compressionKeyword, ""))
+ self.__debug( "Set switch " + self.__compressionKeyword + " OFF")
+ self.BuildVariant.AddOperation(raptor_data.Set(aCompressionKeyword,"1"))
+ self.__debug( "Set switch " + aCompressionKeyword + " ON")
+ self.__compressionKeyword = aCompressionKeyword
+
def checkImplibDefFile(self, defFile):
"""Project with target type implib must have DEFFILE defined
explicitly or implicitly, otherwise it is an error
--- a/sbsv2/raptor/test/smoke_suite/paging.py Tue Mar 16 17:04:08 2010 +0000
+++ b/sbsv2/raptor/test/smoke_suite/paging.py Thu Mar 18 14:31:08 2010 +0000
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# Copyright (c) 2009-2010 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"
@@ -24,61 +24,83 @@
cmd_prefix = "sbs -b smoke_suite/test_resources/simple_paging/bld.inf -c armv5_urel "
cmd_suffix = " -m ${SBSMAKEFILE} -f ${SBSLOGFILE} && cat ${SBSLOGFILE} "
- result = SmokeTest.PASS
-
t.id = "0093a"
t.name = "paging_default"
t.command = cmd_prefix + "-p default.mmp" + cmd_suffix
- t.mustmatch = [".*--codepaging=default.*", ".*--datapaging=default.*"]
- t.run("windows") # Windows-only until we've updated the Linux version of elf2e32.
+ t.mustmatch_singleline = [
+ ".*--codepaging=default.*",
+ ".*--datapaging=default.*"
+ ]
+ t.run("windows") # Windows-only until we've updated the Linux version of elf2e32.
if t.result == "skip":
return t
- if t.result == SmokeTest.FAIL:
- result = SmokeTest.FAIL
t.id = "0093b"
t.name = "paging_unpaged"
t.command = cmd_prefix + "-p unpaged.mmp" + cmd_suffix
- t.mustmatch = [".*--codepaging=unpaged.*", ".*--datapaging=unpaged.*"]
+ t.mustmatch_singleline = [
+ ".*--codepaging=unpaged.*",
+ ".*--datapaging=unpaged.*"
+ ]
t.run()
- if t.result == SmokeTest.FAIL:
- result = SmokeTest.FAIL
t.id = "0093c"
t.name = "paging_paged"
t.command = cmd_prefix + "-p paged.mmp" + cmd_suffix
- t.mustmatch = [".*--codepaging=paged.*", ".*--datapaging=paged.*"]
+ # Either pagedcode or pageddata can imply bytepaircompresstarget
+ t.mustmatch_singleline = [
+ ".*--codepaging=paged.*",
+ ".*--datapaging=paged.*",
+ ".*--compressionmethod=bytepair.*"
+ ]
t.run()
- if t.result == SmokeTest.FAIL:
- result = SmokeTest.FAIL
t.id = "0093d"
t.name = "paging_unpagedcode_pageddata"
t.command = cmd_prefix + "-p unpagedcode_pageddata.mmp" + cmd_suffix
- t.mustmatch = [".*--codepaging=unpaged.*", ".*--datapaging=paged.*"]
+ t.mustmatch_singleline = [
+ ".*--codepaging=unpaged.*",
+ ".*--datapaging=paged.*",
+ ".*--compressionmethod=bytepair.*"
+ ]
t.run()
- if t.result == SmokeTest.FAIL:
- result = SmokeTest.FAIL
t.id = "0093e"
t.name = "paging_pagedcode_unpageddata"
t.command = cmd_prefix + "-p pagedcode_unpageddata.mmp" + cmd_suffix
- t.mustmatch = [".*--codepaging=paged.*", ".*--datapaging=unpaged.*"]
+ t.mustmatch_singleline = [
+ ".*--codepaging=paged.*",
+ ".*--datapaging=unpaged.*",
+ ".*--compressionmethod=bytepair.*"
+ ]
t.run()
- if t.result == SmokeTest.FAIL:
- result = SmokeTest.FAIL
t.id = "0093f"
t.name = "paging_pagedcode_defaultdata"
t.command = cmd_prefix + "-p pagedcode_defaultdata.mmp" + cmd_suffix
- t.mustmatch = [".*--codepaging=paged.*", ".*--datapaging=default.*"]
+ t.mustmatch_singleline = [
+ ".*--codepaging=paged.*",
+ ".*--datapaging=default.*",
+ ".*--compressionmethod=bytepair.*"
+ ]
t.run()
- if t.result == SmokeTest.FAIL:
- result = SmokeTest.FAIL
+
+ t.id = "0093g"
+ t.name = "paging_paged_unpaged_no_bytepair"
+ t.command = cmd_prefix + "-p paged_unpaged.mmp" + cmd_suffix
+ t.mustmatch_singleline = [
+ ".*--codepaging=unpaged.*",
+ ".*--datapaging=unpaged.*"
+ ]
+ t.mustnotmatch = [
+ ".*--compressionmethod=bytepair.*"
+ ]
+ t.warnings = 4 # 2 in log 2 on screen
+ t.run()
+
t.id = "0093"
t.name = "paging"
- t.result = result
t.print_result()
return t
--- a/sbsv2/raptor/test/smoke_suite/test_resources/simple_paging/bld.inf Tue Mar 16 17:04:08 2010 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/simple_paging/bld.inf Thu Mar 18 14:31:08 2010 +0000
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009-2010 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"
@@ -18,14 +18,17 @@
PRJ_PLATFORMS
- ARMV5
+ARMV5
PRJ_MMPFILES
- default.mmp
- unpaged.mmp
- paged.mmp
+default.mmp
+unpaged.mmp
+paged.mmp
- unpagedcode_pageddata.mmp
- pagedcode_unpageddata.mmp
- pagedcode_defaultdata.mmp
+unpagedcode_pageddata.mmp
+pagedcode_unpageddata.mmp
+pagedcode_defaultdata.mmp
+
+paged_unpaged.mmp
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/simple_paging/paged_unpaged.mmp Thu Mar 18 14:31:08 2010 +0000
@@ -0,0 +1,34 @@
+/*
+* Copyright (c) 2000-2010 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:
+* In this example "bytepaircompresstarget" should not by implied as
+* keyword "unpaged" cancels "paged".
+*/
+
+
+TARGET paged_unpaged.dll
+TARGETTYPE dll
+
+UID 0xE800004C
+CAPABILITY All -TCB
+
+VENDORID 0x70000001
+
+SOURCE a.cpp
+
+LIBRARY euser.lib
+
+PAGED
+UNPAGED
+