--- a/sbsv2/raptor/RELEASE-NOTES.txt Tue Apr 06 19:07:59 2010 +0100
+++ b/sbsv2/raptor/RELEASE-NOTES.txt Tue Apr 06 19:08:28 2010 +0100
@@ -14,6 +14,9 @@
- 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
+- Fix: Makefile Parse Performance in Resource stage is poor. Large size of included dependency files is a factor. In --no-depend-generate mode, create dependency files which only refer to other rsg/mbg files that are yet to be built - store no other dependencies.
version 2.12.5
--- a/sbsv2/raptor/lib/flm/resource.flm Tue Apr 06 19:07:59 2010 +0100
+++ b/sbsv2/raptor/lib/flm/resource.flm Tue Apr 06 19:08:28 2010 +0100
@@ -113,7 +113,7 @@
# common pre-processor options
CPPOPT:=-nostdinc -undef -Wno-trigraphs -D_UNICODE -include $(PRODUCT_INCLUDE)\
- -I$(dir $(SOURCE)) $(foreach I, $(USERINCLUDE),-I$(I) ) -I- $(foreach J,$(SYSTEMINCLUDE),-I$(J) )
+ -I$(dir $(SOURCE)) $(foreach I, $(USERINCLUDE),-iquote $(I) ) $(foreach J,$(SYSTEMINCLUDE),-I $(J) )
CREATABLEPATHS:=$(RSCDIR) $(RSGDIR) $(OUTPUTPATH)
@@ -127,6 +127,8 @@
CREATABLEPATHS:=$(CREATABLEPATHS) $(RSCCOPYDIRS)
###############################################################################
+
+
define preprocessresource
# $(1) is the RPPFILE (eg. /epoc32/build/xxx/b_sc.rpp)
# $(2) is the related RESOURCEFILE if any (eg. /a/b.rsc)
@@ -136,12 +138,26 @@
TARGET_$(call sanitise,$1):=1
$(if $(FLMDEBUG),$(info preprocessresource: $(1) for $(2) LANG:$(3)))
+
+ # Correct dependency information when a header file can't be found:
+ # assume its in epoc32\include
+
+ ifneq ($(NO_DEPEND_GENERATE),)
+ # This version minimises the size of dependency files, to contain only enough information
+ # to allow the ordering to be correct.
+ DEPENDENCY_CORRECTOR:={ $(GNUSED) -n -r '1 p;\# [^ \/]+\.((rsg)|(mbg))#I {s#([^ \/]+\.((rsg)|(mbg)))(.*[\\\\])?$$$$$$$$# $(EPOCROOT)\/epoc32\/include\/\1 [\\\\]#ig; p}' && echo "" ; }
+ else
+ # Generate full dependency information with correction only
+ DEPENDENCY_CORRECTOR:=$(GNUSED) -r 's% ([^ \/]+\.((rsg)|(mbg)))% $(EPOCROOT)\/epoc32\/include\/\1%ig'
+ endif
+
+
RESOURCE_DEPS:: $(1).d
$(1).d: $(SOURCE)
$(call startrule,resourcedependencies,FORCESUCCESS) \
$(GNUCPP) -C -DLANGUAGE_$(3) -DLANGUAGE_$(subst sc,SC,$(3)) $(call makemacrodef,-D,$(MMPDEFS))\
$(CPPOPT) $(SOURCE) -M -MG -MT"$(1)" | \
- $(GNUSED) -r 's# ([^ \/]+\.((rsg)|(mbg)))# $(EPOCROOT)\/epoc32\/include\/\1#ig' > $(1).d \
+ $(DEPENDENCY_CORRECTOR) >$$@ \
$(call endrule,resourcedependencies)
$(1): $(1).d
@@ -158,7 +174,9 @@
CLEANTARGETS:=$$(CLEANTARGETS) $(DEPENDFILENAME)
ifneq "$(DEPENDFILE)" ""
ifeq "$(filter %CLEAN,$(call uppercase,$(MAKECMDGOALS)))" ""
- -include $(DEPENDFILE)
+ ifeq "$(filter RESOURCE_DEPS,$(call uppercase,$(MAKECMDGOALS)))" ""
+ -include $(DEPENDFILE)
+ endif
endif
endif
--- a/sbsv2/raptor/python/plugins/filter_terminal.py Tue Apr 06 19:07:59 2010 +0100
+++ b/sbsv2/raptor/python/plugins/filter_terminal.py Tue Apr 06 19:08:28 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")
--- a/sbsv2/raptor/python/raptor_cli.py Tue Apr 06 19:07:59 2010 +0100
+++ b/sbsv2/raptor/python/raptor_cli.py Tue Apr 06 19:08:28 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.
--- a/sbsv2/raptor/python/raptor_meta.py Tue Apr 06 19:07:59 2010 +0100
+++ b/sbsv2/raptor/python/raptor_meta.py Tue Apr 06 19:08:28 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"))
--- a/sbsv2/raptor/test/common/raptor_tests.py Tue Apr 06 19:07:59 2010 +0100
+++ b/sbsv2/raptor/test/common/raptor_tests.py Tue Apr 06 19:08:28 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
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/config/os_properties.xml Tue Apr 06 19:08:28 2010 +0100
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<build xmlns="http://symbian.com/xml/build"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://symbian.com/xml/build build/2_0.xsd">
+
+ <!-- This variant modifies the root variant for this particular kit. -->
+ <var name="root.changes">
+
+ <!-- pretend we don't have the new paging options (codepaging, datapaging)
+ so that we can test the old options (paged, unpaged)
+ -->
+ <set name='POSTLINKER_SUPPORTS_WDP' value=''/>
+ </var>
+
+</build>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/cli_makevar_override.py Tue Apr 06 19:08:28 2010 +0100
@@ -0,0 +1,38 @@
+#
+# 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
+# The mechanism for dealing with this was removed as the fix for SF bug 2134
+# On the CLI, "something=something" is now treated as a target rather than a variable assignment
+
+from raptor_tests import SmokeTest
+
+def run():
+ t = SmokeTest()
+ t.name = "cli_makevar_overide"
+ t.id = "0117"
+ t.description = "Attempt to override a makefile var at the command line."
+ t.usebash = True
+
+ t.command = "sbs -b smoke_suite/test_resources/basics/helloworld/Bld.inf REALLYCLEAN -m ${SBSMAKEFILE} -f ${SBSLOGFILE} HOSTPLATFORM_DIR=unlikelydir"
+
+ t.mustmatch = ["sbs: warning: CLEAN, CLEANEXPORT and a REALLYCLEAN should not be combined with other targets as the result is unpredictable"]
+
+ t.warnings = 1
+ t.run()
+
+ return t
+
\ No newline at end of file
--- a/sbsv2/raptor/test/smoke_suite/export.py Tue Apr 06 19:07:59 2010 +0100
+++ b/sbsv2/raptor/test/smoke_suite/export.py Tue Apr 06 19:08:28 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
--- a/sbsv2/raptor/test/smoke_suite/paging.py Tue Apr 06 19:07:59 2010 +0100
+++ b/sbsv2/raptor/test/smoke_suite/paging.py Tue Apr 06 19:08:28 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"
--- a/sbsv2/raptor/test/smoke_suite/timeout.py Tue Apr 06 19:07:59 2010 +0100
+++ b/sbsv2/raptor/test/smoke_suite/timeout.py Tue Apr 06 19:08:28 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