mirror of
https://github.com/Devolutions/IronRDP.git
synced 2025-08-03 14:48:17 +00:00

Put all integration tests in a single crate, and organized in modules. This is similar to what was done in `cargo` repository: https://github.com/rust-lang/cargo/pull/5022#issuecomment-364691154 ``` $ rustup show stable-x86_64-unknown-linux-gnu (default) rustc 1.69.0 (84c898d65 2023-04-16) ``` Run on a recent high-end laptop: 12th Gen Intel(R) Core(TM) i9-12900HK Original (multiple integration binaries): - `cargo clean && cargo test --no-run`: 62.893s - `cargo clean && cargo build --lib`: 54.959s - `cargo clean && cargo build --bins`: 55.933s - `cargo test --no-run` (after `cargo build`): 14.472s - `cargo test` (after `cargo test --no-run`): 1.786s - `du -hs target/`: 4.2G After (ironrdp-testsuite): - `cargo clean && cargo test --no-run`: 41.157s (crates with no tests are ignored) - `cargo clean && cargo build --lib`: 53.983s - `cargo clean && cargo build --bins`: 54.482s - `cargo test --no-run` (after `cargo build`): 12.915s - `cargo test` (after `cargo test --no-run`): 0.240s - `du -hs target/`: 3.4G Absolute diff: - `cargo clean && cargo test --no-run`: -21.736s - `cargo clean && cargo build --lib`: -0.976s - `cargo clean && cargo build --bins`: -1.451s - `cargo test --no-run` (after `cargo build`): -1.557s - `cargo test` (after `cargo test --no-run`): -1.546s - `du -hs target/`: -0.8G Relative diff (%): - `cargo clean && cargo test --no-run`: -34.5% - `cargo clean && cargo build --lib`: -1.77% - `cargo clean && cargo build --bins`: -2.59% - `cargo test --no-run` (after `cargo build`): -10.7% - `cargo test` (after `cargo test --no-run`): -86.5% - `du -hs target/`: -19.0%
17 lines
628 B
Rust
17 lines
628 B
Rust
//! Integration Tests (IT)
|
|
//!
|
|
//! Integration tests are all contained in this single crate, and organized in modules.
|
|
//! This is to prevent `rustc` to re-link the library crates with each of the integration
|
|
//! tests (one for each *.rs file / test crate under the `tests/` folder).
|
|
//! Performance implication: https://github.com/rust-lang/cargo/pull/5022#issuecomment-364691154
|
|
//!
|
|
//! This is also good for execution performance.
|
|
//! Cargo will run all tests from a single binary in parallel, but
|
|
//! binaries themselves are run sequentally.
|
|
|
|
mod graphics;
|
|
mod input;
|
|
mod pdu;
|
|
mod rdcleanpath;
|
|
mod server_name;
|
|
mod session;
|