mirror of
https://github.com/servo/servo.git
synced 2025-06-08 08:33:26 +00:00
Add --production
option to mach (#30707)
* --prod(uction) mach argument * Use profile in workflows instead of production * Use profiles in unit tests * ups * Build (${{ inputs.profile }})
This commit is contained in:
parent
c78b98252a
commit
96d37d3785
9 changed files with 90 additions and 71 deletions
|
@ -174,8 +174,8 @@ class MachCommands(CommandBase):
|
|||
help="Run in bench mode")
|
||||
@CommandArgument('--nocapture', default=False, action="store_true",
|
||||
help="Run tests with nocapture ( show test stdout )")
|
||||
@CommandBase.common_command_arguments(build_configuration=True, build_type=False)
|
||||
def test_unit(self, test_name=None, package=None, bench=False, nocapture=False, **kwargs):
|
||||
@CommandBase.common_command_arguments(build_configuration=True, build_type=True)
|
||||
def test_unit(self, build_type: BuildType, test_name=None, package=None, bench=False, nocapture=False, **kwargs):
|
||||
if test_name is None:
|
||||
test_name = []
|
||||
|
||||
|
@ -239,6 +239,14 @@ class MachCommands(CommandBase):
|
|||
|
||||
# Gather Cargo build timings (https://doc.rust-lang.org/cargo/reference/timings.html).
|
||||
args = ["--timings"]
|
||||
|
||||
if build_type.is_release():
|
||||
args += ["--release"]
|
||||
elif build_type.is_dev():
|
||||
pass # there is no argument for debug
|
||||
else:
|
||||
args += ["--profile", build_type.profile]
|
||||
|
||||
for crate in packages:
|
||||
args += ["-p", "%s_tests" % crate]
|
||||
for crate in in_crate_packages:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue