Bug 852959 - Remove old code paths for running xpcshell tests from directories; r=ted
authorGregory Szorc <gps@mozilla.com>
Mon, 27 Jan 2014 10:14:09 -0800
changeset 178139 63b1c810a8a65dd9d08fba0b60a3a52e3728a919
parent 178138 862474a812c70e93c022e1986beabb17f65fe181
child 178140 9b13a5bd841a07a359e562b8b4813718dd319139
push id5439
push userffxbld
push dateMon, 17 Mar 2014 23:08:15 +0000
treeherdermozilla-aurora@c0befb3c8038 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted
bugs852959
milestone30.0a1
Bug 852959 - Remove old code paths for running xpcshell tests from directories; r=ted Manifests are now the mechanism used to specify how to run xpcshell tests. This patch removes old code paths that allowed directories to be specified. runxpcshelltests.py still contains references to "testdirs." These should likely be removed as well. This patch doesn't touch them out of fear it may have consequences on automation.
testing/xpcshell/mach_commands.py
--- a/testing/xpcshell/mach_commands.py
+++ b/testing/xpcshell/mach_commands.py
@@ -96,17 +96,17 @@ class XPCShellRunner(MozbuildObject):
             'debuggerArgs': debuggerArgs,
             'debuggerInteractive': debuggerInteractive,
             'rerun_failures': rerun_failures,
             'manifest': manifest,
         }
 
         return self._run_xpcshell_harness(**args)
 
-    def _run_xpcshell_harness(self, test_dirs=None, manifest=None,
+    def _run_xpcshell_harness(self, manifest,
                               test_path=None, shuffle=False, interactive=False,
                               keep_going=False, sequential=False,
                               debugger=None, debuggerArgs=None, debuggerInteractive=None,
                               rerun_failures=False):
 
         # Obtain a reference to the xpcshell test runner.
         import runxpcshelltests
 
@@ -119,16 +119,17 @@ class XPCShellRunner(MozbuildObject):
 
         tests_dir = os.path.join(self.topobjdir, '_tests', 'xpcshell')
         modules_dir = os.path.join(self.topobjdir, '_tests', 'modules')
         # We want output from the test to be written immediately if we are only
         # running a single test.
         verbose_output = test_path is not None or (manifest and len(manifest.test_paths())==1)
 
         args = {
+            'manifest': manifest,
             'xpcshell': os.path.join(self.bindir, 'xpcshell'),
             'mozInfo': os.path.join(self.topobjdir, 'mozinfo.json'),
             'symbolsPath': os.path.join(self.distdir, 'crashreporter-symbols'),
             'interactive': interactive,
             'keepGoing': keep_going,
             'logfiles': False,
             'sequential': sequential,
             'shuffle': shuffle,
@@ -141,26 +142,16 @@ class XPCShellRunner(MozbuildObject):
             'pluginsPath': os.path.join(self.distdir, 'plugins'),
             'debugger': debugger,
             'debuggerArgs': debuggerArgs,
             'debuggerInteractive': debuggerInteractive,
             'on_message': (lambda obj, msg: xpcshell.log.info(msg.decode('utf-8', 'replace'))) \
                             if verbose_output else None,
         }
 
-        if manifest is not None:
-            args['manifest'] = manifest
-        elif test_dirs is not None:
-            if isinstance(test_dirs, list):
-                args['testdirs'] = test_dirs
-            else:
-                args['testdirs'] = [test_dirs]
-        else:
-            raise Exception('One of test_dirs or manifest must be provided.')
-
         if test_path is not None:
             args['testPath'] = test_path
 
         # A failure manifest is written by default. If --rerun-failures is
         # specified and a prior failure manifest is found, the prior manifest
         # will be run. A new failure manifest is always written over any
         # prior failure manifest.
         failure_manifest_path = os.path.join(self.statedir, 'xpcshell.failures.ini')