Skip to content

Commit

Permalink
Improve cargo-nextext Configuration (#7131)
Browse files Browse the repository at this point in the history
  • Loading branch information
cwfitzgerald authored Feb 13, 2025
1 parent 03a01df commit ab38df2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 12 deletions.
2 changes: 2 additions & 0 deletions .config/nextest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]]
Expand Down
2 changes: 2 additions & 0 deletions xtask/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
14 changes: 2 additions & 12 deletions xtask/src/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit ab38df2

Please sign in to comment.