# HG changeset patch # User timothy.murphy@nokia.com # Date 1269541103 0 # Node ID 924ab6786b2f042d76ac4f5fe341dcd9fd2ba7c6 # Parent d420eba6f3a0ef3f09f16549a113bbb04e92ab7e# Parent 1b444ea0baecd47c5220666fc462ca6f31c9cf00 Merge annofile and talon tidyup with fix diff -r 1b444ea0baec -r 924ab6786b2f sbsv2/raptor/RELEASE-NOTES.txt --- a/sbsv2/raptor/RELEASE-NOTES.txt Thu Mar 25 14:43:35 2010 +0000 +++ b/sbsv2/raptor/RELEASE-NOTES.txt Thu Mar 25 18:18:23 2010 +0000 @@ -1,9 +1,16 @@ Release Notes for Symbian Build System v2 next version +Defect Fixes: -Defect Fixes: -- Fix: in copylogfromannofile mode, ensure that the build id and duration are included in the log. These are not critical but are useful. +- SF Bug 385 - Raptor doesn't handle spaces in tool directory +- DPDEF143018 - Raptor doesn't handle spaces in GCCE installation directory correctly +- DPDEF143101 - GCC-E isn't tested as part of the tool checking mechanism +- DPDEF141195 - Raptor doesn't handle spaces in tool paths +- SF Bug 2172 - [Raptor] Resource builds warn on encountering trigraph-like strings +- SF Bug 2308 - [Raptor] PLUGIN3 TARGETTYPEs don't set resource output offsets correctly +- Fix: in copylogfromannofile mode, ensure that the build id and duration are included in the log. + These are not critical but are useful. - 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 diff -r 1b444ea0baec -r 924ab6786b2f sbsv2/raptor/lib/config/arm.xml --- a/sbsv2/raptor/lib/config/arm.xml Thu Mar 25 14:43:35 2010 +0000 +++ b/sbsv2/raptor/lib/config/arm.xml Thu Mar 25 18:18:23 2010 +0000 @@ -1,51 +1,62 @@ - + - - - + + - + + + - - - + - - - + + + + + - - + + + + + + + + + + + + + + - + - + - - @@ -57,16 +68,9 @@ - - - - - - - - - + + diff -r 1b444ea0baec -r 924ab6786b2f sbsv2/raptor/lib/config/gcc.xml --- a/sbsv2/raptor/lib/config/gcc.xml Thu Mar 25 14:43:35 2010 +0000 +++ b/sbsv2/raptor/lib/config/gcc.xml Thu Mar 25 18:18:23 2010 +0000 @@ -1,33 +1,33 @@ - - + - - + + + + + + + + - - - - + + + + - - - - - - - @@ -58,7 +56,6 @@ - diff -r 1b444ea0baec -r 924ab6786b2f sbsv2/raptor/lib/config/gcce.xml --- a/sbsv2/raptor/lib/config/gcce.xml Thu Mar 25 14:43:35 2010 +0000 +++ b/sbsv2/raptor/lib/config/gcce.xml Thu Mar 25 18:18:23 2010 +0000 @@ -1,15 +1,15 @@ - - + + + + - - @@ -122,6 +122,6 @@ - + diff -r 1b444ea0baec -r 924ab6786b2f sbsv2/raptor/lib/config/gccxml.xml --- a/sbsv2/raptor/lib/config/gccxml.xml Thu Mar 25 14:43:35 2010 +0000 +++ b/sbsv2/raptor/lib/config/gccxml.xml Thu Mar 25 18:18:23 2010 +0000 @@ -1,21 +1,20 @@ - + - + + + + - - + - - + + - - - - + @@ -51,11 +50,13 @@ - + + + diff -r 1b444ea0baec -r 924ab6786b2f sbsv2/raptor/lib/config/locations.xml --- a/sbsv2/raptor/lib/config/locations.xml Thu Mar 25 14:43:35 2010 +0000 +++ b/sbsv2/raptor/lib/config/locations.xml Thu Mar 25 18:18:23 2010 +0000 @@ -108,7 +108,7 @@ - + diff -r 1b444ea0baec -r 924ab6786b2f sbsv2/raptor/lib/config/msvc.xml --- a/sbsv2/raptor/lib/config/msvc.xml Thu Mar 25 14:43:35 2010 +0000 +++ b/sbsv2/raptor/lib/config/msvc.xml Thu Mar 25 18:18:23 2010 +0000 @@ -1,11 +1,11 @@ - + - + @@ -17,8 +17,14 @@ + + + + + + @@ -56,9 +62,6 @@ - - - diff -r 1b444ea0baec -r 924ab6786b2f sbsv2/raptor/lib/config/rvct.xml --- a/sbsv2/raptor/lib/config/rvct.xml Thu Mar 25 14:43:35 2010 +0000 +++ b/sbsv2/raptor/lib/config/rvct.xml Thu Mar 25 18:18:23 2010 +0000 @@ -1,68 +1,62 @@ - + + + + + + + + + - - - - - + + + - + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + - - - - - - - - - - - - + + + @@ -71,25 +65,35 @@ + - + - + + + + + + + + + + + + - - + - @@ -100,6 +104,7 @@ - + + diff -r 1b444ea0baec -r 924ab6786b2f sbsv2/raptor/lib/config/variants.xml --- a/sbsv2/raptor/lib/config/variants.xml Thu Mar 25 14:43:35 2010 +0000 +++ b/sbsv2/raptor/lib/config/variants.xml Thu Mar 25 18:18:23 2010 +0000 @@ -79,37 +79,40 @@ - + + - + + - + + - - - + + + - + @@ -130,13 +133,13 @@ - - - + + + - + @@ -160,13 +163,13 @@ - - - + + + - + diff -r 1b444ea0baec -r 924ab6786b2f sbsv2/raptor/lib/config/winscw.xml --- a/sbsv2/raptor/lib/config/winscw.xml Thu Mar 25 14:43:35 2010 +0000 +++ b/sbsv2/raptor/lib/config/winscw.xml Thu Mar 25 18:18:23 2010 +0000 @@ -1,24 +1,31 @@ - + - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - + @@ -45,97 +52,96 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - - - + + + - - + + - - + + diff -r 1b444ea0baec -r 924ab6786b2f sbsv2/raptor/lib/flm/e32abiv2.flm --- a/sbsv2/raptor/lib/flm/e32abiv2.flm Thu Mar 25 14:43:35 2010 +0000 +++ b/sbsv2/raptor/lib/flm/e32abiv2.flm Thu Mar 25 18:18:23 2010 +0000 @@ -553,8 +553,7 @@ # Targettype is some type of DLL or EXE (or derivative) ifneq ($(LINK_TARGET),) -escaped_located_ARMLIBS:=$(foreach L,$(ARMLIBS),$(call ruleEscape,$(wildcard $(subst $(CHAR_SPACE),?,$(RVCTLIB)/*/$(L))))) -quoted_located_ARMLIBS:=$(foreach L,$(ARMLIBS),$(call dblquoteitem,$(wildcard $(RVCTLIB)/*/$(L)))) +located_ARMLIBS:=$(foreach L,$(ARMLIBS),$(wildcard $(RVCTLIB)/*/$(L))) located_STATICLIBRARIES:=$(foreach L,$(STATICLIBRARY),$(STATIC_LIBRARY_DIR)/$(L).lib) e32abiv2_LIBS:=$(EXPTARGET) $(LINKER_STUB_LIBRARY) $(if $(STATIC_RUNTIME_LIB),$(STATIC_RUNTIME_DIR)/$(STATIC_RUNTIME_LIB),) $(located_STATICLIBRARIES) # DLLS and EXEs - These objects are linked by a linker @@ -567,12 +566,10 @@ REDUCED_RUNTIME_LIBS_LIST:=$(subst $(TARGET).dso,,$(RUNTIME_LIBS_LIST)) ifeq ($(VARIANTTYPE),udeb) - e32abiv2_LIBS:=$(e32abiv2_LIBS) $(addprefix $(IMPORTLIBPATH)/,$(LIBRARY_DEBUG)) $(addprefix $(RUNTIME_LIBS_PATH)/,$(REDUCED_RUNTIME_LIBS_LIST)) + e32abiv2_LIBS:=$(e32abiv2_LIBS) $(addprefix $(IMPORTLIBPATH)/,$(LIBRARY_DEBUG)) $(addprefix $(RUNTIME_LIBS_PATH)/,$(REDUCED_RUNTIME_LIBS_LIST)) $(located_ARMLIBS) else - e32abiv2_LIBS:=$(e32abiv2_LIBS) $(addprefix $(IMPORTLIBPATH)/,$(LIBRARY)) $(addprefix $(RUNTIME_LIBS_PATH)/,$(REDUCED_RUNTIME_LIBS_LIST)) + e32abiv2_LIBS:=$(e32abiv2_LIBS) $(addprefix $(IMPORTLIBPATH)/,$(LIBRARY)) $(addprefix $(RUNTIME_LIBS_PATH)/,$(REDUCED_RUNTIME_LIBS_LIST)) $(located_ARMLIBS) endif -quoted_e32abiv2_LIBS=$(e32abiv2_LIBS) $(quoted_located_ARMLIBS) -escaped_e32abiv2_LIBS=$(e32abiv2_LIBS) $(escaped_located_ARMLIBS) else # NORMAL @@ -585,19 +582,16 @@ ifeq ($(HAS_DEDICATED_OP_NEWDEL_LIB),1) e32abiv2_LIBS:=$(e32abiv2_LIBS) $(addprefix $(RUNTIME_LIBS_PATH)/,$(NEWLIB)) endif -quoted_e32abiv2_LIBS:=$(e32abiv2_LIBS) $(addprefix $(RUNTIME_LIBS_PATH)/,$(RUNTIME_LIBS_LIST)) $(call addquotedprefix,$(STATIC_LIBS_PATH)/,$(STATIC_LIBS_LIST)) $(quoted_located_ARMLIBS) -escaped_e32abiv2_LIBS:=$(e32abiv2_LIBS) $(addprefix $(RUNTIME_LIBS_PATH)/,$(RUNTIME_LIBS_LIST)) $(addprefix $(call ruleEscape,$(STATIC_LIBS_PATH)/),$(STATIC_LIBS_LIST)) $(escaped_located_ARMLIBS) +e32abiv2_LIBS:=$(e32abiv2_LIBS) $(addprefix $(RUNTIME_LIBS_PATH)/,$(RUNTIME_LIBS_LIST)) $(addprefix $(STATIC_LIBS_PATH)/,$(STATIC_LIBS_LIST)) $(located_ARMLIBS) endif else # ARM RUNTIME LIBS ifeq ($(VARIANTTYPE),udeb) - e32abiv2_LIBS:=$(e32abiv2_LIBS) $(addprefix $(IMPORTLIBPATH)/,$(LIBRARY_DEBUG)) + e32abiv2_LIBS:=$(e32abiv2_LIBS) $(addprefix $(IMPORTLIBPATH)/,$(LIBRARY_DEBUG)) $(located_ARMLIBS) else - e32abiv2_LIBS:=$(e32abiv2_LIBS) $(addprefix $(IMPORTLIBPATH)/,$(LIBRARY)) + e32abiv2_LIBS:=$(e32abiv2_LIBS) $(addprefix $(IMPORTLIBPATH)/,$(LIBRARY)) $(located_ARMLIBS) endif -quoted_e32abiv2_LIBS=$(e32abiv2_LIBS) $(quoted_located_ARMLIBS) -escaped_e32abiv2_LIBS=$(e32abiv2_LIBS) $(escaped_located_ARMLIBS) endif # NOTE: the groupin10 macro must be used before a call to the "startrule" macro @@ -607,7 +601,7 @@ # outside the relevant tags but it is also unavoidable. define linktarget_func ## The actual link target, dependencies and build step -$(E32TARGET): $(POSTLINKDEFFILE) $(ELF2E32) $(if $(MULTIFILE_ENABLED),$(MULTIFILEOBJECT) $(CIAFILES_LINKOBJECTS),$(LINKOBJECTS)) $(escaped_e32abiv2_LIBS) $(LINKER_ENTRYPOINT_LIBDEP) $(if $(SUPPORTS_STDCPP_NEWLIB),$(CHECKLIB)) $(if $(LINKERFEEDBACK_STAGE2),$(FEEDBACKFILE),) $(if $(HAVE_ORDERONLY),|,) $(EPOCROOT)/epoc32/build/TEM_LIB +$(E32TARGET): $(POSTLINKDEFFILE) $(ELF2E32) $(if $(MULTIFILE_ENABLED),$(MULTIFILEOBJECT) $(CIAFILES_LINKOBJECTS),$(LINKOBJECTS)) $(e32abiv2_LIBS) $(LINKER_ENTRYPOINT_LIBDEP) $(if $(SUPPORTS_STDCPP_NEWLIB),$(CHECKLIB)) $(if $(LINKERFEEDBACK_STAGE2),$(FEEDBACKFILE),) $(if $(HAVE_ORDERONLY),|,) $(EPOCROOT)/epoc32/build/TEM_LIB $(if $(MULTIFILE_ENABLED),,@echo -n "" > $(VIAFILE); $(call groupin10,$(LINKOBJECTS)) ;) $(call startrule,linkandpostlink) \ @@ -627,7 +621,7 @@ $(if $(MULTIFILE_ENABLED),$(call dblquote,$(MULTIFILEOBJECT) $(CIAFILES_LINKOBJECTS)),$(COMMANDFILE_OPTION)$(call dblquote,$(VIAFILE))) \ $(if $(GENERATELINKERFEEDBACK),$(FEEDBACK_OPTION)$(call dblquote,$(FEEDBACKFILE))) \ $(if $(LINKER_ADD_STATIC_RUNTIME),$(if $(STATIC_RUNTIME_LIB),$(LINKER_GROUP_START_OPTION) $(STATIC_RUNTIME_DIR)/$(STATIC_RUNTIME_LIB) $(LINKER_GROUP_END_OPTION),)) \ - $(quoted_e32abiv2_LIBS) $(LINKER_DEFAULT_LIBS) && \ + $(call dblquote,$(e32abiv2_LIBS)) $(LINKER_DEFAULT_LIBS) && \ $(ELF2E32) \ --sid=0x$(if $(SID),$(SID),$(if $(UID3),$(UID3),0)) \ --version=$(VERSION) \ @@ -768,7 +762,7 @@ $(if $(USE_PROFILER_FEEDBACK),--profile=$(call dblquote,$(ARM_PROFILER_FILE)),) \ $(call makemacrodef,-D,$(COMPILER_INTERWORK_DEFINES) $(CDEFS)) \ $(if $(PREINCLUDE),$(PREINCLUDE_OPTION) ,)$(call concat, $(PREINCLUDE_OPTION) ,$(call dblquote,$(PREINCLUDE)))\ - $(if $(SET_ARMINC),$(if $(RVCTINC),$(COMPILER_SYSTEM_INCLUDE_OPTION)$(call dblquoteitem,$(RVCTINC)),),) \ + $(if $(SET_ARMINC),$(if $(RVCTINC),$(COMPILER_SYSTEM_INCLUDE_OPTION)$(call dblquote,$(RVCTINC)),),) \ $(COMPILER_SYSTEM_INCLUDE_OPTION)$$(call dblquote,$$( +#include +#include + +RESOURCE RSS_SIGNATURE { } + +RESOURCE TBUF { buf=""; } +RESOURCE TBUF r_example_text_plug { buf="plug"; } diff -r 1b444ea0baec -r 924ab6786b2f sbsv2/raptor/test/smoke_suite/test_resources/simple_plugin/plugin3.mmp --- a/sbsv2/raptor/test/smoke_suite/test_resources/simple_plugin/plugin3.mmp Thu Mar 25 14:43:35 2010 +0000 +++ b/sbsv2/raptor/test/smoke_suite/test_resources/simple_plugin/plugin3.mmp Thu Mar 25 18:18:23 2010 +0000 @@ -12,7 +12,7 @@ * Contributors: * * Description: -* Example ECOMP plugin3 component, with no UID listed +* Example ECOM plugin3 component, with no UID listed * */ @@ -24,6 +24,10 @@ VENDORID 0x70000001 SOURCEPATH . SOURCE plugin.cpp -SYSTEMINCLUDE /epoc32/include -SYSTEMINCLUDE /epoc32/include/ecom +SYSTEMINCLUDE /epoc32/include +SYSTEMINCLUDE /epoc32/include/ecom +SYSTEMINCLUDE /epoc32/include/techview LIBRARY euser.lib apmime.lib efsrv.lib + +START RESOURCE plugin3.rss +END diff -r 1b444ea0baec -r 924ab6786b2f sbsv2/raptor/test/smoke_suite/test_resources/simple_plugin/plugin3.rss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/test/smoke_suite/test_resources/simple_plugin/plugin3.rss Thu Mar 25 18:18:23 2010 +0000 @@ -0,0 +1,28 @@ +/* +* 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: +* Dummy ECOM resource file +* +*/ + +NAME PLG3 + +#include +#include +#include + +RESOURCE RSS_SIGNATURE { } + +RESOURCE TBUF { buf=""; } +RESOURCE TBUF r_example_text_plug3 { buf="plug3"; } diff -r 1b444ea0baec -r 924ab6786b2f sbsv2/raptor/test/unit_suite/generic_path_unit.py --- a/sbsv2/raptor/test/unit_suite/generic_path_unit.py Thu Mar 25 14:43:35 2010 +0000 +++ b/sbsv2/raptor/test/unit_suite/generic_path_unit.py Thu Mar 25 18:18:23 2010 +0000 @@ -1,5 +1,5 @@ # -# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +# Copyright (c) 2009-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" @@ -136,6 +136,21 @@ path6 = generic_path.Path("m:/") self.assertEqual(str(path6), "m:") + # SpaceSafePath + + epocroot = os.path.abspath(os.environ.get('EPOCROOT')).replace('\\','/').rstrip('/') + pathwithspaces = epocroot+"/epoc32/build/Program Files/Some tool installed with spaces/no_spaces/s p c/no_more_spaces" + path7 = generic_path.Path(pathwithspaces) + + # SpaceSafe paths on Windows are 8.3 format, and these can only be deduced if they actually exist. + os.makedirs(pathwithspaces) + spacesafe = path7.GetSpaceSafePath() + self.assertTrue(spacesafe.endswith("PROGRA~1/SOMETO~1/NO_SPA~1/SPC~1/NO_MOR~1")) + + os.removedirs(pathwithspaces) + spacesafe = path7.GetSpaceSafePath() + self.assertEqual(spacesafe, None) + def testClassLinux(self): if self.isWin32(): @@ -173,6 +188,15 @@ path = generic_path.Path("some/thing/") self.assertEqual(str(path), "some/thing") + # SpaceSafePath + + # This doesn't mean much on non-Windows platforms, but we confirm nothing breaks if it is used + pathwithspaces = "/Program Files/Some tool installed with spaces/no_spaces/s p c/no_more_spaces" + path2 = generic_path.Path(pathwithspaces) + + spacesafe = path2.GetSpaceSafePath() + self.assertEqual(spacesafe, None) + # run all the tests diff -r 1b444ea0baec -r 924ab6786b2f sbsv2/raptor/test/unit_suite/raptor_data_unit.py --- a/sbsv2/raptor/test/unit_suite/raptor_data_unit.py Thu Mar 25 14:43:35 2010 +0000 +++ b/sbsv2/raptor/test/unit_suite/raptor_data_unit.py Thu Mar 25 18:18:23 2010 +0000 @@ -1,5 +1,5 @@ # -# Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). +# Copyright (c) 2006-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" @@ -21,6 +21,7 @@ import raptor import raptor_cache import raptor_data +import sys import unittest class TestRaptorData(unittest.TestCase): @@ -35,6 +36,8 @@ self.envStack[name] = os.environ[name] os.environ[name] = value + def isWin(self): + return 'win' in raptor.hostplatform def RestoreEnv(self, name): # put environment back to its state before SetEnv @@ -355,7 +358,9 @@ self.assertEqual(varcfg, "/C/variant/variant.cfg") def testProblematicEnvironment(self): - # ask for environment variable values that will break makefile parsing due to + aRaptor = raptor.Raptor() + + # 1: ask for environment variable values that will break makefile parsing due to # backslashes forming line continuation characters self.SetEnv("ENVVAR_BSLASH_END1", "C:\\test1a\\;C:\\test1b\\") self.SetEnv("ENVVAR_BSLASH_END2", "C:\\test2a\\;C:\\test2b\\\\") @@ -365,7 +370,6 @@ var.AddOperation(raptor_data.Env("ENVVAR_BSLASH_END2")) var.AddOperation(raptor_data.Env("ENVVAR_BSLASH_END3")) - aRaptor = raptor.Raptor() eval = aRaptor.GetEvaluator(None, var.GenerateBuildUnits(aRaptor.cache)[0]) self.RestoreEnv("ENVVAR_BSLASH_END1") self.RestoreEnv("ENVVAR_BSLASH_END2") @@ -379,6 +383,75 @@ value = eval.Get("ENVVAR_BSLASH_END3") self.assertEqual(value, "C:\\test3a\\;C:\\test3b\\\\\\\\") + + # 2: check 'tool' and 'toolchain' type environment variable values for correct behaviour when paths contain spaces + # this is different depending on host OS platform and whether or not the paths/tools actually exist + epocroot = os.path.abspath(os.environ.get('EPOCROOT')).replace('\\','/').rstrip('/') + pathwithspaces = epocroot+"/epoc32/build/Program Files/Some tool installed with spaces/no_spaces/s p c/no_more_spaces" + toolwithspaces = pathwithspaces+"/testtool.exe" + self.SetEnv("ENVVAR_TOOL_WITH_SPACES", toolwithspaces) + self.SetEnv("ENVVAR_TOOLCHAINPATH_WITH_SPACES", pathwithspaces) + toolVar = raptor_data.Variant("tool.var") + toolchainpathVar = raptor_data.Variant("toolchainpath.var") + toolVar.AddOperation(raptor_data.Env("ENVVAR_TOOL_WITH_SPACES", "", "tool")) + toolchainpathVar.AddOperation(raptor_data.Env("ENVVAR_TOOLCHAINPATH_WITH_SPACES", "", "toolchainpath")) + invalidValueException = "the environment variable %s is incorrect - it is a '%s' type but contains spaces that cannot be neutralised:" + + # 2a: paths/tools exist - on Windows we expect 8.3 paths post-evaluation, on all other platforms error exceptions + os.makedirs(pathwithspaces) + testtool = open(toolwithspaces,'wb') + testtool.close() + + exceptionText = "" + value = "" + try: + eval = aRaptor.GetEvaluator(None, toolVar.GenerateBuildUnits(aRaptor.cache)[0]) + value = eval.Get("ENVVAR_TOOL_WITH_SPACES") + except Exception, e: + exceptionText = str(e) + + if self.isWin(): + self.assertTrue(value) + self.assertFalse(' ' in value) + else: + self.assertTrue(exceptionText.startswith(invalidValueException % ("ENVVAR_TOOL_WITH_SPACES", "tool"))) + + exceptionText = "" + value = "" + try: + eval = aRaptor.GetEvaluator(None, toolchainpathVar.GenerateBuildUnits(aRaptor.cache)[0]) + value = eval.Get("ENVVAR_TOOLCHAINPATH_WITH_SPACES") + except Exception, e: + exceptionText = str(e) + + if self.isWin(): + self.assertTrue(value) + self.assertFalse(' ' in value) + else: + self.assertTrue(exceptionText.startswith(invalidValueException % ("ENVVAR_TOOLCHAINPATH_WITH_SPACES", "toolchainpath"))) + + # 2b: paths/tools don't exist - should throw error exceptions on all platforms as 8.3 paths are only available + # for use if a path/tool exists + os.remove(toolwithspaces) + os.removedirs(pathwithspaces) + + exceptionText = "" + try: + eval = aRaptor.GetEvaluator(None, toolVar.GenerateBuildUnits(aRaptor.cache)[0]) + except Exception, e: + exceptionText = str(e) + self.assertTrue(exceptionText.startswith(invalidValueException % ("ENVVAR_TOOL_WITH_SPACES", "tool"))) + + exceptionText = "" + try: + eval = aRaptor.GetEvaluator(None, toolchainpathVar.GenerateBuildUnits(aRaptor.cache)[0]) + except Exception, e: + exceptionText = str(e) + self.assertTrue(exceptionText.startswith(invalidValueException % ("ENVVAR_TOOLCHAINPATH_WITH_SPACES", "toolchainpath"))) + + # clean-up + self.RestoreEnv("ENVVAR_TOOL_WITH_SPACES") + self.RestoreEnv("ENVVAR_TOOLCHAINPATH_WITH_SPACES") def testMissingEnvironment(self): # ask for an environment variable that is not set