aboutsummaryrefslogtreecommitdiffstats
path: root/python/servo/testing_commands.py
diff options
context:
space:
mode:
authorMatt Brubeck <mbrubeck@limpet.net>2016-02-11 09:55:45 -0800
committerMatt Brubeck <mbrubeck@limpet.net>2016-02-11 11:18:12 -0800
commit7c740d395bc731f4bd2822a0876da3a4000008ab (patch)
tree1274dd54a6142e04b1d6fa97b53bbb770881fcc6 /python/servo/testing_commands.py
parentd11a70f53a647bcea3f56ae36b064d4a25b60090 (diff)
downloadservo-7c740d395bc731f4bd2822a0876da3a4000008ab.tar.gz
servo-7c740d395bc731f4bd2822a0876da3a4000008ab.zip
Add an rr chaos mode
Diffstat (limited to 'python/servo/testing_commands.py')
-rw-r--r--python/servo/testing_commands.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/python/servo/testing_commands.py b/python/servo/testing_commands.py
index bd2b61cc21a..5e55ca18925 100644
--- a/python/servo/testing_commands.py
+++ b/python/servo/testing_commands.py
@@ -41,6 +41,8 @@ def create_parser_wpt():
parser = wptcommandline.create_parser()
parser.add_argument('--release', default=False, action="store_true",
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")
return parser
@@ -344,6 +346,11 @@ class MachCommands(CommandBase):
def wptrunner(self, run_file, **kwargs):
os.environ["RUST_BACKTRACE"] = "1"
kwargs["debug"] = not kwargs["release"]
+ if kwargs.pop("chaos"):
+ kwargs["debugger"] = "rr"
+ kwargs["debugger_args"] = "record --chaos"
+ kwargs["repeat_until_unexpected"] = True
+ # TODO: Delete rr traces from green test runs?
run_globals = {"__file__": run_file}
execfile(run_file, run_globals)