def setUp( self, useScm = False, useEnvironments = False ):
		MomTestCase.setUp( self, False )

		sys.argv = [] # reset command line arguments

		build = Build( name = 'XmlReportTestBuild' )
		project = Project( 'XmlReportTestProject' )
		build.setProject( project )

		if useScm:
			project.createScm( 'git://github.com/KDAB/Make-O-Matic.git' )

		if useEnvironments:
			environments = Environments( [ 'dep-a-1.?.0' ], 'Test dependency', project )
		else:
			environments = Environments()

		# add some plugin
		dox = DoxygenGenerator()
		dox.setEnabled( False )
		project.addPlugin( dox )

		# add some configurations
		Configuration( 'Debug', environments )
		Configuration( 'Release', environments )

		build.getSettings().set( Settings.EnvironmentsBaseDir, self.TEST_MOM_ENVIRONMENTS )

		self.build = build
		self.project = project
		self.cwd = os.getcwd()
示例#2
0
	def tearDown( self ):
		MomTestCase.tearDown( self )

		# make sure config content stayed the same
		if self.DatabaseChecksum:
			self.assertEqual( self.DatabaseChecksum, md5sum( self._getSimpleCiDatabaseFilename() ),
					"Database changed during tests run." )

		os.chdir( self.CurrentDirectory )
		removeDirectories = glob.glob( "make-o-matic*" )
		removeDirectories.extend( glob.glob( "builds" ) )
		removeDirectories.append( self._getSimpleCiDataDir( SimpleCITests.TestInstanceName ) )
		for directory in removeDirectories:
			rmtree( directory )
示例#3
0
	def setUp( self ):
		MomTestCase.setUp( self )

		self.analyzer = _MyAnalyzer()
示例#4
0
	def setUp( self ):
		MomTestCase.setUp( self )
		if sys.platform == 'win32':
			self.sleepCommand = [ 'ping', '127.0.0.1', '-n', '3' ]
		else:
			self.sleepCommand = [ 'sleep', '3']
	def tearDown( self ):
		MomTestCase.tearDown( self )
		rmtree( "make-o-matic" )
	def setUp( self ):
		MomTestCase.setUp( self )
		self.iface = BuildScriptInterface( BuildScriptInterfaceTests.BuildScriptName )
	def setUp( self ):
		MomTestCase.setUp( self, False )
		self.tester = PyUnitTester( sys.executable ) # just use the executable, not used anyway
示例#8
0
	def setUp( self ):
		MomTestCase.setUp( self )

		# save current database checksum for later comparison, check if database file exists (e.g. at first run)
		if os.path.exists( self._getSimpleCiDatabaseFilename() ):
			self.DatabaseChecksum = md5sum( self._getSimpleCiDatabaseFilename() )
	def tearDown( self ):
		MomTestCase.tearDown( self )
		removeDirectories = glob.glob( "make-o-matic*" )
		for directory in removeDirectories:
			rmtree( directory )
示例#10
0
	def tearDown( self ):
		MomTestCase.tearDown( self )
示例#11
0
	def tearDown( self ):
		MomTestCase.tearDown( self )
		os.chdir( self.cwd )
		rmtree( "xmlreporttestbuild" )