Bug 1386826 - Whitelist the objdir, so _tests gets covered. r=jmaher
authorGian-Carlo Pascutto <gcp@mozilla.com>
Wed, 16 Aug 2017 19:03:09 +0200
changeset 375319 40a865254b3284177bc80675c2f3198cd875192d
parent 375318 f270b42abc5a08f92df2bfeaf241a2538d87beb0
child 375320 2fb6d8f7bac1be26b2b49b68fc34cc6decd7f339
child 375419 a47fcbb0b15fbefafc5b760edf59d9fed903aa30
push id32354
push userkwierso@gmail.com
push dateThu, 17 Aug 2017 22:33:19 +0000
treeherdermozilla-central@2fb6d8f7bac1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjmaher
bugs1386826
milestone57.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 1386826 - Whitelist the objdir, so _tests gets covered. r=jmaher MozReview-Commit-ID: 8SHk1Pfy37I
layout/tools/reftest/mach_commands.py
layout/tools/reftest/reftestcommandline.py
layout/tools/reftest/runreftest.py
testing/mochitest/mochitest_options.py
testing/mochitest/runtests.py
--- a/layout/tools/reftest/mach_commands.py
+++ b/layout/tools/reftest/mach_commands.py
@@ -74,16 +74,17 @@ class ReftestRunner(MozbuildObject):
             "crashtest": (self.topsrcdir, "testing", "crashtest", "crashtests.list"),
             "jstestbrowser": (self.topobjdir, "dist", "test-stage", "jsreftest", "tests",
                               "jstests.list")
         }
 
         args.extraProfileFiles.append(os.path.join(self.topobjdir, "dist", "plugins"))
         args.symbolsPath = os.path.join(self.topobjdir, "crashreporter-symbols")
         args.workPath = self.topsrcdir
+        args.objPath = self.topobjdir
 
         if not args.tests:
             args.tests = [os.path.join(*default_manifest[args.suite])]
 
         if args.suite == "jstestbrowser":
             args.extraProfileFiles.append(os.path.join(self.topobjdir, "dist",
                                                        "test-stage", "jsreftest",
                                                        "tests", "user.js"))
--- a/layout/tools/reftest/reftestcommandline.py
+++ b/layout/tools/reftest/reftestcommandline.py
@@ -239,17 +239,22 @@ class ReftestArgumentsParser(argparse.Ar
         self.add_argument("tests",
                           metavar="TEST_PATH",
                           nargs="*",
                           help="Path to test file, manifest file, or directory containing tests")
 
         self.add_argument("--work-path",
                           action="store",
                           dest="workPath",
-                          help="Path to the base dir of all test files.")
+                          help="Path to the base dir of all source files.")
+
+        self.add_argument("--obj-path",
+                          action="store",
+                          dest="objPath",
+                          help="Path to the base dir of all object files.")
 
         mozlog.commandline.add_logging_group(self)
 
     def get_ip(self):
         import moznetwork
         if os.name != "nt":
             return moznetwork.get_ip()
         else:
--- a/layout/tools/reftest/runreftest.py
+++ b/layout/tools/reftest/runreftest.py
@@ -305,16 +305,21 @@ class RefTest(object):
             prefs['layers.acceleration.disabled'] = True
 
         sandbox_whitelist_paths = [SCRIPT_DIRECTORY]
         try:
             if options.workPath:
                 sandbox_whitelist_paths.append(options.workPath)
         except AttributeError:
             pass
+        try:
+            if options.objPath:
+                sandbox_whitelist_paths.append(options.objPath)
+        except AttributeError:
+            pass
         if (platform.system() == "Linux" or
             platform.system() in ("Windows", "Microsoft")):
             # Trailing slashes are needed to indicate directories on Linux and Windows
             sandbox_whitelist_paths = map(lambda p: os.path.join(p, ""),
                                           sandbox_whitelist_paths)
 
         # Bug 1300355: Disable canvas cache for win7 as it uses
         # too much memory and causes OOMs.
--- a/testing/mochitest/mochitest_options.py
+++ b/testing/mochitest/mochitest_options.py
@@ -599,17 +599,23 @@ class MochitestArguments(ArgumentContain
          {"default": None,
           "dest": "failure_pattern_file",
           "help": "File describes all failure patterns of the tests.",
           "suppress": True,
           }],
         [["--work-path"],
          {"default": None,
           "dest": "workPath",
-          "help": "Path to the base dir of all test files.",
+          "help": "Path to the base dir of all source files.",
+          "suppress": True,
+          }],
+        [["--obj-path"],
+         {"default": None,
+          "dest": "objPath",
+          "help": "Path to the base dir of all object files.",
           "suppress": True,
           }],
         [["--verify"],
          {"action": "store_true",
           "default": False,
           "help": "Test verification mode.",
           "suppress": True,
           }],
--- a/testing/mochitest/runtests.py
+++ b/testing/mochitest/runtests.py
@@ -1804,18 +1804,18 @@ toolbar#nav-bar {
 
         sandbox_whitelist_paths = [SCRIPT_DIR]
         try:
             if options.workPath:
                 sandbox_whitelist_paths.append(options.workPath)
         except AttributeError:
             pass
         try:
-            if options.topsrcdir:
-                sandbox_whitelist_paths.append(options.topsrcdir)
+            if options.objPath:
+                sandbox_whitelist_paths.append(options.objPath)
         except AttributeError:
             pass
         if (platform.system() == "Linux" or
             platform.system() in ("Windows", "Microsoft")):
             # Trailing slashes are needed to indicate directories on Linux and Windows
             sandbox_whitelist_paths = map(lambda p: os.path.join(p, ""),
                                           sandbox_whitelist_paths)