# HG changeset patch # User timothy.murphy@nokia.com # Date 1270818746 -3600 # Node ID ecf6886a5469e3a179823af88e8816f9dd252397 # Parent 75b84584242b05c080f5ba29c19931ace89376e0# Parent c521ed6bf7465c0fa38f0ed47b2d28444db027f8 Merge diff -r c521ed6bf746 -r ecf6886a5469 sbsv2/raptor/RELEASE-NOTES.html --- a/sbsv2/raptor/RELEASE-NOTES.html Fri Apr 09 14:10:41 2010 +0100 +++ b/sbsv2/raptor/RELEASE-NOTES.html Fri Apr 09 14:12:26 2010 +0100 @@ -6,6 +6,15 @@

Release Notes for Symbian Build System v2

+

next version

+ +

Defect Fixes

+ +

version 2.13.0

New Features

diff -r c521ed6bf746 -r ecf6886a5469 sbsv2/raptor/python/raptor_meta.py --- a/sbsv2/raptor/python/raptor_meta.py Fri Apr 09 14:10:41 2010 +0100 +++ b/sbsv2/raptor/python/raptor_meta.py Fri Apr 09 14:12:26 2010 +0100 @@ -1071,9 +1071,12 @@ if (re.search(r'^\s*START ',extensionLine, re.I)): start = extensionLine elif re.search(r'^\s*END\s*$',extensionLine, re.I): - extensionObjects.append(Extension(self.filename, start, options, aBuildPlatform, self.__Raptor)) - start = "" - options = [] + if start == "": + self.log.Error("unmatched END statement in %s section", aType, bldinf=str(self.filename)) + else: + extensionObjects.append(Extension(self.filename, start, options, aBuildPlatform, self.__Raptor)) + start = "" + options = [] elif re.search(r'^\s*$',extensionLine, re.I): continue elif start: @@ -3286,7 +3289,7 @@ self.__Raptor.Debug("Skipping %s", str(m.getMakefileName())) continue elif projectname in self.projectList: - projectList.remove(projectname) + self.projectList.remove(projectname) self.__Raptor.Debug("%i makefile extension makefiles for %s", len(makefileList), str(componentNode.component.bldinf.filename)) diff -r c521ed6bf746 -r ecf6886a5469 sbsv2/raptor/test/metadata/project/bld.infs/bad_lone_end.inf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/test/metadata/project/bld.infs/bad_lone_end.inf Fri Apr 09 14:12:26 2010 +0100 @@ -0,0 +1,33 @@ +/* +* 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: +* +*/ + +// test for failure in PRJ_EXTENSIONS by processing for ARMV5 and +// test for failure in PRJ_TESTEXTENSIONS by processing for WINSCW + +#ifdef EABI + +PRJ_EXTENSIONS +// an END without a START +END + +#else + +PRJ_TESTEXTENSIONS +// an END without a START +END + +#endif diff -r c521ed6bf746 -r ecf6886a5469 sbsv2/raptor/test/unit_suite/raptor_meta_unit.py --- a/sbsv2/raptor/test/unit_suite/raptor_meta_unit.py Fri Apr 09 14:10:41 2010 +0100 +++ b/sbsv2/raptor/test/unit_suite/raptor_meta_unit.py Fri Apr 09 14:12:26 2010 +0100 @@ -1,5 +1,5 @@ # -# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). +# Copyright (c) 2007-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" @@ -569,7 +569,49 @@ 'STDVAR_TO_BLDINF':bldInfMakefilePathTestRoot, 'STDVAR_EXTENSION_ROOT':bldInfMakefilePathTestRoot} ) + + def testBadBldInfs(self): + bldInfTestRoot = self.__testRoot.Append('metadata/project/bld.infs') + depfiles=[] + class BadBldInfLogger(object): + "mock logger to capture Error messages from the parser." + + def __init__(self): + self.errors = [] + self.debugOutput = False + + def Error(self, format, *extras, **attributes): + self.errors.append( ((format % extras), attributes) ) + + def Debug(self, format, *extras, **attributes): + pass + + logger = BadBldInfLogger() + + # this bld.inf has END lines with no matching START + bldInfObject = raptor_meta.BldInfFile(bldInfTestRoot.Append('bad_lone_end.inf'), + self.__gnucpp, depfiles=depfiles, + log=logger) + + # the PRJ_EXTENSIONS section is bad for ARMV5 + extensions = bldInfObject.getExtensions(self.ARMV5) + # + self.assertEquals(len(logger.errors), 1) + err = logger.errors[0] + self.assertEquals(err[0], "unmatched END statement in PRJ_EXTENSIONS section") + self.assertTrue("bldinf" in err[1]) + self.assertTrue(err[1]["bldinf"].endswith("bad_lone_end.inf")) + + # the PRJ_TESTEXTENSIONS section is bad for WINSCW + testextensions = bldInfObject.getTestExtensions(self.WINSCW) + # + self.assertEquals(len(logger.errors), 2) + err = logger.errors[1] + self.assertEquals(err[0], "unmatched END statement in PRJ_TESTEXTENSIONS section") + self.assertTrue("bldinf" in err[1]) + self.assertTrue(err[1]["bldinf"].endswith("bad_lone_end.inf")) + def testBldInfIncludes(self): bldInfTestRoot = self.__testRoot.Append('metadata/project/bld.infs/includes') depfiles=[]