diff options
| author | Amos Wenger <amoswenger@gmail.com> | 2022-07-22 18:16:46 +0200 |
|---|---|---|
| committer | Amos Wenger <amoswenger@gmail.com> | 2022-07-24 10:38:19 +0200 |
| commit | 5f3f4284ddb63d703eb717f75d16365e5a1442e5 (patch) | |
| tree | f3d78d955a2eb48d204e9172b178e1de3f7cd5dd | |
| parent | 977e12a0bdc3e329af179ef3a9d466af9eb613bb (diff) | |
| download | rust-5f3f4284ddb63d703eb717f75d16365e5a1442e5.tar.gz rust-5f3f4284ddb63d703eb717f75d16365e5a1442e5.zip | |
Don't run slow tests in Rust CI, only RA CI
| -rw-r--r-- | crates/test-utils/src/lib.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/crates/test-utils/src/lib.rs b/crates/test-utils/src/lib.rs index dedfbd7afef..8a9cfb6c22e 100644 --- a/crates/test-utils/src/lib.rs +++ b/crates/test-utils/src/lib.rs @@ -8,9 +8,9 @@ #![warn(rust_2018_idioms, unused_lifetimes, semicolon_in_expressions_from_macros)] +mod assert_linear; pub mod bench_fixture; mod fixture; -mod assert_linear; use std::{ collections::BTreeMap, @@ -391,7 +391,8 @@ fn main() { /// also creates a file at `./target/.slow_tests_cookie` which serves as a flag /// that slow tests did run. pub fn skip_slow_tests() -> bool { - let should_skip = std::env::var("CI").is_err() && std::env::var("RUN_SLOW_TESTS").is_err(); + let should_skip = (std::env::var("CI").is_err() && std::env::var("RUN_SLOW_TESTS").is_err()) + || std::env::var("SKIP_SLOW_TESTS").is_ok(); if should_skip { eprintln!("ignoring slow test"); } else { @@ -475,7 +476,7 @@ pub fn ensure_file_contents(file: &Path, contents: &str) { pub fn try_ensure_file_contents(file: &Path, contents: &str) -> Result<(), ()> { match std::fs::read_to_string(file) { Ok(old_contents) if normalize_newlines(&old_contents) == normalize_newlines(contents) => { - return Ok(()) + return Ok(()); } _ => (), } |
