mirror of
https://github.com/servo/servo.git
synced 2025-07-26 16:50:23 +01:00
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.
This commit is contained in:
parent
785b7c7775
commit
10822ce730
2 changed files with 84 additions and 4 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue