Bug 1206073 - [xpcshell] Fix default value for testingModulesDir when running from mach, r=jgraham
authorAndrew Halberstadt <ahalberstadt@mozilla.com>
Fri, 18 Sep 2015 10:00:40 -0400
changeset 297548 7ea485aa45dab4bfe47598149ba452f7d9c2db78
parent 297547 e13fd468953ba2cbcecb0b272cecba8256d3daa8
child 297549 504162ed4ed46c511483e97de0b47fa512096332
push id962
push userjlund@mozilla.com
push dateFri, 04 Dec 2015 23:28:54 +0000
treeherdermozilla-release@23a2d286e80f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjgraham
bugs1206073
milestone43.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1206073 - [xpcshell] Fix default value for testingModulesDir when running from mach, r=jgraham
testing/xpcshell/mach_commands.py
testing/xpcshell/runxpcshelltests.py
--- a/testing/xpcshell/mach_commands.py
+++ b/testing/xpcshell/mach_commands.py
@@ -104,16 +104,19 @@ class XPCShellRunner(MozbuildObject):
             kwargs["logfiles"] = False
 
         if kwargs["profileName"] is None:
             kwargs["profileName"] = "firefox"
 
         if kwargs["pluginsPath"] is None:
             kwargs['pluginsPath'] = os.path.join(self.distdir, 'plugins')
 
+        if kwargs["testingModulesDir"] is None:
+            kwargs["testingModulesDir"] = os.path.join(self.topobjdir, '_tests/modules')
+
         if kwargs["utility_path"] is None:
             kwargs['utility_path'] = self.bindir
 
         if kwargs["manifest"] is None:
             kwargs["manifest"] = os.path.join(tests_dir, "xpcshell.ini")
 
         if kwargs["failure_manifest"] is None:
             kwargs["failure_manifest"] = os.path.join(self.statedir, 'xpcshell.failures.ini')
--- a/testing/xpcshell/runxpcshelltests.py
+++ b/testing/xpcshell/runxpcshelltests.py
@@ -1088,18 +1088,17 @@ class XPCShellTests(object):
         global gotSIGINT
 
         # Try to guess modules directory.
         # This somewhat grotesque hack allows the buildbot machines to find the
         # modules directory without having to configure the buildbot hosts. This
         # code path should never be executed in local runs because the build system
         # should always set this argument.
         if not testingModulesDir:
-            ourDir = os.path.dirname(__file__)
-            possible = os.path.join(ourDir, os.path.pardir, 'modules')
+            possible = os.path.join(here, os.path.pardir, 'modules')
 
             if os.path.isdir(possible):
                 testingModulesDir = possible
 
         if rerun_failures:
             if os.path.exists(failure_manifest):
                 rerun_manifest = os.path.join(os.path.dirname(failure_manifest), "rerun.ini")
                 shutil.copyfile(failure_manifest, rerun_manifest)