Skip to content

Commit

Permalink
Auto merge of #11090 - weihanglo:ignore-test-on-release-mode, r=epage
Browse files Browse the repository at this point in the history
[Beta] Run `reach_max_unpack_size` test only on debug build

`cargo test --release` fails on test `reach_max_unpack_size` as the binary to exercise is optimized. The alternative approach is removing `cfg!(debug_assertions)` from this line.
<https://github.com/rust-lang/cargo/blob/9ef926dafc217bf4ab781ea2d9bbd029359bd241/src/cargo/sources/registry/mod.rs#L842>

#11088
  • Loading branch information
bors committed Sep 15, 2022
2 parents 8ddc422 + ef0e888 commit 099bd8a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/testsuite/registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2698,6 +2698,8 @@ fn http_requires_trailing_slash() {
.run()
}

// Limit the test to debug builds so that `__CARGO_TEST_MAX_UNPACK_SIZE` will take affect.
#[cfg(debug_assertions)]
#[cargo_test]
fn reach_max_unpack_size() {
let p = project()
Expand Down

0 comments on commit 099bd8a

Please sign in to comment.