fix: take action on copy tags at the end of build phases.
--- a/sbsv2/raptor/lib/flm/resource.flm Sat May 01 05:41:25 2010 +0100
+++ b/sbsv2/raptor/lib/flm/resource.flm Wed May 05 20:59:20 2010 +0100
@@ -90,12 +90,9 @@
ifeq ($(RESOURCE_$(call sanitise,$(SOURCE))),)
RESOURCE_$(call sanitise,$(SOURCE)):=1
-RESOURCE:: $(DESTRPP) $(INFOFILE)
+RESOURCE:: $(INFOFILE)
-$(DESTRPP): $(INTERBASE_TMP)_$(RPPLANG).rpp
- $(call startrule,rppfilecopy,FORCESUCCESS) \
- $(GNUCP) $$< $$@ \
- $(call endrule,rppfilecopy)
+$(info <copy source='$(INTERBASE_TMP)_$(RPPLANG).rpp'>$(DESTRPP)</copy>)
$(INFOFILE)::
@if [ ! -d $(EPOCROOT)/epoc32/localisation/group ]; then $(GNUMKDIR) -p $(EPOCROOT)/epoc32/localisation/group; fi
--- a/sbsv2/raptor/python/plugins/filter_copyfile.py Sat May 01 05:41:25 2010 +0100
+++ b/sbsv2/raptor/python/plugins/filter_copyfile.py Wed May 05 20:59:20 2010 +0100
@@ -12,8 +12,18 @@
# Contributors:
#
# Description:
-# Filter class for doing CLEAN, CLEANEXPORT and REALLYCLEAN efficiently.
+# Filter class for copying files in serial in python. This
+# is important in cluster builds where file copying is
+# very inefficient.
+# The one-to-many <copy> tag is searched for and copy
+# instructions are built up in a hash table.
+# <copy source='sourcefilename'>destfilename1 destfilename2 . . . .destfilenameN</copy>
+# destinations must be full filenames not directories.
#
+# This filter monitors build progress
+# via the <progress> tags and flushes copies as build
+# stages end (e.g. after resource so resources are ready for the next stage)
+#
import os
import sys
@@ -48,19 +58,25 @@
self.files[source].update(destinations)
else:
self.files[source] = set(destinations)
-
+ elif line.startswith("<progress:end object_type='makefile' task='build'"):
+ self.flushcopies() # perform copies at end of each invocation of the make engine
+ # to ensure dependencies are in place for the next one.
return self.ok
def summary(self):
"finish off"
+ self.flushcopies()
+ return self.ok
+
+ def flushcopies(self):
for source in self.files.keys():
#print "<debug>self.files %s</debug>" % self.files[source]
for dest in self.files[source]:
self.copyfile(source, dest)
+ self.files = {}
- return self.ok
def close(self):
--- a/sbsv2/raptor/python/raptor.py Sat May 01 05:41:25 2010 +0100
+++ b/sbsv2/raptor/python/raptor.py Wed May 05 20:59:20 2010 +0100
@@ -338,9 +338,6 @@
if build.quiet == True:
cli_options += " -q"
- if build.timing == True:
- cli_options += " --timing"
-
if build.noDependInclude == True:
cli_options += " --no-depend-include"
@@ -534,7 +531,7 @@
# what platform and filesystem are we running on?
self.filesystem = raptor_utilities.getOSFileSystem()
- self.timing = False
+ self.timing = True # Needed by filters such as copy_file to monitor progress
self.toolset = None
self.starttime = time.time()
@@ -696,7 +693,7 @@
return True
def SetTiming(self, TrueOrFalse):
- self.timing = TrueOrFalse
+ self.Info("--timing switch no longer has any effect - build timing is now permanently on")
return True
def SetParallelParsing(self, type):
--- a/sbsv2/raptor/test/smoke_suite/resource.py Sat May 01 05:41:25 2010 +0100
+++ b/sbsv2/raptor/test/smoke_suite/resource.py Wed May 05 20:59:20 2010 +0100
@@ -43,10 +43,10 @@
t.addbuildtargets('smoke_suite/test_resources/simple_gui/Bld.inf', [
"helloworld_exe/helloworld.mbm_bmconvcommands",
- "helloworld_exe/helloworld_sc.rpp",
- "helloworld_exe/helloworld_sc.rpp.d",
- "helloworld_reg_exe/helloworld_reg_sc.rpp",
- "helloworld_reg_exe/helloworld_reg_sc.rpp.d"])
+ "helloworld_exe/helloworld_HelloWorld_sc.rpp",
+ "helloworld_exe/helloworld_HelloWorld_sc.rpp.d",
+ "helloworld_reg_exe/helloworld_reg_HelloWorld_reg_sc.rpp",
+ "helloworld_reg_exe/helloworld_reg_HelloWorld_reg_sc.rpp.d"])
t.mustnotmatch = ["HelloWorld.rss.* warning: trigraph"]
@@ -64,7 +64,7 @@
is used because the weight of 'complete' dependency information would overwhelm make.
"""
buildLocation = ReplaceEnvs("$(EPOCROOT)/epoc32/build/") + BldInfFile.outputPathFragment('smoke_suite/test_resources/resource/group/bld.inf')
- res_depfile= buildLocation+"/dependentresource_/dependentresource_sc.rpp.d"
+ res_depfile= buildLocation+"/dependentresource_/dependentresource_dependentresource_sc.rpp.d"
t.targets = [
"$(EPOCROOT)/epoc32/include/testresource.rsg",
@@ -78,17 +78,17 @@
]
t.addbuildtargets('smoke_suite/test_resources/resource/group/bld.inf', [
- "testresource_/testresource_02.rpp",
- "testresource_/testresource_01.rpp",
- "testresource_/testresource_01.rpp.d",
- "testresource_/testresource_sc.rpp"])
+ "testresource_/testresource_testresource_02.rpp",
+ "testresource_/testresource_testresource_01.rpp",
+ "testresource_/testresource_testresource_01.rpp.d",
+ "testresource_/testresource_testresource_sc.rpp"])
t.command = "sbs -b smoke_suite/test_resources/resource/group/bld.inf -c armv5_urel reallyclean ; sbs --no-depend-generate -j 16 -b smoke_suite/test_resources/resource/group/bld.inf -c armv5_urel -f ${SBSLOGFILE} -m ${SBSMAKEFILE} && grep 'epoc32.include.testresource.rsg' %s && wc -l %s " % (res_depfile, res_depfile)
t.mustnotmatch = []
t.mustmatch = [
- "3 .*.dependentresource_.dependentresource_sc.rpp.d"
+ "3 .*.dependentresource_.dependentresource_dependentresource_sc.rpp.d"
]
t.run()