fix for broken cpp location wip
authorRichard Taylor <richard.i.taylor@nokia.com>
Thu, 03 Dec 2009 14:59:48 +0000
branchwip
changeset 32 fdfc59a2ae7e
parent 31 c7bbe0e983d3
child 33 cd30ec3d0567
child 34 caba71c57a0f
child 62 8b2e679a0122
child 80 cc878ffa65f3
fix for broken cpp location
sbsv2/raptor/python/raptor_meta.py
sbsv2/raptor/test/unit_suite/raptor_meta_unit.py
--- a/sbsv2/raptor/python/raptor_meta.py	Thu Dec 03 14:26:46 2009 +0000
+++ b/sbsv2/raptor/python/raptor_meta.py	Thu Dec 03 14:59:48 2009 +0000
@@ -297,9 +297,8 @@
 	def call(self, aArgs, sourcefilename):
 		""" Override call so that we can do our own error handling."""
 		tool = self._ExternalTool__Tool
+		commandline = tool + " " + aArgs + " " + str(sourcefilename)
 		try:
-			commandline = tool + " " + aArgs + " " + str(sourcefilename)
-
 			# the actual call differs between Windows and Unix
 			if raptor_utilities.getOSFileSystem() == "unix":
 				p = subprocess.Popen(commandline, \
@@ -345,7 +344,7 @@
 				raise MetaDataError("Errors in %s" % str(sourcefilename))
 
 		except Exception,e:
-			raise MetaDataError("Preprocessor exception: %s" % str(e))
+			raise MetaDataError("Preprocessor exception: '%s' : in command : '%s'" % (str(e), commandline))
 
 		return 0	# all OK
 
--- a/sbsv2/raptor/test/unit_suite/raptor_meta_unit.py	Thu Dec 03 14:26:46 2009 +0000
+++ b/sbsv2/raptor/test/unit_suite/raptor_meta_unit.py	Thu Dec 03 14:59:48 2009 +0000
@@ -141,12 +141,10 @@
 		
 		# Get the version of CPP that we are using and hope it's correct
 		# since there is no tool check.
-		if raptor_utilities.getOSFileSystem() == "cygwin":
-			self.__gnucpp = os.environ[raptor.env] + "/win32/bv/bin/cpp" 
+		if os.environ.has_key('SBS_GNUCPP'):
+			self.__gnucpp = os.environ['SBS_GNUCPP']
 		else: 
 			self.__gnucpp = "cpp" 
-		if os.environ.has_key('GNUCPP'):
-			self.__gnucpp = os.environ['GNUCPP']
 	
 	def testPreProcessor(self):
 		# Just test for correct behaviour on failure, other tests excercise correct behaviour on success