mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 19:35:51 +00:00
Bug 777412 - Support the --setenv option in reftests
This commit is contained in:
parent
cadd50db82
commit
9e36b6f071
@ -83,6 +83,13 @@ class RefTest(object):
|
||||
browserEnv = self.automation.environment(xrePath = options.xrePath)
|
||||
browserEnv["XPCOM_DEBUG_BREAK"] = "stack"
|
||||
|
||||
for v in options.environment:
|
||||
ix = v.find("=")
|
||||
if ix <= 0:
|
||||
print "Error: syntax error in --setenv=" + v
|
||||
return None
|
||||
browserEnv[v[:ix]] = v[ix + 1:]
|
||||
|
||||
# Enable leaks detection to its own log file.
|
||||
self.leakLogFile = os.path.join(profileDir, "runreftest_leaks.log")
|
||||
browserEnv["XPCOM_MEM_BLOAT_LOG"] = self.leakLogFile
|
||||
@ -223,6 +230,13 @@ class ReftestOptions(OptionParser):
|
||||
"An optional path can be specified too.")
|
||||
defaults["extensionsToInstall"] = []
|
||||
|
||||
self.add_option("--setenv",
|
||||
action = "append", type = "string",
|
||||
dest = "environment", metavar = "NAME=VALUE",
|
||||
help = "sets the given variable in the application's "
|
||||
"environment")
|
||||
defaults["environment"] = []
|
||||
|
||||
self.set_defaults(**defaults)
|
||||
|
||||
def main():
|
||||
|
Loading…
Reference in New Issue
Block a user