Bug 1386826 - Whitelist the objdir, so _tests gets covered. r?jmaher
MozReview-Commit-ID: 8SHk1Pfy37I
--- 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)