Skip to content

test: speed up compile-test suite - #195

Merged
tisonkun merged 3 commits into
mainfrom
codex/optimize-tests-build
Jul 31, 2026
Merged

tisonkun merged 3 commits into
mainfrom
codex/optimize-tests-build

Conversation

@tisonkun

@tisonkun tisonkun commented Jul 31, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • register compile-pass fixtures through the standard Rust module tree: tests/ui.rs -> tests/ok/mod.rs -> one file per case, with no repeated #[path] attributes
  • run the 19 pass cases as native Cargo tests so the test harness can schedule them independently, while keeping trybuild focused on the 18 compile-fail snapshots it can batch
  • fix case-local warnings and Clippy findings with real assertions and used values; remove broad lint suppression and stale comments

Benchmarks

Measured on macOS arm64 with Rust 1.91.0:

  • clean target: 32.81s -> 17.60s (46% faster)
  • warm target: 8.97s -> 0.36s (96% faster)

Verification

  • cargo +nightly fmt --all -- --check
  • cargo test -p tests-build
  • cargo +1.91.0 nextest run -p tests-build
  • cargo +stable nextest run -p tests-build
  • cargo +nightly nextest run -p tests-build
  • cargo +nightly clippy --all-targets --all-features -- --deny warnings

@tisonkun
tisonkun merged commit fc33b4b into main Jul 31, 2026
11 checks passed
@tisonkun
tisonkun deleted the codex/optimize-tests-build branch July 31, 2026 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant