test data for bad groups fix
authorRichard Taylor <richard.i.taylor@nokia.com>
Tue, 02 Mar 2010 09:54:25 +0000
branchfix
changeset 371 2db10eac415a
parent 370 c86748d54051
child 372 e6d6373c0c3a
test data for bad groups
sbsv2/raptor/python/raptor.py
sbsv2/raptor/python/raptor_data.py
sbsv2/raptor/test/smoke_suite/keepgoing.py
sbsv2/raptor/test/smoke_suite/test_resources/keepgoing/groups.xml
--- a/sbsv2/raptor/python/raptor.py	Thu Feb 25 16:02:22 2010 +0000
+++ b/sbsv2/raptor/python/raptor.py	Tue Mar 02 09:54:25 2010 +0000
@@ -889,7 +889,6 @@
 
 		buildUnitsToBuild = set()
 
-
 		for c in set(configNames):
 			self.Debug("BuildUnit: %s", c)
 			try:
--- a/sbsv2/raptor/python/raptor_data.py	Thu Feb 25 16:02:22 2010 +0000
+++ b/sbsv2/raptor/python/raptor_data.py	Tue Mar 02 09:54:25 2010 +0000
@@ -1026,7 +1026,7 @@
 
 	def GenerateBuildUnits(self, cache):
 		units = []
-
+		
 		missing_variants = []
 		for r in self.childRefs:
 			refMods = r.GetModifiers(cache)
@@ -1055,7 +1055,7 @@
 		Reference.__init__(self, ref)
 
 	def __str__(self):
-		return "<%s /><groupRef ref='%s' mod='%s'/>" % (prefix, self.ref, ".".join(self.modifiers))
+		return "<groupRef ref='%s' mod='%s'/>" % (self.ref, ".".join(self.modifiers))
 
 	def Resolve(self, cache):
 		try:
--- a/sbsv2/raptor/test/smoke_suite/keepgoing.py	Thu Feb 25 16:02:22 2010 +0000
+++ b/sbsv2/raptor/test/smoke_suite/keepgoing.py	Tue Mar 02 09:54:25 2010 +0000
@@ -21,7 +21,7 @@
 	t.description = """Raptor should keep going and build as much as possible with the -k option specified."""
 	
 	command = "sbs -b smoke_suite/test_resources/simple/bld.inf -k"
-	
+	config = " --configpath=test/smoke_suite/test_resources/keepgoing"
 	targets = [
 		"$(EPOCROOT)/epoc32/release/armv5/udeb/test.exe",
 		"$(EPOCROOT)/epoc32/release/armv5/udeb/test.exe.map",
@@ -75,6 +75,16 @@
 	t.returncode = 1
 	t.run()
 	
+	# using groups with bad sub-groups should build any independent groups
+	t.id = "115b"
+	t.name = "keepgoing_bad_subgroup"
+	t.command = command + config + " -c lots_of_products"
+	t.mustmatch = ["sbs: error: Unknown build configuration 'armv5.bogus'"]
+	t.warnings = 0
+	t.errors = 1
+	t.returncode = 1
+	t.run()
+	
 	# summarise	
 	t.id = "115"
 	t.name = "keepgoing"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/keepgoing/groups.xml	Tue Mar 02 09:54:25 2010 +0000
@@ -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 group deliberately contains some non-existent products 
+  -->
+  <group name="lots_of_products">
+	<groupRef ref='armv5'/>
+	<groupRef ref='armv5' mod="qwertyuio"/>
+	<groupRef ref='armv5' mod="asdfghjkl"/>
+	<groupRef ref='armv5' mod="zxcvbnm_p"/>
+  </group>
+  
+</build>