Skip to content

Commit 5f3f428

Browse files
Don't run slow tests in Rust CI, only RA CI
1 parent 977e12a commit 5f3f428

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

crates/test-utils/src/lib.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
99
#![warn(rust_2018_idioms, unused_lifetimes, semicolon_in_expressions_from_macros)]
1010

11+
mod assert_linear;
1112
pub mod bench_fixture;
1213
mod fixture;
13-
mod assert_linear;
1414

1515
use std::{
1616
collections::BTreeMap,
@@ -391,7 +391,8 @@ fn main() {
391391
/// also creates a file at `./target/.slow_tests_cookie` which serves as a flag
392392
/// that slow tests did run.
393393
pub fn skip_slow_tests() -> bool {
394-
let should_skip = std::env::var("CI").is_err() && std::env::var("RUN_SLOW_TESTS").is_err();
394+
let should_skip = (std::env::var("CI").is_err() && std::env::var("RUN_SLOW_TESTS").is_err())
395+
|| std::env::var("SKIP_SLOW_TESTS").is_ok();
395396
if should_skip {
396397
eprintln!("ignoring slow test");
397398
} else {
@@ -475,7 +476,7 @@ pub fn ensure_file_contents(file: &Path, contents: &str) {
475476
pub fn try_ensure_file_contents(file: &Path, contents: &str) -> Result<(), ()> {
476477
match std::fs::read_to_string(file) {
477478
Ok(old_contents) if normalize_newlines(&old_contents) == normalize_newlines(contents) => {
478-
return Ok(())
479+
return Ok(());
479480
}
480481
_ => (),
481482
}

0 commit comments

Comments
 (0)