diff options
author | Griffin Smith <root@gws.fyi> | 2022-09-20T21·21-0400 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2022-09-20T23·41+0000 |
commit | f600aa5322f6628e1af63e9dd4c6ad073020e152 (patch) | |
tree | 39ba65bd9742131a5773e253448a656bfc5abbc0 /tvix | |
parent | 876c4772563e8129e069f1d107b2a21378609ace (diff) |
test(tvix/eval): Make proptests a bit smaller r/4942
Generate smaller recursive values for generated Values, and run fewer cases for the attrs proptests which are particularly egregious. Change-Id: Ia35c7c120270feaf045be1deb440c87ebb185c27 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6716 Autosubmit: grfn <grfn@gws.fyi> Reviewed-by: tazjin <tazjin@tvl.su> Reviewed-by: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI
Diffstat (limited to 'tvix')
-rw-r--r-- | tvix/eval/src/value/arbitrary.rs | 2 | ||||
-rw-r--r-- | tvix/eval/src/value/attrs/tests.rs | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/tvix/eval/src/value/arbitrary.rs b/tvix/eval/src/value/arbitrary.rs index 56ccd3b28ab6..20be3732e007 100644 --- a/tvix/eval/src/value/arbitrary.rs +++ b/tvix/eval/src/value/arbitrary.rs @@ -63,7 +63,7 @@ fn leaf_value() -> impl Strategy<Value = Value> { } fn non_internal_value() -> impl Strategy<Value = Value> { - leaf_value().prop_recursive(10, 256, 10, |inner| { + leaf_value().prop_recursive(3, 5, 5, |inner| { prop_oneof![ any_with::<NixAttrs>(( Default::default(), diff --git a/tvix/eval/src/value/attrs/tests.rs b/tvix/eval/src/value/attrs/tests.rs index 539a07e00f79..4556d26dd00f 100644 --- a/tvix/eval/src/value/attrs/tests.rs +++ b/tvix/eval/src/value/attrs/tests.rs @@ -7,7 +7,7 @@ mod nix_eq { use proptest::prelude::ProptestConfig; use test_strategy::proptest; - #[proptest(ProptestConfig { cases: 5, ..Default::default() })] + #[proptest(ProptestConfig { cases: 2, ..Default::default() })] fn reflexive(x: NixAttrs) { let mut observer = NoOpObserver {}; let mut vm = VM::new(&mut observer); @@ -15,7 +15,7 @@ mod nix_eq { assert!(x.nix_eq(&x, &mut vm).unwrap()) } - #[proptest(ProptestConfig { cases: 5, ..Default::default() })] + #[proptest(ProptestConfig { cases: 2, ..Default::default() })] fn symmetric(x: NixAttrs, y: NixAttrs) { let mut observer = NoOpObserver {}; let mut vm = VM::new(&mut observer); @@ -26,7 +26,7 @@ mod nix_eq { ) } - #[proptest(ProptestConfig { cases: 5, ..Default::default() })] + #[proptest(ProptestConfig { cases: 2, ..Default::default() })] fn transitive(x: NixAttrs, y: NixAttrs, z: NixAttrs) { let mut observer = NoOpObserver {}; let mut vm = VM::new(&mut observer); |