Improve cargo-nextext Configuration (#7131)

This commit is contained in:
Connor Fitzgerald 2025-02-13 18:55:23 -05:00 committed by GitHub
parent 03a01df3cb
commit ab38df24ba
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 6 additions and 12 deletions

View File

@ -2,6 +2,8 @@
# terminate them to prevent infinite run-on.
[profile.default]
slow-timeout = { period = "45s", terminate-after = 2 }
fail-fast = false
retries = 0
# Use two threads for tests with "2 threads" in their name
[[profile.default.overrides]]

View File

@ -29,6 +29,8 @@ Commands:
--list List all of the tests and their executables without running them
--retries Number of times to retry failing tests
All extra arguments will be forwarded to cargo-nextest (NOT wgpu-info)
vendor-web-sys
Re-vendor the WebGPU web-sys bindings.

View File

@ -5,10 +5,7 @@ use xshell::Shell;
pub fn run_tests(shell: Shell, mut args: Arguments) -> anyhow::Result<()> {
let llvm_cov = args.contains("--llvm-cov");
let list = args.contains("--list");
let retries = args
.opt_value_from_str("--retries")?
.unwrap_or(0_u32)
.to_string();
// Retries handled by cargo nextest natively
// These needs to match the command in "run wgpu-info" in `.github/workflows/ci.yml`
let llvm_cov_flags: &[_] = if llvm_cov {
@ -71,14 +68,7 @@ pub fn run_tests(shell: Shell, mut args: Arguments) -> anyhow::Result<()> {
shell
.cmd("cargo")
.args(llvm_cov_nextest_flags)
.args([
"--benches",
"--tests",
"--no-fail-fast",
"--all-features",
"--retries",
&retries,
])
.args(["--benches", "--tests", "--all-features"])
.args(args.finish())
.quiet()
.run()