Link the ordinary tests once, and keep their debug info to line tables
Eleven `tests/*.rs` were eleven binaries, each linking the whole graph -- `wgpu` and all -- to run a handful of cases. They are modules of one target now, under `tests/cases/`, and `cargo test --test suite layout::` still picks one out. The fuzzers and the `*_cost` measurements stay their own targets: they are run on their own and want to be selectable without building the rest. `profile.test` takes `debug = "line-tables-only"`, which is what a backtrace here actually reads; the type and variable information was the bulk of what the linker was writing. Measured on this machine, rebuilding `iris`'s test targets after a change to the crate: 14.3 s before, 9.8 s with one target, 7.7 s with both. `target/` went from 45 GB to 13 GB. The suite still passes 102 tests, and the binary still carries `.debug_line`. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
39e4ca20e6
commit
cb955f1023
13 files changed
+35
No files matched your search
@@ -28,6 +28,9 @@ members = ["core", "macro", "rig-input"]
|
||||
[profile.dev]
|
||||
debug = 1
|
||||
|
||||
[profile.test]
|
||||
debug = "line-tables-only"
|
||||
|
||||
[workspace.package]
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,32 @@
|
||||
//! Every ordinary correctness test, as modules of one target.
|
||||
//!
|
||||
//! One binary rather than a dozen: each `tests/*.rs` links the whole
|
||||
//! dependency graph again, which is most of what `cargo test` spends its time
|
||||
//! on here. Libtest still runs the cases in parallel, and a filter still
|
||||
//! selects them -- `cargo test --test suite layout::` for one module.
|
||||
//!
|
||||
//! The rigs stay their own targets: `shrink` and `generated` are fuzzers run
|
||||
//! on their own, and the `*_cost` and `*_diagnostics` ones are measurements.
|
||||
|
||||
#[path = "cases/determinism.rs"]
|
||||
mod determinism;
|
||||
#[path = "cases/drift.rs"]
|
||||
mod drift;
|
||||
#[path = "cases/idempotence.rs"]
|
||||
mod idempotence;
|
||||
#[path = "cases/layout.rs"]
|
||||
mod layout;
|
||||
#[path = "cases/pointer.rs"]
|
||||
mod pointer;
|
||||
#[path = "cases/pointer_routing.rs"]
|
||||
mod pointer_routing;
|
||||
#[path = "cases/retained.rs"]
|
||||
mod retained;
|
||||
#[path = "cases/scroll.rs"]
|
||||
mod scroll;
|
||||
#[path = "cases/tasks.rs"]
|
||||
mod tasks;
|
||||
#[path = "cases/text_edit.rs"]
|
||||
mod text_edit;
|
||||
#[path = "cases/unsettled.rs"]
|
||||
mod unsettled;
|
||||
Reference in new issue
Block a user