本文整理汇总了Python中cx.utils.cxPrintFormatter.PrintFormatter.printHeader方法的典型用法代码示例。如果您正苦于以下问题:Python PrintFormatter.printHeader方法的具体用法?Python PrintFormatter.printHeader怎么用?Python PrintFormatter.printHeader使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cx.utils.cxPrintFormatter.PrintFormatter
的用法示例。
在下文中一共展示了PrintFormatter.printHeader方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: buildAllComponents
# 需要导入模块: from cx.utils.cxPrintFormatter import PrintFormatter [as 别名]
# 或者: from cx.utils.cxPrintFormatter.PrintFormatter import printHeader [as 别名]
def buildAllComponents(self):
self.assembly.controlData.printSettings()
PrintFormatter.printHeader('Build all components', level=2)
self.assembly.selectAllLibraries()
self.assembly.process(checkout=True,
configure=True,
build=True)
示例2: runCatch
# 需要导入模块: from cx.utils.cxPrintFormatter import PrintFormatter [as 别名]
# 或者: from cx.utils.cxPrintFormatter.PrintFormatter import printHeader [as 别名]
def runCatch(self, path, tag, outpath=None, outfile=None):
'Run all Catch tests at path and write them in junit xml format to outfile'
if not outfile:
baseName = self._createCatchBaseFilenameFromTag(tag)
outfile = '%s/%s.junit.xml' % (outpath, baseName)
PrintFormatter.printInfo('Run catch with tag %s, results to %s' % (tag, outfile))
shell.changeDir(path)
shell.rm_r(outfile)
exe = self._getCatchExecutable(path)
if(platform.system() == 'Windows'):
cmd = 'set_run_environment.bat %s %s --reporter junit --out %s' % (exe, tag, outfile)
else:
cmd = '%s %s --reporter junit --out %s' % (exe, tag, outfile)
result = shell.run(cmd, ignoreFailure=True, keep_output=True)
if result.returncode >= 0:
PrintFormatter.printInfo('catch reported %s failing tests' % result.returncode)
# if result.returncode < 0:
if self._catch_has_failed(result):
PrintFormatter.printInfo('catch failed with returncode %s' % result.returncode)
PrintFormatter.printInfo('Removing outfile %s' % outfile)
shell.rm_r(outfile)
PrintFormatter.printHeader('Analyzing catch failure', 2)
PrintFormatter.printInfo('Running catch tests wrapped in ctest.')
PrintFormatter.printInfo('This should identify crashing tests.')
self.runCatchTestsWrappedInCTestGenerateJUnit(tag, path, outpath)
示例3: clearTestData
# 需要导入模块: from cx.utils.cxPrintFormatter import PrintFormatter [as 别名]
# 或者: from cx.utils.cxPrintFormatter.PrintFormatter import printHeader [as 别名]
def clearTestData(self):
PrintFormatter.printHeader('Clearing all old test data', level=3)
cxData = self._createComponent(cxComponents.CustusXData)
#custusx = self._createComponent(cxComponents.CustusX)
testRunner = self._getTestRunner()
testRunner.resetCustusXDataRepo(cxData.sourcePath())
testRunner.removeResultFiles(outPath=self._getTestResultsPath())
示例4: testInstallation
# 需要导入模块: from cx.utils.cxPrintFormatter import PrintFormatter [as 别名]
# 或者: from cx.utils.cxPrintFormatter.PrintFormatter import printHeader [as 别名]
def testInstallation(self):
PrintFormatter.printHeader('Test installation', level=2)
appPath = self._getInstalledBinaryPath()
self._testExecutable(appPath, 'Catch', '-h')
self._testExecutable(appPath, self.system_base_name) # defaults to CustusX
self._testExecutable(appPath, 'OpenIGTLinkServer')
self._testExecutable(appPath, 'LogConsole')
示例5: publishCoverageInfo
# 需要导入模块: from cx.utils.cxPrintFormatter import PrintFormatter [as 别名]
# 或者: from cx.utils.cxPrintFormatter.PrintFormatter import printHeader [as 别名]
def publishCoverageInfo(self, targetFolder):
PrintFormatter.printHeader('Publish Coverage Info to server', level=2)
target = self.assembly.controlData.publish_coverage_info_target
custusx = self._createComponent(cxComponents.CustusX)
source = '%s/gcov/coverage_info' % self.assembly.controlData.getRootDir()
target_path = '%s/%s' % (target.path, targetFolder)
self.publish(source, target.server, target.user, target_path)
示例6: try_job_release
# 需要导入模块: from cx.utils.cxPrintFormatter import PrintFormatter [as 别名]
# 或者: from cx.utils.cxPrintFormatter.PrintFormatter import printHeader [as 别名]
def try_job_release(self):
'''
Create a tagged release and publish to server.
Build, run all tests, publish binaries and
documentation to the web server.
Requires a git_tag as input.
Assumed to be run on the release branch (should work OK on others as well)
'''
if self.options.job_release_I:
PrintFormatter.printHeader('Building release for tag "%s"' % self.controlData().git_tag, 1);
if self.is_main_build():
self.controlData().build_developer_doc = True
self.controlData().build_user_doc = True
self.resetInstallerStep()
self.createUnitTestedPackageStep()
self.integrationTestPackageStep(skip_extra_install_step_checkout=True)
self.cxBuilder.finish()
if self.options.job_release_II:
targetFolder = self.cxInstaller.getTaggedFolderName()
PrintFormatter.printHeader('Creating and publishing release for tag "%s"' % self.controlData().git_tag, 1);
if targetFolder != self.controlData().git_tag:
PrintFormatter.printInfo("Warning: Target folder [%s] not equal to controldata tag [%s]" % (targetFolder, self.controlData().git_tag) )
self.publishTaggedRelease()
if self.is_main_build():
self.publishTaggedDocumentation()
self.cxBuilder.finish()
示例7: removePreviousJob
# 需要导入模块: from cx.utils.cxPrintFormatter import PrintFormatter [as 别名]
# 或者: from cx.utils.cxPrintFormatter.PrintFormatter import printHeader [as 别名]
def removePreviousJob(self):
'remove all stuff from previous run of the installer'
PrintFormatter.printHeader('Removing files from previous install', 3)
shell.rm_r('%s/%s' % (self.install_root, self.system_base_name))
shell.rm_r('%s/%s*.%s' % (self.installer_path, self.system_base_name, self._getInstallerPackageSuffix()))
shell.removeTree('%s/temp/Install' % self.root_dir)
shell.removeTree('%s/%s' % (self.install_root, self.system_base_name))
示例8: runCatchTestsWrappedInCTest
# 需要导入模块: from cx.utils.cxPrintFormatter import PrintFormatter [as 别名]
# 或者: from cx.utils.cxPrintFormatter.PrintFormatter import printHeader [as 别名]
def runCatchTestsWrappedInCTest(self, tag):
PrintFormatter.printHeader('Run catch tests wrapped in ctest', level=2)
custusx = self._createComponent(cxComponents.CustusX)
appPath = '%s/bin' % custusx.buildPath()
outpath = self._getTestResultsPath()
testRunner = self._getTestRunner()
testRunner.runCatchTestsWrappedInCTestGenerateJUnit(tag, appPath, outpath)
示例9: publishUserDocs
# 需要导入模块: from cx.utils.cxPrintFormatter import PrintFormatter [as 别名]
# 或者: from cx.utils.cxPrintFormatter.PrintFormatter import printHeader [as 别名]
def publishUserDocs(self, targetFolder):
PrintFormatter.printHeader('Publish User Docs to server', level=2)
target = self.assembly.controlData.publish_user_documentation_target
custusx = self._createComponent(cxComponents.CustusX)
source = '%s/doc/html_pure' % custusx.buildPath()
target_path = '%s/%s' % (target.path, targetFolder)
self.publish(source, target.server, target.user, target_path)
示例10: runCatchTests
# 需要导入模块: from cx.utils.cxPrintFormatter import PrintFormatter [as 别名]
# 或者: from cx.utils.cxPrintFormatter.PrintFormatter import printHeader [as 别名]
def runCatchTests(self, tag):
PrintFormatter.printHeader('Run catch tests using tag %s' % tag, level=3)
# Run all Catch tests and write them in xml format to ./Catch.<tagname>.TestResults.xml
custusx = self._createComponent(cxComponents.CustusX)
catchDir = '%s/bin' % custusx.buildPath()
outpath = self._getTestResultsPath()
self._getTestRunner().runCatch(catchDir, tag=tag, outpath=outpath)
示例11: _operation
# 需要导入模块: from cx.utils.cxPrintFormatter import PrintFormatter [as 别名]
# 或者: from cx.utils.cxPrintFormatter.PrintFormatter import printHeader [as 别名]
def _operation(self, lib, methodname):
#print '\n================== %s %s========================' % (methodname, lib.name())
#print '\n%s %-*s %s' % ('='*20, 20, methodname + " " + lib.name(), '='*20)
text = methodname+" "+lib.name()
PrintFormatter.printHeader(text)
# print '\n%s %s' % ('='*20, " %s ".ljust(60, '=')%text)
method = getattr(lib, methodname)
method()
示例12: publishUserDocs
# 需要导入模块: from cx.utils.cxPrintFormatter import PrintFormatter [as 别名]
# 或者: from cx.utils.cxPrintFormatter.PrintFormatter import printHeader [as 别名]
def publishUserDocs(self, artefactFolder, targetFolder):
PrintFormatter.printHeader('Publish User Docs to server', level=2)
source = '%s/html_pure' % artefactFolder
if not os.path.exists(source):
PrintFormatter.printInfo("Warning folder don't exist: [%s]" % source)
target = self.assembly.controlData.publish_user_documentation_target
custusx = self._createComponent(cxComponents.CustusX)
target_path = '%s/%s' % (target.path, targetFolder)
self.publish(source, target.server, target.user, target_path)
示例13: installPackage
# 需要导入模块: from cx.utils.cxPrintFormatter import PrintFormatter [as 别名]
# 或者: from cx.utils.cxPrintFormatter.PrintFormatter import printHeader [as 别名]
def installPackage(self):
'''
Install the package to the default location on this machine,
based on root_dir if necessary.
'''
PrintFormatter.printHeader('Install package', level=3)
file = self.findInstallerFile()
PrintFormatter.printInfo('Installing file %s' % file)
self._installFile(file)
示例14: checkoutCustusXAndData
# 需要导入模块: from cx.utils.cxPrintFormatter import PrintFormatter [as 别名]
# 或者: from cx.utils.cxPrintFormatter.PrintFormatter import printHeader [as 别名]
def checkoutCustusXAndData(self):
'checkout only CustusX and data. Required if the first build step was not run, f.ex. during integration tests'
assembly = self.cxBuilder.assembly
PrintFormatter.printHeader('Checkout libraries required for integration test', level=2)
#custusx = assembly.getComponent(cx.build.cxComponents.CustusX)
#cxdata = assembly.getComponent(cx.build.cxComponents.CustusXData)
#assembly.selectLibraries([custusx.name(), cxdata.name()])
assembly.selectTestLibraries()
assembly.process(checkout=True)
示例15: removePreviousInstaller
# 需要导入模块: from cx.utils.cxPrintFormatter import PrintFormatter [as 别名]
# 或者: from cx.utils.cxPrintFormatter.PrintFormatter import printHeader [as 别名]
def removePreviousInstaller(self):
PrintFormatter.printHeader('Removing previous installer', 3);
shell.removeTree(self._getStandardInstallerPackagePath()); # remove everything
initialInstaller = self.createInstallerObject(installer_path=self._getInitialInstallerPackagePath())
shell.rm_r(initialInstaller._getInstallerPackagePattern())
standardInstaller = self.createInstallerObject()
shell.rm_r(standardInstaller._getInstallerPackagePattern())