Bug 889897 - Add mach jstestbrowser. r=gps.

This commit is contained in:
Jason Orendorff 2014-06-20 12:01:03 -05:00
parent 0dcd511b12
commit ed93f76c74

View File

@ -84,10 +84,11 @@ class ReftestRunner(MozbuildObject):
def _manifest_file(self, suite):
"""Returns the manifest file used for a given test suite."""
files = {
'reftest': 'reftest.list',
'reftest-ipc': 'reftest.list',
'crashtest': 'crashtests.list',
'crashtest-ipc': 'crashtests.list',
'reftest': 'reftest.list',
'reftest-ipc': 'reftest.list',
'crashtest': 'crashtests.list',
'crashtest-ipc': 'crashtests.list',
'jstestbrowser': 'jstests.list'
}
assert suite in files
return files[suite]
@ -225,7 +226,7 @@ class ReftestRunner(MozbuildObject):
RegExp constructor) to select which reftests to run from the manifest.
suite is the type of reftest to run. It can be one of ('reftest',
'crashtest').
'crashtest', 'jstestbrowser').
debugger is the program name (in $PATH) or the full path of the
debugger to run.
@ -235,7 +236,7 @@ class ReftestRunner(MozbuildObject):
shuffle indicates whether to run tests in random order.
"""
if suite not in ('reftest', 'reftest-ipc', 'crashtest', 'crashtest-ipc'):
if suite not in ('reftest', 'reftest-ipc', 'crashtest', 'crashtest-ipc', 'jstestbrowser'):
raise Exception('None or unrecognized reftest suite type.')
env = {}
@ -380,6 +381,12 @@ class MachCommands(MachCommandBase):
def run_reftest(self, test_file, **kwargs):
return self._run_reftest(test_file, suite='reftest', **kwargs)
@Command('jstestbrowser', category='testing',
description='Run js/src/tests in the browser.')
@ReftestCommand
def run_jstestbrowser(self, test_file, **kwargs):
return self._run_reftest(test_file, suite='jstestbrowser', **kwargs)
@Command('reftest-ipc', category='testing',
description='Run IPC reftests.')
@ReftestCommand