aboutsummaryrefslogtreecommitdiffstats
path: root/python/servo
diff options
context:
space:
mode:
authorAnthony Ramine <n.oxyde@gmail.com>2016-05-16 23:09:50 +0200
committerAnthony Ramine <n.oxyde@gmail.com>2016-05-16 23:09:50 +0200
commit429c82bdf1f6742af14542bf197954e9bea36213 (patch)
treed7c0731ddbdae845bc49676ba6728bc567a7bc34 /python/servo
parent3a28aad349473d7a9fcb6c5e4841abf3972fd733 (diff)
downloadservo-429c82bdf1f6742af14542bf197954e9bea36213.tar.gz
servo-429c82bdf1f6742af14542bf197954e9bea36213.zip
Implement --pref in test-wpt
Diffstat (limited to 'python/servo')
-rw-r--r--python/servo/testing_commands.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/python/servo/testing_commands.py b/python/servo/testing_commands.py
index 85423610217..1e22402a7fb 100644
--- a/python/servo/testing_commands.py
+++ b/python/servo/testing_commands.py
@@ -42,6 +42,8 @@ def create_parser_wpt():
help="Run with a release build of servo")
parser.add_argument('--chaos', default=False, action="store_true",
help="Run under chaos mode in rr until a failure is captured")
+ parser.add_argument('--pref', default=[], action="append", dest="prefs",
+ help="Pass preferences to servo")
return parser
@@ -321,6 +323,12 @@ class MachCommands(CommandBase):
kwargs["debugger_args"] = "record --chaos"
kwargs["repeat_until_unexpected"] = True
# TODO: Delete rr traces from green test runs?
+ prefs = kwargs.pop("prefs")
+ if prefs:
+ binary_args = []
+ for pref in prefs:
+ binary_args.append("--pref=" + pref)
+ kwargs["binary_args"] = binary_args
run_globals = {"__file__": run_file}
execfile(run_file, run_globals)