summaryrefslogtreecommitdiff
path: root/dhall
diff options
context:
space:
mode:
authorNadrieril2019-04-20 23:21:50 +0200
committerNadrieril2019-04-20 23:21:50 +0200
commit7b08af6f398ac9b6c6667382bd6c0c4570dd2918 (patch)
tree3696cd635ec36fc50d006d2cd825723d30c34999 /dhall
parent86be656790103217ab2e164ac7d7458c6f97e570 (diff)
Improve test failure ergonomics
Diffstat (limited to '')
-rw-r--r--dhall/Cargo.toml1
-rw-r--r--dhall/src/tests.rs15
2 files changed, 6 insertions, 10 deletions
diff --git a/dhall/Cargo.toml b/dhall/Cargo.toml
index d1c921f..6766204 100644
--- a/dhall/Cargo.toml
+++ b/dhall/Cargo.toml
@@ -21,6 +21,7 @@ dhall_generator = { path = "../dhall_generator" }
[dev-dependencies]
pretty_assertions = "0.6.1"
+stacker = "0.1.5"
[build-dependencies]
walkdir = "2"
diff --git a/dhall/src/tests.rs b/dhall/src/tests.rs
index 915c181..7f85b5c 100644
--- a/dhall/src/tests.rs
+++ b/dhall/src/tests.rs
@@ -71,16 +71,11 @@ pub fn run_test_with_bigger_stack(
) -> std::result::Result<(), String> {
// Many tests stack overflow in debug mode
let base_path: String = base_path.to_string();
- std::thread::Builder::new()
- .stack_size(4 * 1024 * 1024)
- .spawn(move || {
- run_test(&base_path, feature, status)
- .map_err(|e| e.to_string())
- .map(|_| ())
- })
- .unwrap()
- .join()
- .unwrap()
+ stacker::grow(4 * 1024 * 1024, move || {
+ run_test(&base_path, feature, status)
+ .map_err(|e| e.to_string())
+ .map(|_| ())
+ })
}
pub fn run_test(