本文整理汇总了Python中cx.utils.cxPrintFormatter.PrintFormatter类的典型用法代码示例。如果您正苦于以下问题:Python PrintFormatter类的具体用法?Python PrintFormatter怎么用?Python PrintFormatter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了PrintFormatter类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _movePackageToStandardLocation
def _movePackageToStandardLocation(self):
installer = self.createInstallerObject(installer_path=self._getInitialInstallerPackagePath())
#filepattern = installer.getInstallerPackagePattern()
source = installer.findInstallerFile()
dest = '%s/%s' % (self._getStandardInstallerPackagePath(), os.path.basename(source))
PrintFormatter.printInfo('Copying package files from [%s] to [%s]'%(source,dest))
shell.cp(source, dest)
示例2: publishUserDocs
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)
示例3: publishCoverageInfo
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)
示例4: _moveDevDocsToStandardLocation
def _moveDevDocsToStandardLocation(self):
installer_path=self._getInitialInstallerPackagePath()
source = '%s/%s' % (installer_path, "doc/html_dev")
if os.path.exists(source):
dest = '%s/%s' % (self._getStandardInstallerPackagePath(), os.path.basename(source))
PrintFormatter.printInfo('Copying dev doc files from [%s] to [%s]'%(source,dest))
shutil.copytree(source, dest)
示例5: buildAllComponents
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)
示例6: runCatchTests
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)
示例7: testInstallation
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')
示例8: clearTestData
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())
示例9: removePreviousJob
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))
示例10: _installWindowsNSISExe
def _installWindowsNSISExe(self, filename):
installfolder = '%s\%s' % (self.install_root, self.system_base_name)
installfolder = installfolder.replace("/", "\\")
filename = filename.replace("/", "\\")
cmd = ["%s" % filename, "/S", "/D=%s" % installfolder]
shell.run(cmd, convertToString=False)
PrintFormatter.printInfo('Installed \n\t%s\nto folder \n\t%s ' % (filename, self.install_root))
示例11: runCatchTestsWrappedInCTest
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)
示例12: _operation
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()
示例13: publishUserDocs
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)
示例14: publish
def publish(self, source, server, user, target_path):
PrintFormatter.printInfo('Publishing contents of [%s] to server [%s], remote path [%s]' % (source, server, target_path))
transfer = cx.utils.cxSSH.RemoteFileTransfer()
transfer.connect(server, user)
#transfer.remote_mkdir(targetBasePath)
transfer.remote_rmdir(target_path) # remove old content if any
transfer.copyFolderContentsToRemoteServer(source, target_path);
transfer.close()
示例15: installPackage
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)