コード例 #1
0
	def testConfigParsing(self):
		# .cfg file specified, but does not exist		
		try:
			configDetails = raptor_meta.getVariantCfgDetail(self.__epocroot, 
														    self.__variant_cfg_root.Append("missing"))
		except Exception, e:
			self.assertTrue(isinstance(e, raptor_meta.MetaDataError))
			self.assertTrue(re.match('^Could not read variant configuration file.*$', e.Text))
コード例 #2
0
		except Exception, e:
			self.assertTrue(isinstance(e, raptor_meta.MetaDataError))
			self.assertTrue(re.match('^Preprocessor exception', e.Text))

	def testConfigParsing(self):
		# .cfg file specified, but does not exist		
		try:
			configDetails = raptor_meta.getVariantCfgDetail(self.__epocroot, 
														    self.__variant_cfg_root.Append("missing"))
		except Exception, e:
			self.assertTrue(isinstance(e, raptor_meta.MetaDataError))
			self.assertTrue(re.match('^Could not read variant configuration file.*$', e.Text))
			
		# No .hrh file specified
		try:
			configDetails = raptor_meta.getVariantCfgDetail(self.__epocroot,
														    self.__variant_cfg_root.Append("empty_cfg.cfg"))
		except Exception, e:
			self.assertTrue(isinstance(e, raptor_meta.MetaDataError))
			self.assertTrue(re.match('No variant file specified in .*', e.Text))
					
		# .hrh file does not exist
		try:
			configDetails = raptor_meta.getVariantCfgDetail(self.__epocroot,
														    self.__variant_cfg_root.Append("invalid_cfg.cfg"))
		except Exception, e:
			self.assertTrue(isinstance(e, raptor_meta.MetaDataError))
			self.assertTrue(re.match('Variant file .* does not exist', e.Text))
				
		# Valid .cfg file
		configDetails = raptor_meta.getVariantCfgDetail(self.__epocroot, 
													    self.__variant_cfg)