Пример #1
0
	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
from core.plugins.python.PyLintChecker import PyLintChecker
import os

build, project = BuildProject( name = 'Make-O-Matic', version = '0.5.0',
								versionName = 'French Fries', url = 'git://github.com/KDAB/Make-O-Matic.git' )

# add a preprocessor that generates the Doxygen input file
prep = Preprocessor( project, inputFilename = PathResolver( project.getSourceDir, 'doxygen.cfg.in' ),
					 outputFilename = PathResolver( project.getTempDir, 'doxygen.cfg' ) )
project.addPlugin( prep )
footer = Preprocessor( project, inputFilename = PathResolver( project.getSourceDir, 'doxygen-footer.html.in' ),
					 outputFilename = PathResolver( project.getTempDir, 'doxygen-footer.html' ) )
project.addPlugin( footer )

# add a doxygen generator
dox = DoxygenGenerator()
dox.setOptional( True )
dox.setDoxygenFile( prep.getOutputFilename() )
project.addPlugin( dox )

# set up configurations:
# python3 = Configuration( 'Python 3', project )
python2 = PythonConfiguration( 'Python 2', executable = 'python', parent = project )
python2.addPlugin( PyUnitTester( testprogram = PathResolver( project.getSourceDir, os.path.join( 'mom', 'tests', 'testsuite_selftest.py' ) ) ) )

pylint = PyLintChecker( pyLintTool = 'pylint-2.6',
	pyLintRcFile = PathResolver( project.getSourceDir, 'pylintrc' ),
	htmlOutputPath = PathResolver( project.getDocsDir, 'pylint.html' ),
	modules = [ 'core', 'buildcontrol', 'tools', 'tests' ],
	minimumSuccessRate = 0.75
	)