# HG changeset patch
# User Jon Chatten
# Date 1269971258 -3600
# Node ID f73eee123484b323bea9eda98b20f06b3ad196a8
# Parent 824dddcc66f70cf3a6edc2224b9dd725d8683bab# Parent 7db5250b5d4c4f57c7ccff5e275fc3d2c77336a6
merge from fix
diff -r 824dddcc66f7 -r f73eee123484 sbsv2/raptor/RELEASE-NOTES.html
--- a/sbsv2/raptor/RELEASE-NOTES.html Mon Mar 29 08:28:16 2010 +0100
+++ b/sbsv2/raptor/RELEASE-NOTES.html Tue Mar 30 18:47:38 2010 +0100
@@ -31,6 +31,8 @@
Fix: remove unnecessary empty lines in log output in copylogfromannofile mode
SF Bug 1939 - [Raptor] PAGED keyword in MMP files should imply byte pair compressed
DPDEF144648 - Raptor failed to build tools_deb objects under Windows XP
+ SF Bug 2134 - [Raptor] Raptor does not pass overridden make variables into its makefiles
+ Fix : do not allow data to be paged implicitly
diff -r 824dddcc66f7 -r f73eee123484 sbsv2/raptor/python/plugins/filter_terminal.py
--- a/sbsv2/raptor/python/plugins/filter_terminal.py Mon Mar 29 08:28:16 2010 +0100
+++ b/sbsv2/raptor/python/plugins/filter_terminal.py Tue Mar 30 18:47:38 2010 +0100
@@ -437,7 +437,7 @@
if self.warn_count > 0 or self.err_count > 0:
sys.stdout.write("\n%s : warnings: %s\n" % (raptor.name,
self.warn_count))
- sys.stdout.write("%s : errors: %s\n" % (raptor.name,
+ sys.stdout.write("%s : errors: %s\n\n" % (raptor.name,
self.err_count))
else:
sys.stdout.write("\nno warnings or errors\n\n")
diff -r 824dddcc66f7 -r f73eee123484 sbsv2/raptor/python/raptor_cli.py
--- a/sbsv2/raptor/python/raptor_cli.py Mon Mar 29 08:28:16 2010 +0100
+++ b/sbsv2/raptor/python/raptor_cli.py Tue Mar 30 18:47:38 2010 +0100
@@ -34,7 +34,7 @@
# raptor_cli module attributes
parser = OptionParser(prog = raptor.name,
- usage = """%prog [--help] [options] [variable=value] [target] ...
+ usage = """%prog [--help] [options] [target] ...
Targets:
@@ -247,13 +247,8 @@
# the leftover_args are either variable assignments of the form a=b
# or target names.
- regex = re.compile("^(.+)=(.*)$")
for leftover in leftover_args:
- assignment = regex.findall(leftover)
- if len(assignment) > 0:
- Raptor.SetEnv(assignment[0][0],assignment[0][1])
- else:
- Raptor.AddTarget(leftover)
+ Raptor.AddTarget(leftover)
# Define the dictionary of functions to be used.
# Attributes and function names can be added easily.
diff -r 824dddcc66f7 -r f73eee123484 sbsv2/raptor/python/raptor_meta.py
--- a/sbsv2/raptor/python/raptor_meta.py Mon Mar 29 08:28:16 2010 +0100
+++ b/sbsv2/raptor/python/raptor_meta.py Tue Mar 30 18:47:38 2010 +0100
@@ -1304,16 +1304,15 @@
elif varname == 'PAGED':
self.BuildVariant.AddOperation(raptor_data.Set(varname, "1"))
self.__debug( "Set switch PAGE ON")
+ # PAGED is equivalent to PAGEDCODE
self.BuildVariant.AddOperation(raptor_data.Set("PAGEDCODE_OPTION", "paged"))
self.__debug( "Set switch PAGEDCODE ON")
- self.BuildVariant.AddOperation(raptor_data.Set("PAGEDDATA_OPTION", "paged"))
- self.__debug( "Set data PAGEDDATA ON")
self.__pageConflict.append("PAGEDCODE")
- self.__pageConflict.append("PAGEDDATA")
elif varname == 'UNPAGED':
self.BuildVariant.AddOperation(raptor_data.Set("PAGED", "0"))
self.__debug( "Set switch PAGED OFF")
+ # UNPAGED is equivalent to UNPAGEDCODE *and* UNPAGEDDATA
self.BuildVariant.AddOperation(raptor_data.Set("PAGEDCODE_OPTION", "unpaged"))
self.__debug( "Set switch PAGEDCODE OFF")
self.BuildVariant.AddOperation(raptor_data.Set("PAGEDDATA_OPTION", "unpaged"))
diff -r 824dddcc66f7 -r f73eee123484 sbsv2/raptor/test/common/raptor_tests.py
--- a/sbsv2/raptor/test/common/raptor_tests.py Mon Mar 29 08:28:16 2010 +0100
+++ b/sbsv2/raptor/test/common/raptor_tests.py Tue Mar 30 18:47:38 2010 +0100
@@ -417,22 +417,26 @@
p = subprocess.Popen(args=[BASH, '-c', command],
stdout=subprocess.PIPE,
- stderr=subprocess.STDOUT,
+ stderr=subprocess.PIPE,
env=shellenv,
shell=False,
universal_newlines=True)
- self.output = p.communicate()[0]
+ (std_out, std_err) = p.communicate()
+
+ self.output = std_out + std_err
else:
p = subprocess.Popen(command,
stdout=subprocess.PIPE,
- stderr=subprocess.STDOUT,
+ stderr=subprocess.PIPE,
env=shellenv,
shell=True,
universal_newlines=True)
- self.output = p.communicate()[0]
-
+ (std_out, std_err) = p.communicate()
+
+ self.output = std_out + std_err
+
if debug_mode_active:
print self.output
diff -r 824dddcc66f7 -r f73eee123484 sbsv2/raptor/test/config/os_properties.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/config/os_properties.xml Tue Mar 30 18:47:38 2010 +0100
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff -r 824dddcc66f7 -r f73eee123484 sbsv2/raptor/test/smoke_suite/cli_makevar_override.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/cli_makevar_override.py Tue Mar 30 18:47:38 2010 +0100
@@ -0,0 +1,39 @@
+#
+# Copyright (c) 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:
+#
+
+# Checks that functionality for overriding makefile varaibles at the command no longer works
+
+
+from raptor_tests import SmokeTest
+
+def run():
+ t = SmokeTest()
+ t.name = "cli_makevar_overide"
+ t.description = "Attempt to override a makefile var at the command line."
+ t.usebash = True
+
+ bldinf = "smoke_suite/test_resources/basics/helloworld/Bld.inf"
+ cmd1 = "sbs -b %s REALLYCLEAN -m ${SBSMAKEFILE} -f ${SBSLOGFILE} HOSTPLATFORM_DIR=unlikelydir" % bldinf
+ cmd2 = "grep -i 'unlikelydir' ${SBSMAKEFILE}"
+ t.command = cmd1 + " && " + cmd2
+
+ t.mustmatch_singleline = ["2"]
+
+ t.warnings = 1
+ t.returncode = 2
+ t.run()
+ return t
+
\ No newline at end of file
diff -r 824dddcc66f7 -r f73eee123484 sbsv2/raptor/test/smoke_suite/export.py
--- a/sbsv2/raptor/test/smoke_suite/export.py Mon Mar 29 08:28:16 2010 +0100
+++ b/sbsv2/raptor/test/smoke_suite/export.py Tue Mar 30 18:47:38 2010 +0100
@@ -73,7 +73,7 @@
t.name = "export"
t.usebash = True
t.command = "ls -l ${EPOCROOT}/epoc32/include/executable_file"
- t.mustmatch = [ "^.rwxrwxr.x .*executable_file.*$" ]
+ t.mustmatch = [ "^.rwxrwxr.x[\.\+]? .*executable_file.*$" ]
t.targets = []
t.run("linux")
t.usebash = False
diff -r 824dddcc66f7 -r f73eee123484 sbsv2/raptor/test/smoke_suite/paging.py
--- a/sbsv2/raptor/test/smoke_suite/paging.py Mon Mar 29 08:28:16 2010 +0100
+++ b/sbsv2/raptor/test/smoke_suite/paging.py Tue Mar 30 18:47:38 2010 +0100
@@ -28,19 +28,17 @@
t.name = "paging_default"
t.command = cmd_prefix + "-p default.mmp" + cmd_suffix
t.mustmatch_singleline = [
- ".*--codepaging=default.*",
- ".*--datapaging=default.*"
+ "--codepaging=default",
+ "--datapaging=default"
]
- t.run("windows") # Windows-only until we've updated the Linux version of elf2e32.
- if t.result == "skip":
- return t
+ t.run()
t.id = "0093b"
t.name = "paging_unpaged"
t.command = cmd_prefix + "-p unpaged.mmp" + cmd_suffix
t.mustmatch_singleline = [
- ".*--codepaging=unpaged.*",
- ".*--datapaging=unpaged.*"
+ "--codepaging=unpaged",
+ "--datapaging=unpaged"
]
t.run()
@@ -49,9 +47,9 @@
t.command = cmd_prefix + "-p paged.mmp" + cmd_suffix
# Either pagedcode or pageddata can imply bytepaircompresstarget
t.mustmatch_singleline = [
- ".*--codepaging=paged.*",
- ".*--datapaging=paged.*",
- ".*--compressionmethod=bytepair.*"
+ "--codepaging=paged",
+ "--datapaging=default",
+ "--compressionmethod=bytepair"
]
t.run()
@@ -59,9 +57,9 @@
t.name = "paging_unpagedcode_pageddata"
t.command = cmd_prefix + "-p unpagedcode_pageddata.mmp" + cmd_suffix
t.mustmatch_singleline = [
- ".*--codepaging=unpaged.*",
- ".*--datapaging=paged.*",
- ".*--compressionmethod=bytepair.*"
+ "--codepaging=unpaged",
+ "--datapaging=paged",
+ "--compressionmethod=bytepair"
]
t.run()
@@ -69,9 +67,9 @@
t.name = "paging_pagedcode_unpageddata"
t.command = cmd_prefix + "-p pagedcode_unpageddata.mmp" + cmd_suffix
t.mustmatch_singleline = [
- ".*--codepaging=paged.*",
- ".*--datapaging=unpaged.*",
- ".*--compressionmethod=bytepair.*"
+ "--codepaging=paged",
+ "--datapaging=unpaged",
+ "--compressionmethod=bytepair"
]
t.run()
@@ -79,9 +77,9 @@
t.name = "paging_pagedcode_defaultdata"
t.command = cmd_prefix + "-p pagedcode_defaultdata.mmp" + cmd_suffix
t.mustmatch_singleline = [
- ".*--codepaging=paged.*",
- ".*--datapaging=default.*",
- ".*--compressionmethod=bytepair.*"
+ "--codepaging=paged",
+ "--datapaging=default",
+ "--compressionmethod=bytepair"
]
t.run()
@@ -89,15 +87,42 @@
t.name = "paging_paged_unpaged_no_bytepair"
t.command = cmd_prefix + "-p paged_unpaged.mmp" + cmd_suffix
t.mustmatch_singleline = [
- ".*--codepaging=unpaged.*",
- ".*--datapaging=unpaged.*"
+ "--codepaging=unpaged",
+ "--datapaging=unpaged"
]
t.mustnotmatch = [
- ".*--compressionmethod=bytepair.*"
+ "--compressionmethod=bytepair"
]
- t.warnings = 4 # 2 in log 2 on screen
+ t.warnings = 2 # 1 in the log and 1 on screen
t.run()
+ # test the pre-WDP paging options --paged and --unpaged
+ # there is an os_properties.xml file in test/config that
+ # turns POSTLINKER_SUPPORTS_WDP off
+
+ t.id = "0093g"
+ t.name = "paging_paged_no_wdp"
+ t.command = cmd_prefix + "-p paged.mmp --configpath=test/config" + cmd_suffix
+ t.mustmatch_singleline = [
+ "--paged",
+ "--compressionmethod=bytepair"
+ ]
+ t.mustnotmatch = []
+ t.warnings = 0
+ t.targets = [ "$(EPOCROOT)/epoc32/release/armv5/urel/paged.dll" ]
+ t.run()
+
+ t.id = "0093h"
+ t.name = "paging_unpaged_no_wdp"
+ t.command = cmd_prefix + "-p unpaged.mmp --configpath=test/config" + cmd_suffix
+ t.mustmatch_singleline = [
+ "--unpaged",
+ ]
+ t.mustnotmatch = [
+ "--compressionmethod=bytepair"
+ ]
+ t.targets = [ "$(EPOCROOT)/epoc32/release/armv5/urel/unpaged.dll" ]
+ t.run()
t.id = "0093"
t.name = "paging"
diff -r 824dddcc66f7 -r f73eee123484 sbsv2/raptor/test/smoke_suite/timeout.py
--- a/sbsv2/raptor/test/smoke_suite/timeout.py Mon Mar 29 08:28:16 2010 +0100
+++ b/sbsv2/raptor/test/smoke_suite/timeout.py Tue Mar 30 18:47:38 2010 +0100
@@ -26,10 +26,10 @@
t.id = "60a"
t.name = "timeout"
t.usebash = True
- t.command = "sbs -b smoke_suite/test_resources/timeout/bld.inf -f-"
+ t.command = "sbs -b smoke_suite/test_resources/timeout/bld.inf -f -"
- t.mustmatch = [
- "status exit='failed' code='" + exitCode + "' attempt='1' *reason='timeout'",
+ t.mustmatch_singleline = [
+ "status exit='failed' code='" + exitCode + "' attempt='1' reason='timeout'",
]
t.errors = -1
t.returncode = 1
@@ -38,12 +38,12 @@
t.id = "60b"
t.name = "timeout with retries"
t.usebash = True
- t.command = "sbs -b smoke_suite/test_resources/timeout/bld.inf -t 3 -f-"
+ t.command = "sbs -b smoke_suite/test_resources/timeout/bld.inf -t 3 -f -"
- t.mustmatch = [
- "status exit='retry' code='" + exitCode + "' attempt='1' *reason='timeout'",
- "status exit='retry' code='" + exitCode + "' attempt='2' *reason='timeout'",
- "status exit='failed' code='" + exitCode + "' attempt='3' *reason='timeout'",
+ t.mustmatch_singleline = [
+ "status exit='retry' code='" + exitCode + "' attempt='1' reason='timeout'",
+ "status exit='retry' code='" + exitCode + "' attempt='2' reason='timeout'",
+ "status exit='failed' code='" + exitCode + "' attempt='3' reason='timeout'",
]
t.errors = -1
t.returncode = 1