Skip to content

Commit b01cad9

Browse files
author
Ethan Pailes
committed
Switch CI to run in release mode.
This patch switches the CI script to run tests in release mode. On my machine `cargo test --release` takes about 3.5 mins, which is ok. Ideally, we would just enable release mode for the one test where it matters, but it does not look like either the build.rs API or cargo proper support that yet. Someone with more knowledge might correct me.
1 parent 1378899 commit b01cad9

File tree

2 files changed

+5
-12
lines changed

2 files changed

+5
-12
lines changed

ci/script.sh

+2-6
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,11 @@ if [ "$TRAVIS_RUST_VERSION" = "1.12.0" ]; then
1717
exit
1818
fi
1919

20-
if [ "$TRAVIS_EVENT_TYPE" = "cron" ]; then
21-
export RUST_REGEX_RUN_RANDOM_TESTING=1
22-
fi
23-
2420
# Run tests. If we have nightly, then enable our nightly features.
2521
if [ "$TRAVIS_RUST_VERSION" = "nightly" ]; then
26-
cargo test --verbose --features unstable
22+
cargo test --release --verbose --features unstable
2723
else
28-
cargo test --verbose
24+
cargo test --release --verbose
2925
fi
3026

3127
# Run a test that confirms the shootout benchmarks are correct.

tests/test_crates_regex.rs

+3-6
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,9 @@ mod crates_regex {
4949
fn $test_name() {
5050
use super::consistent::backends_are_consistent;
5151

52-
let run_random = option_env!("RUST_REGEX_RUN_RANDOM_TESTING");
53-
if run_random.is_some() {
54-
match backends_are_consistent($regex_src) {
55-
Ok(_) => {},
56-
Err(err) => panic!("{}", err),
57-
}
52+
match backends_are_consistent($regex_src) {
53+
Ok(_) => {},
54+
Err(err) => panic!("{}", err),
5855
}
5956
}
6057
}

0 commit comments

Comments
 (0)