Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a --bin flag to the |mach run and rr-record commands #19944

Merged
merged 1 commit into from Feb 4, 2018
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Add a --bin flag to the |mach run and rr-record commands to specify w…

…hich servo binary to run
  • Loading branch information
o0Ignition0o committed Feb 4, 2018
commit c3b2751eef87c62b4a79973717cc46de7a7abc9e
@@ -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 @@ def run(self, params, release=False, dev=False, android=None, debug=False, debug
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 @@ def run(self, params, release=False, dev=False, android=None, debug=False, debug
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)
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.