Do not pass features when running ./mach test-unit

This commit is contained in:
Martin Robinson 2023-05-29 10:09:54 +02:00
parent 7d50362c72
commit 4d8c227774
No known key found for this signature in database
GPG key ID: D56AA4FA55EFE6F8

View file

@ -876,8 +876,8 @@ class CommandBase(object):
if self.cross_compile_target:
args += ["--target", self.cross_compile_target]
features = list(self.features)
if "-p" not in cargo_args: # We're building specific package, that may not have features
features = list(self.features)
if self.config["build"]["debug-mozjs"] or debug_mozjs:
features.append("debugmozjs")
@ -902,12 +902,11 @@ class CommandBase(object):
features.append("webgl-backtrace")
if self.config["build"]["dom-backtrace"]:
features.append("dom-backtrace")
args += ["--features", " ".join(features)]
if with_debug_assertions or self.config["build"]["debug-assertions"]:
env['RUSTFLAGS'] = env.get('RUSTFLAGS', "") + " -C debug_assertions"
assert "--features" not in cargo_args
args += ["--features", " ".join(features)]
if self.is_uwp_build:
cargo_args += ["-Z", "build-std"]
return self.call_rustup_run(["cargo", command] + args + cargo_args, env=env, verbose=verbose)