Bug 934170: Make mach xpcshell-test work for comm-central, r=ted

This commit is contained in:
Joshua Cranmer 2015-01-30 09:54:00 -06:00
parent 524d0e597d
commit b5bff3fbc4
2 changed files with 7 additions and 7 deletions

View File

@ -52,6 +52,10 @@ class Clobberer(object):
self.src_clobber = os.path.join(topsrcdir, 'CLOBBER')
self.obj_clobber = os.path.join(topobjdir, 'CLOBBER')
# Try looking for mozilla/CLOBBER, for comm-central
if not os.path.isfile(self.src_clobber):
self.src_clobber = os.path.join(topsrcdir, 'mozilla', 'CLOBBER')
assert os.path.isfile(self.src_clobber)
def clobber_needed(self):

View File

@ -79,6 +79,9 @@ class XPCShellRunner(MozbuildObject):
if build_path not in sys.path:
sys.path.append(build_path)
if not os.path.isfile(os.path.join(self.topsrcdir, 'build', 'automationutils.py')):
sys.path.append(os.path.join(self.topsrcdir, 'mozilla', 'build'))
if test_paths == ['all']:
self.run_suite(interactive=interactive,
keep_going=keep_going, shuffle=shuffle, sequential=sequential,
@ -391,12 +394,6 @@ class B2GXPCShellRunner(MozbuildObject):
return runtestsb2g.run_remote_xpcshell(parser, options, args, log)
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)
@CommandProvider
class MachCommands(MachCommandBase):
def __init__(self, context):
@ -406,7 +403,6 @@ class MachCommands(MachCommandBase):
setattr(self, attr, getattr(context, attr, None))
@Command('xpcshell-test', category='testing',
conditions=[is_platform_supported],
description='Run XPCOM Shell tests (API direct unit testing)',
parser=_parser)
@CommandArgument('test_paths', default='all', nargs='*', metavar='TEST',