From f4a0bc449730ae746503582cc3c39eb3a72d4dcb Mon Sep 17 00:00:00 2001 From: Gian-Carlo Pascutto Date: Wed, 16 Aug 2017 19:03:09 +0200 Subject: [PATCH] Bug 1386826 - Whitelist the objdir, so _tests gets covered. r=jmaher MozReview-Commit-ID: 8SHk1Pfy37I --HG-- extra : rebase_source : 3944e20e310dda395e67ba9b1e33747413dea84e --- layout/tools/reftest/mach_commands.py | 1 + layout/tools/reftest/reftestcommandline.py | 7 ++++++- layout/tools/reftest/runreftest.py | 5 +++++ testing/mochitest/mochitest_options.py | 8 +++++++- testing/mochitest/runtests.py | 4 ++-- 5 files changed, 21 insertions(+), 4 deletions(-) diff --git a/layout/tools/reftest/mach_commands.py b/layout/tools/reftest/mach_commands.py index f2f9c7ecd19a..b66e6a927a37 100644 --- a/layout/tools/reftest/mach_commands.py +++ b/layout/tools/reftest/mach_commands.py @@ -79,6 +79,7 @@ class ReftestRunner(MozbuildObject): 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])] diff --git a/layout/tools/reftest/reftestcommandline.py b/layout/tools/reftest/reftestcommandline.py index c2b33bf49019..48f6e935c0f6 100644 --- a/layout/tools/reftest/reftestcommandline.py +++ b/layout/tools/reftest/reftestcommandline.py @@ -244,7 +244,12 @@ class ReftestArgumentsParser(argparse.ArgumentParser): 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) diff --git a/layout/tools/reftest/runreftest.py b/layout/tools/reftest/runreftest.py index aead256008d2..2eda417be40b 100644 --- a/layout/tools/reftest/runreftest.py +++ b/layout/tools/reftest/runreftest.py @@ -310,6 +310,11 @@ class RefTest(object): 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 diff --git a/testing/mochitest/mochitest_options.py b/testing/mochitest/mochitest_options.py index 74c6b00c3843..cf437ab025a2 100644 --- a/testing/mochitest/mochitest_options.py +++ b/testing/mochitest/mochitest_options.py @@ -604,7 +604,13 @@ class MochitestArguments(ArgumentContainer): [["--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"], diff --git a/testing/mochitest/runtests.py b/testing/mochitest/runtests.py index 942c12e1e038..1b1faf0d8d63 100644 --- a/testing/mochitest/runtests.py +++ b/testing/mochitest/runtests.py @@ -1809,8 +1809,8 @@ toolbar#nav-bar { 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