summaryrefslogtreecommitdiff
path: root/dhall/tests/common
diff options
context:
space:
mode:
Diffstat (limited to 'dhall/tests/common')
-rw-r--r--dhall/tests/common/mod.rs20
1 files changed, 15 insertions, 5 deletions
diff --git a/dhall/tests/common/mod.rs b/dhall/tests/common/mod.rs
index 861df63..3c2fc3c 100644
--- a/dhall/tests/common/mod.rs
+++ b/dhall/tests/common/mod.rs
@@ -113,11 +113,21 @@ pub fn run_test(base_path: &str, feature: Feature) {
typecheck::type_of(expr).unwrap_err();
}
TypecheckSuccess => {
- let expr_file_path = base_path.clone() + "A.dhall";
- let expected_file_path = base_path + "B.dhall";
- let expr = rc(read_dhall_file(&expr_file_path).unwrap());
- let expected = rc(read_dhall_file(&expected_file_path).unwrap());
- typecheck::type_of(rc(ExprF::Annot(expr, expected))).unwrap();
+ // Many tests stack overflow in debug mode
+ std::thread::Builder::new()
+ .stack_size(4 * 1024 * 1024)
+ .spawn(|| {
+ let expr_file_path = base_path.clone() + "A.dhall";
+ let expected_file_path = base_path + "B.dhall";
+ let expr = rc(read_dhall_file(&expr_file_path).unwrap());
+ let expected =
+ rc(read_dhall_file(&expected_file_path).unwrap());
+ typecheck::type_of(rc(ExprF::Annot(expr, expected)))
+ .unwrap();
+ })
+ .unwrap()
+ .join()
+ .unwrap();
}
TypeInferenceFailure => {
let file_path = base_path + ".dhall";