diff options
author | o0Ignition0o <jeremy.lempereur@gmail.com> | 2018-02-04 17:17:09 +0100 |
---|---|---|
committer | o0Ignition0o <jeremy.lempereur@gmail.com> | 2018-03-06 23:09:50 +0100 |
commit | 10822ce7307bec2c5f1533173ae6880e64ccc122 (patch) | |
tree | 0af83176048a2ccb152f07da526840447e5cf671 /python/servo/post_build_commands.py | |
parent | 785b7c7775ae13c02556c84a16469efc6c4d71e8 (diff) | |
download | servo-10822ce7307bec2c5f1533173ae6880e64ccc122.tar.gz servo-10822ce7307bec2c5f1533173ae6880e64ccc122.zip |
Add a --nightly | -n flag to download and extract a specific nightly version to run mach commands against. This currently only work on linux, but windows and mac os support will follow in subsequent PRs.
Diffstat (limited to 'python/servo/post_build_commands.py')
-rw-r--r-- | python/servo/post_build_commands.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/python/servo/post_build_commands.py b/python/servo/post_build_commands.py index 115c03f30b5..6e8c65ec833 100644 --- a/python/servo/post_build_commands.py +++ b/python/servo/post_build_commands.py @@ -58,11 +58,13 @@ class PostBuildCommands(CommandBase): help='Launch with software rendering') @CommandArgument('--bin', default=None, help='Launch with specific binary') + @CommandArgument('--nightly', '-n', default=None, + help='Specify a YYYY-MM-DD nightly build to run') @CommandArgument( 'params', nargs='...', help="Command-line arguments to be passed through to Servo") def run(self, params, release=False, dev=False, android=None, debug=False, debugger=None, - headless=False, software=False, bin=None): + headless=False, software=False, bin=None, nightly=None): env = self.build_env() env["RUST_BACKTRACE"] = "1" @@ -95,7 +97,7 @@ class PostBuildCommands(CommandBase): shell.communicate("\n".join(script) + "\n") return shell.wait() - args = [bin or self.get_binary_path(release, dev)] + args = [bin or self.get_nightly_binary_path(nightly) or self.get_binary_path(release, dev)] if headless: set_osmesa_env(args[0], env) @@ -160,14 +162,17 @@ class PostBuildCommands(CommandBase): help='Use dev build') @CommandArgument('--bin', default=None, help='Launch with specific binary') + @CommandArgument('--nightly', '-n', default=None, + help='Specify a YYYY-MM-DD nightly build to run') @CommandArgument( 'params', nargs='...', help="Command-line arguments to be passed through to Servo") - def rr_record(self, release=False, dev=False, bin=None, params=[]): + def rr_record(self, release=False, dev=False, bin=None, nightly=None, params=[]): env = self.build_env() env["RUST_BACKTRACE"] = "1" - servo_cmd = [bin or self.get_binary_path(release, dev)] + params + servo_cmd = [bin or self.get_nightly_binary_path(nightly) or + self.get_binary_path(release, dev)] + params rr_cmd = ['rr', '--fatal-errors', 'record'] try: check_call(rr_cmd + servo_cmd) |