Fail test_round_trip if RUST_MIN_STACK is not set to a valid value.
Some tests like tests/rust/src/test/run-pass/super-fast-paren-parsing.rs
require it to be atleast 16 MiB.
@@ -63,6 +63,12 @@ fn filter(entry: &DirEntry) -> bool {
#[test]
fn test_round_trip() {
+ {
+ let min_stack_value = std::env::var("RUST_MIN_STACK").expect("RUST_MIN_STACK env var should be set since some tests require it.");
+ let min_stack_value: usize = min_stack_value.parse().expect("RUST_MIN_STACK env var should be set since some tests require it.");
+ assert!(min_stack_value >= 16000000);
+ }
+
let mut failed = 0;
let walk = WalkDir::new("tests/rust").sort_by(|a, b| a.cmp(b));
