diff options
author | o0Ignition0o <jeremy.lempereur@gmail.com> | 2018-02-04 12:58:27 +0100 |
---|---|---|
committer | o0Ignition0o <jeremy.lempereur@gmail.com> | 2018-02-04 13:00:30 +0100 |
commit | c3b2751eef87c62b4a79973717cc46de7a7abc9e (patch) | |
tree | edb5d5d6e8f949e6042d602c791a3f0a0d483d44 /python/servo/post_build_commands.py | |
parent | a0d9d3633b99c01868c98d2a5e64bf311f532d58 (diff) | |
download | servo-c3b2751eef87c62b4a79973717cc46de7a7abc9e.tar.gz servo-c3b2751eef87c62b4a79973717cc46de7a7abc9e.zip |
Add a --bin flag to the |mach run and rr-record commands to specify which servo binary to run
Diffstat (limited to 'python/servo/post_build_commands.py')
-rw-r--r-- | python/servo/post_build_commands.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/python/servo/post_build_commands.py b/python/servo/post_build_commands.py index eab7eaf0518..30d1eed9bc0 100644 --- a/python/servo/post_build_commands.py +++ b/python/servo/post_build_commands.py @@ -59,11 +59,13 @@ class PostBuildCommands(CommandBase): help='Launch in headless mode') @CommandArgument('--software', '-s', action='store_true', help='Launch with software rendering') + @CommandArgument('--bin', default=None, + help='Launch with specific binary') @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, browserhtml=False, - headless=False, software=False): + headless=False, software=False, bin=None): env = self.build_env() env["RUST_BACKTRACE"] = "1" @@ -96,7 +98,7 @@ class PostBuildCommands(CommandBase): shell.communicate("\n".join(script) + "\n") return shell.wait() - args = [self.get_binary_path(release, dev)] + args = [bin or self.get_binary_path(release, dev)] if browserhtml: browserhtml_path = get_browserhtml_path(args[0]) @@ -173,14 +175,16 @@ class PostBuildCommands(CommandBase): help='Use release build') @CommandArgument('--dev', '-d', action='store_true', help='Use dev build') + @CommandArgument('--bin', default=None, + help='Launch with specific binary') @CommandArgument( 'params', nargs='...', help="Command-line arguments to be passed through to Servo") - def rr_record(self, release=False, dev=False, params=[]): + def rr_record(self, release=False, dev=False, bin=None, params=[]): env = self.build_env() env["RUST_BACKTRACE"] = "1" - servo_cmd = [self.get_binary_path(release, dev)] + params + servo_cmd = [bin or self.get_binary_path(release, dev)] + params rr_cmd = ['rr', '--fatal-errors', 'record'] try: check_call(rr_cmd + servo_cmd) |