diff options
| author | Nadrieril | 2019-04-07 01:41:08 +0200 | 
|---|---|---|
| committer | Nadrieril | 2019-04-07 01:41:52 +0200 | 
| commit | 619290e208f59bb15fc4f9d4b6dae2c19bb7b711 (patch) | |
| tree | 37ae412b592fc4ae7ca9c109ef97e0600f3588b3 /dhall/tests/common/mod.rs | |
| parent | b96f187dfc6373b6e2faee01e085d7e3dff893ca (diff) | |
Augment stack size for typecheck tests
Diffstat (limited to 'dhall/tests/common/mod.rs')
| -rw-r--r-- | dhall/tests/common/mod.rs | 20 | 
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"; | 
