Skip slow tests by default

This commit is contained in:
Aleksey Kladov 2019-12-07 12:46:36 +01:00
parent 431836f4a0
commit 8ec5f2fcdc
3 changed files with 54 additions and 3 deletions

View file

@ -356,6 +356,17 @@ pub fn read_text(path: &Path) -> String {
.replace("\r\n", "\n")
}
pub fn skip_slow_tests() -> bool {
let should_skip = std::env::var("CI").is_err() && std::env::var("RUN_SLOW_TESTS").is_err();
if should_skip {
eprintln!("ignoring slow test")
} else {
let path = project_dir().join("./target/.slow_tests_cookie");
fs::write(&path, ".").unwrap();
}
should_skip
}
const REWRITE: bool = false;
fn assert_equal_text(expected: &str, actual: &str, path: &Path) {