mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-04 11:26:09 +00:00
4cea585419
--HG-- extra : commitid : 7UHH28yy81E extra : rebase_source : e6800f9d6ff6336991f1d4b8f2d975083b9f7751
42 lines
1.1 KiB
Python
42 lines
1.1 KiB
Python
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
from __future__ import unicode_literals
|
|
|
|
from argparse import Namespace
|
|
import os
|
|
|
|
from mach.decorators import (
|
|
CommandProvider,
|
|
Command,
|
|
)
|
|
|
|
|
|
def run_mochitest(context, **kwargs):
|
|
args = Namespace(**kwargs)
|
|
args.certPath = context.certs_dir
|
|
args.utilityPath = context.bin_dir
|
|
args.extraProfileFiles.append(os.path.join(context.bin_dir, 'plugins'))
|
|
|
|
from runtests import run_test_harness
|
|
return run_test_harness(args)
|
|
|
|
|
|
def setup_argument_parser():
|
|
from mochitest_options import MochitestArgumentParser
|
|
return MochitestArgumentParser(app='generic')
|
|
|
|
|
|
@CommandProvider
|
|
class MochitestCommands(object):
|
|
|
|
def __init__(self, context):
|
|
self.context = context
|
|
|
|
@Command('mochitest', category='testing',
|
|
description='Run the mochitest harness.',
|
|
parser=setup_argument_parser)
|
|
def mochitest(self, **kwargs):
|
|
return run_mochitest(self.context, **kwargs)
|