本文整理汇总了Python中mochitest_options.MochitestOptions.verifyOptions方法的典型用法代码示例。如果您正苦于以下问题:Python MochitestOptions.verifyOptions方法的具体用法?Python MochitestOptions.verifyOptions怎么用?Python MochitestOptions.verifyOptions使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mochitest_options.MochitestOptions
的用法示例。
在下文中一共展示了MochitestOptions.verifyOptions方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: run_desktop_mochitests
# 需要导入模块: from mochitest_options import MochitestOptions [as 别名]
# 或者: from mochitest_options.MochitestOptions import verifyOptions [as 别名]
def run_desktop_mochitests(parser, options):
# create our Marionette instance
marionette_args = {}
if options.marionette:
host, port = options.marionette.split(':')
marionette_args['host'] = host
marionette_args['port'] = int(port)
mochitest = B2GDesktopMochitest(marionette_args, options.profile_data_dir)
# add a -bin suffix if b2g-bin exists, but just b2g was specified
if options.app[-4:] != '-bin':
if os.path.isfile("%s-bin" % options.app):
options.app = "%s-bin" % options.app
options = MochitestOptions.verifyOptions(parser, options, mochitest)
if options == None:
sys.exit(1)
if options.desktop and not options.profile:
raise Exception("must specify --profile when specifying --desktop")
options.browserArgs += ['-marionette']
retVal = mochitest.runTests(options, onLaunch=mochitest.startTests)
mochitest.message_logger.finish()
sys.exit(retVal)
示例2: verifyOptions
# 需要导入模块: from mochitest_options import MochitestOptions [as 别名]
# 或者: from mochitest_options.MochitestOptions import verifyOptions [as 别名]
def verifyOptions(self, options, mochitest):
# since we are reusing verifyOptions, it will exit if App is not found
temp = options.app
options.app = __file__
tempPort = options.httpPort
tempSSL = options.sslPort
tempIP = options.webServer
options = MochitestOptions.verifyOptions(self, options, mochitest)
options.webServer = tempIP
options.app = temp
options.sslPort = tempSSL
options.httpPort = tempPort
return options
示例3: verifyOptions
# 需要导入模块: from mochitest_options import MochitestOptions [as 别名]
# 或者: from mochitest_options.MochitestOptions import verifyOptions [as 别名]
def verifyOptions(self, options, mochitest):
# since we are reusing verifyOptions, it will exit if App is not found
temp = options.app
options.app = __file__
tempPort = options.httpPort
tempSSL = options.sslPort
tempIP = options.webServer
# We are going to override this option later anyway, just pretend
# like it's not set for verification purposes.
options.dumpOutputDirectory = None
options = MochitestOptions.verifyOptions(self, options, mochitest)
options.webServer = tempIP
options.app = temp
options.sslPort = tempSSL
options.httpPort = tempPort
return options
示例4: main
# 需要导入模块: from mochitest_options import MochitestOptions [as 别名]
# 或者: from mochitest_options.MochitestOptions import verifyOptions [as 别名]
def main():
automation = Automation()
mochitest = Mochitest(automation)
parser = MochitestOptions(automation)
options, args = parser.parse_args()
options = parser.verifyOptions(options, mochitest)
if options == None:
sys.exit(1)
options.utilityPath = mochitest.getFullPath(options.utilityPath)
options.certPath = mochitest.getFullPath(options.certPath)
if options.symbolsPath and not isURL(options.symbolsPath):
options.symbolsPath = mochitest.getFullPath(options.symbolsPath)
automation.setServerInfo(options.webServer,
options.httpPort,
options.sslPort,
options.webSocketPort)
sys.exit(mochitest.runTests(options))