mirror of
https://github.com/servo/servo.git
synced 2025-06-25 01:24:37 +01:00
Add an rr chaos mode
This commit is contained in:
parent
d11a70f53a
commit
7c740d395b
1 changed files with 7 additions and 0 deletions
|
@ -41,6 +41,8 @@ def create_parser_wpt():
|
||||||
parser = wptcommandline.create_parser()
|
parser = wptcommandline.create_parser()
|
||||||
parser.add_argument('--release', default=False, action="store_true",
|
parser.add_argument('--release', default=False, action="store_true",
|
||||||
help="Run with a release build of servo")
|
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
|
return parser
|
||||||
|
|
||||||
|
|
||||||
|
@ -344,6 +346,11 @@ class MachCommands(CommandBase):
|
||||||
def wptrunner(self, run_file, **kwargs):
|
def wptrunner(self, run_file, **kwargs):
|
||||||
os.environ["RUST_BACKTRACE"] = "1"
|
os.environ["RUST_BACKTRACE"] = "1"
|
||||||
kwargs["debug"] = not kwargs["release"]
|
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}
|
run_globals = {"__file__": run_file}
|
||||||
execfile(run_file, run_globals)
|
execfile(run_file, run_globals)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue