From ed93f76c74e4eaaac440da9c7b680bcbda8b251b Mon Sep 17 00:00:00 2001 From: Jason Orendorff Date: Fri, 20 Jun 2014 12:01:03 -0500 Subject: [PATCH] Bug 889897 - Add `mach jstestbrowser`. r=gps. --- layout/tools/reftest/mach_commands.py | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/layout/tools/reftest/mach_commands.py b/layout/tools/reftest/mach_commands.py index 88b3f95c24d8..271312335eed 100644 --- a/layout/tools/reftest/mach_commands.py +++ b/layout/tools/reftest/mach_commands.py @@ -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