merge fix
authortimothy.murphy@nokia.com
Tue, 06 Apr 2010 19:08:28 +0100
branchfix
changeset 465 d5ccdec632f8
parent 464 a6aa62a0998d (diff)
parent 462 7f12c652f36d (current diff)
child 466 b9e5cf94aac3
merge
sbsv2/raptor/lib/flm/resource.flm
--- a/sbsv2/raptor/lib/flm/resource.flm	Thu Apr 01 19:43:21 2010 +0100
+++ b/sbsv2/raptor/lib/flm/resource.flm	Tue Apr 06 19:08:28 2010 +0100
@@ -64,7 +64,7 @@
 endif
 
 # we create intermediate .rpp and .d files
-INTERBASE:=$(OUTPUTPATH)/$(TARGET_lower)$(if $(TARGETPATH),_$(subst /,_,$(TARGETPATH)),)
+INTERBASE:=$(OUTPUTPATH)/$(TARGET_lower)
 
 ################################## localisation ###########################$(GNUMKDIR)#############
 # Only make copies for full resource builds
@@ -117,12 +117,14 @@
 
 CREATABLEPATHS:=$(RSCDIR) $(RSGDIR) $(OUTPUTPATH)
 
+# We intend to generate the resource in an intermediate locationand copy to the final destination to
+# ensure that when the "same" resource is built into separare locations it is 
+RSCCOPYDIRS:=$(RESBASE)
 # additional binary resource copies performed based on BINCOPYDIRS
-RSCCOPYDIRS:=
 ifneq ($(BINCOPYDIRS),)
-        RSCCOPYDIRS:=$(subst //,/,$(patsubst %,%/$(if $(TARGETPATH),/z/$(TARGETPATH),),$(BINCOPYDIRS)))
-        CREATABLEPATHS:=$(CREATABLEPATHS) $(RSCCOPYDIRS)
+        RSCCOPYDIRS:=$(RSCCOPYDIRS) $(subst //,/,$(patsubst %,%/$(if $(TARGETPATH),/z/$(TARGETPATH),),$(BINCOPYDIRS)))
 endif
+CREATABLEPATHS:=$(CREATABLEPATHS) $(RSCCOPYDIRS)
 
 ###############################################################################
 
@@ -279,8 +281,8 @@
 ifeq ($(HEADERONLY),)
         # generate a resource file for each language
         # For sc we generate $(RESBASE).rsc and define LANGUAGE_SC and LANGUAGE_sc.
-        $(foreach L,$(LANGUAGES:SC=sc),$(eval $(call preprocessresource,$(INTERBASE)_$(L).rpp,$(RESBASE).r$(L),$(L))))
-        $(foreach L,$(LANGUAGES:SC=sc),$(eval $(call generateresource,$(RESBASE).r$(L),$(INTERBASE)_$(L).rpp,$(L))))
+        $(foreach L,$(LANGUAGES:SC=sc),$(eval $(call preprocessresource,$(INTERBASE)_$(L).rpp,$(INTERBASE).r$(L),$(L))))
+        $(foreach L,$(LANGUAGES:SC=sc),$(eval $(call generateresource,$(INTERBASE).r$(L),$(INTERBASE)_$(L).rpp,$(L))))
 else
         # No resources are going to be made so unless we specifically ask for it, there will be no
         # preprocessed file from which to create the header:
--- a/sbsv2/raptor/test/smoke_suite/resource.py	Thu Apr 01 19:43:21 2010 +0100
+++ b/sbsv2/raptor/test/smoke_suite/resource.py	Tue Apr 06 19:08:28 2010 +0100
@@ -15,20 +15,15 @@
 #
 
 from raptor_tests import SmokeTest
+from raptor_tests import ReplaceEnvs
+from raptor_meta import BldInfFile
 
 def run():
 	t = SmokeTest()
 	t.id = "30"
 	t.name =  "resource"
-	t.command = "sbs -b smoke_suite/test_resources/resource/group/bld.inf -b smoke_suite/test_resources/simple_gui/Bld.inf RESOURCE"
+	t.command = "sbs  -b smoke_suite/test_resources/simple_gui/Bld.inf RESOURCE"
 	t.targets = [
-		"$(EPOCROOT)/epoc32/include/testresource.rsg",
-		"$(EPOCROOT)/epoc32/include/testresource.hrh",
-		"$(EPOCROOT)/epoc32/data/z/resource/testresource/testresource.r01",
-		"$(EPOCROOT)/epoc32/data/z/resource/testresource/testresource.rsc",
-		"$(EPOCROOT)/epoc32/localisation/group/testresource.info",
-		"$(EPOCROOT)/epoc32/localisation/testresource/rsc/testresource.rpp",
-		
 		"$(EPOCROOT)/epoc32/data/z/resource/apps/helloworld.mbm",
 		"$(EPOCROOT)/epoc32/localisation/group/helloworld.info",
 		"$(EPOCROOT)/epoc32/release/winscw/udeb/z/resource/apps/helloworld.mbm",
@@ -45,6 +40,39 @@
 		"$(EPOCROOT)/epoc32/release/winscw/urel/z/private/10003a3f/apps/helloworld_reg.rsc"	
 		]
 	
+
+	t.addbuildtargets('smoke_suite/test_resources/simple_gui/Bld.inf', [
+		"helloworld_exe/helloworld.mbm_bmconvcommands",
+		"helloworld_exe/helloworld__resource_apps_sc.rpp",
+		"helloworld_exe/helloworld__resource_apps_sc.rpp.d",
+		"helloworld_reg_exe/helloworld_reg__private_10003a3f_apps_sc.rpp",
+		"helloworld_reg_exe/helloworld_reg__private_10003a3f_apps_sc.rpp.d"])
+
+	t.mustnotmatch = ["HelloWorld.rss.* warning: trigraph"]
+	
+	t.run()
+
+
+	t.id="30a"
+	t.name =  "no_depend_gen_resource"
+	t.usebash = True
+	t.description =  """Check that dependent resources still build correctly even when we turn dependency generation off.  This
+			    test cannot reliably ensure that the dependencies are correct
+			 """
+	buildLocation = ReplaceEnvs("$(EPOCROOT)/epoc32/build/") + BldInfFile.outputPathFragment('smoke_suite/test_resources/resource/group/bld.inf')
+	res_depfile= buildLocation+"/dependentresource_/dependentresource_resource_dependentresource_sc.rpp.d"
+
+	t.targets = [
+		"$(EPOCROOT)/epoc32/include/testresource.rsg",
+		"$(EPOCROOT)/epoc32/include/testresource.hrh",
+		"$(EPOCROOT)/epoc32/data/z/resource/testresource/testresource.r01",
+		"$(EPOCROOT)/epoc32/data/z/resource/testresource/testresource.rsc",
+		"$(EPOCROOT)/epoc32/release/armv5/urel/testresource.exe",
+		"$(EPOCROOT)/epoc32/localisation/group/testresource.info",
+		"$(EPOCROOT)/epoc32/localisation/testresource/rsc/testresource.rpp",
+		res_depfile
+		]
+
 	t.addbuildtargets('smoke_suite/test_resources/resource/group/bld.inf', [	
 		"testresource_/testresource_resource_testresource2_sc.rpp.d",
 		"testresource_/testresource_resource_testresource3_02.rpp",
@@ -56,14 +84,7 @@
 		"testresource_/testresource_resource_testresource_sc.rpp",
 		"testresource_/testresource_resource_testresource_sc.rpp.d"])
 
-	t.addbuildtargets('smoke_suite/test_resources/simple_gui/Bld.inf', [
-		"helloworld_exe/helloworld.mbm_bmconvcommands",
-		"helloworld_exe/helloworld__resource_apps_sc.rpp",
-		"helloworld_exe/helloworld__resource_apps_sc.rpp.d",
-		"helloworld_reg_exe/helloworld_reg__private_10003a3f_apps_sc.rpp",
-		"helloworld_reg_exe/helloworld_reg__private_10003a3f_apps_sc.rpp.d"])
+	t.command = "sbs -b smoke_suite/test_resources/resource/group/bld.inf  -c arm.v5.urel.gcce4_4_1 reallyclean ; sbs --no-depend-generate -j 16 -b smoke_suite/test_resources/resource/group/bld.inf -c arm.v5.urel.gcce4_4_1 -f ${SBSLOGFILE} -m ${SBSMAKEFILE} && grep 'epoc32.include.testresource.rsg' %s " % (res_depfile)
 
-	t.mustnotmatch = ["HelloWorld.rss.* warning: trigraph"]
-	
 	t.run()
 	return t
--- a/sbsv2/raptor/test/smoke_suite/test_resources/resource/group/testresource.mmp	Thu Apr 01 19:43:21 2010 +0100
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/resource/group/testresource.mmp	Tue Apr 06 19:08:28 2010 +0100
@@ -52,6 +52,12 @@
 LANG 02 sc
 END
 
+
+START RESOURCE          dependentresource.rss
+TARGETPATH              resource/dependentresource
+LANG sc
+END
+
 START BITMAP	testresource.mbm
 HEADER