本文整理汇总了Python中mozbuild.base.MachCommandConditions.is_firefox方法的典型用法代码示例。如果您正苦于以下问题:Python MachCommandConditions.is_firefox方法的具体用法?Python MachCommandConditions.is_firefox怎么用?Python MachCommandConditions.is_firefox使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mozbuild.base.MachCommandConditions
的用法示例。
在下文中一共展示了MachCommandConditions.is_firefox方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: run_mochitest_chrome
# 需要导入模块: from mozbuild.base import MachCommandConditions [as 别名]
# 或者: from mozbuild.base.MachCommandConditions import is_firefox [as 别名]
def run_mochitest_chrome(self, test_paths, **kwargs):
if conditions.is_firefox(self):
return self.run_mochitest(test_paths, 'chrome', **kwargs)
elif conditions.is_b2g(self) and conditions.is_emulator(self):
return self.run_mochitest_remote(test_paths, chrome=True, **kwargs)
elif conditions.is_android(self):
return self.run_mochitest_android(test_paths, chrome=True, **kwargs)
示例2: run_marionette_test
# 需要导入模块: from mozbuild.base import MachCommandConditions [as 别名]
# 或者: from mozbuild.base.MachCommandConditions import is_firefox [as 别名]
def run_marionette_test(self, tests, **kwargs):
if 'test_objects' in kwargs:
tests = []
for obj in kwargs['test_objects']:
tests.append(obj['file_relpath'])
del kwargs['test_objects']
if not kwargs.get('binary') and conditions.is_firefox(self):
kwargs['binary'] = self.get_binary_path('app')
return run_marionette(tests, topsrcdir=self.topsrcdir, **kwargs)
示例3: run_marionette_test
# 需要导入模块: from mozbuild.base import MachCommandConditions [as 别名]
# 或者: from mozbuild.base.MachCommandConditions import is_firefox [as 别名]
def run_marionette_test(self, tests, **kwargs):
if 'test_objects' in kwargs:
tests = []
for obj in kwargs['test_objects']:
tests.append(obj['file_relpath'])
del kwargs['test_objects']
if conditions.is_firefox(self):
bin_path = self.get_binary_path('app')
if kwargs.get('binary') is not None:
print "Warning: ignoring '--binary' option, using binary at " + bin_path
kwargs['binary'] = bin_path
return run_marionette(tests, topsrcdir=self.topsrcdir, **kwargs)
示例4: run_awsy_test
# 需要导入模块: from mozbuild.base import MachCommandConditions [as 别名]
# 或者: from mozbuild.base.MachCommandConditions import is_firefox [as 别名]
def run_awsy_test(self, tests, **kwargs):
"""mach awsy-test runs the in-tree version of the Are We Slim Yet
(AWSY) tests.
awsy-test is implemented as a marionette test and marionette
test arguments also apply although they are not necessary
since reasonable defaults will be chosen.
The AWSY specific arguments can be found in the Command
Arguments for AWSY section below.
awsy-test will automatically download the tp5n.zip talos
pageset from tooltool and install it under
topobjdir/_tests/awsy/html. You can specify your own page set
by specifying --web-root and --page-manifest.
The results of the test will be placed in the results
directory specified by the --results argument.
On Windows, you may experience problems due to path length
errors when extracting the tp5n.zip file containing the
test pages or when attempting to write checkpoints to the
results directory. In that case, you should specify both
the --web-root and --results arguments pointing to a location
with a short path. For example:
--web-root=c:\\\\tmp\\\\html --results=c:\\\\tmp\\\\results
Note that the double backslashes are required.
"""
kwargs['logger_name'] = 'Awsy Tests'
if 'test_objects' in kwargs:
tests = []
for obj in kwargs['test_objects']:
tests.append(obj['file_relpath'])
del kwargs['test_objects']
if not kwargs.get('binary') and conditions.is_firefox(self):
kwargs['binary'] = self.get_binary_path('app')
return self.run_awsy(tests, **kwargs)
示例5: is_platform_supported
# 需要导入模块: from mozbuild.base import MachCommandConditions [as 别名]
# 或者: from mozbuild.base.MachCommandConditions import is_firefox [as 别名]
def is_platform_supported(cls):
"""Must have a Firefox, Android or B2G build."""
return conditions.is_android(cls) or \
conditions.is_b2g(cls) or \
conditions.is_firefox(cls)
示例6: is_firefox_or_android
# 需要导入模块: from mozbuild.base import MachCommandConditions [as 别名]
# 或者: from mozbuild.base.MachCommandConditions import is_firefox [as 别名]
def is_firefox_or_android(cls):
"""Must have Firefox build or Android build."""
return conditions.is_firefox(cls) or conditions.is_android(cls)