diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3e3e10aa8f..58f716d7a9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -72,6 +72,7 @@ jobs: --release --workspace ${{ steps.prepare.outputs.feature-flags }} + --features expensive-tests -- --ignored - name: Verify working directory is clean run: git diff --exit-code diff --git a/zcash_client_sqlite/Cargo.toml b/zcash_client_sqlite/Cargo.toml index 45e4754523..ff10c0e1b4 100644 --- a/zcash_client_sqlite/Cargo.toml +++ b/zcash_client_sqlite/Cargo.toml @@ -127,5 +127,8 @@ transparent-inputs = [ ## Exposes unstable APIs. Their behaviour may change at any time. unstable = ["zcash_client_backend/unstable"] +## A feature used to isolate tests that are expensive to run. Test-only. +expensive-tests = [] + [lib] bench = false diff --git a/zcash_client_sqlite/src/wallet/orchard.rs b/zcash_client_sqlite/src/wallet/orchard.rs index dbc1d0b68c..40ca5dc43f 100644 --- a/zcash_client_sqlite/src/wallet/orchard.rs +++ b/zcash_client_sqlite/src/wallet/orchard.rs @@ -597,6 +597,7 @@ pub(crate) mod tests { #[test] #[ignore] // FIXME: #1316 This requires support for dust outputs. + #[cfg(not(feature = "expensive-tests"))] fn zip317_spend() { testing::pool::zip317_spend::() } diff --git a/zcash_client_sqlite/src/wallet/sapling.rs b/zcash_client_sqlite/src/wallet/sapling.rs index d4a20b245b..efca725044 100644 --- a/zcash_client_sqlite/src/wallet/sapling.rs +++ b/zcash_client_sqlite/src/wallet/sapling.rs @@ -603,6 +603,7 @@ pub(crate) mod tests { #[test] #[ignore] // FIXME: #1316 This requires support for dust outputs. + #[cfg(not(feature = "expensive-tests"))] fn zip317_spend() { testing::pool::zip317_spend::() } diff --git a/zcash_primitives/Cargo.toml b/zcash_primitives/Cargo.toml index 69a7d3e131..b8f24b84cf 100644 --- a/zcash_primitives/Cargo.toml +++ b/zcash_primitives/Cargo.toml @@ -123,6 +123,9 @@ test-dependencies = [ "zcash_protocol/test-dependencies", ] +## A feature used to isolate tests that are expensive to run. Test-only. +expensive-tests = [] + [lib] bench = false diff --git a/zcash_primitives/src/transaction/tests.rs b/zcash_primitives/src/transaction/tests.rs index 09552226e1..6aa63b29c8 100644 --- a/zcash_primitives/src/transaction/tests.rs +++ b/zcash_primitives/src/transaction/tests.rs @@ -62,6 +62,7 @@ fn check_roundtrip(tx: Transaction) -> Result<(), TestCaseError> { proptest! { #[test] #[ignore] + #[cfg(feature = "expensive-tests")] fn tx_serialization_roundtrip_sprout(tx in arb_tx(BranchId::Sprout)) { check_roundtrip(tx)?; } @@ -70,6 +71,7 @@ proptest! { proptest! { #[test] #[ignore] + #[cfg(feature = "expensive-tests")] fn tx_serialization_roundtrip_overwinter(tx in arb_tx(BranchId::Overwinter)) { check_roundtrip(tx)?; } @@ -78,6 +80,7 @@ proptest! { proptest! { #[test] #[ignore] + #[cfg(feature = "expensive-tests")] fn tx_serialization_roundtrip_sapling(tx in arb_tx(BranchId::Sapling)) { check_roundtrip(tx)?; } @@ -86,6 +89,7 @@ proptest! { proptest! { #[test] #[ignore] + #[cfg(feature = "expensive-tests")] fn tx_serialization_roundtrip_blossom(tx in arb_tx(BranchId::Blossom)) { check_roundtrip(tx)?; } @@ -94,6 +98,7 @@ proptest! { proptest! { #[test] #[ignore] + #[cfg(feature = "expensive-tests")] fn tx_serialization_roundtrip_heartwood(tx in arb_tx(BranchId::Heartwood)) { check_roundtrip(tx)?; } @@ -119,6 +124,7 @@ proptest! { proptest! { #[test] #[ignore] + #[cfg(feature = "expensive-tests")] fn tx_serialization_roundtrip_future(tx in arb_tx(BranchId::ZFuture)) { check_roundtrip(tx)?; } diff --git a/zcash_proofs/Cargo.toml b/zcash_proofs/Cargo.toml index bac725b723..9b4eb37026 100644 --- a/zcash_proofs/Cargo.toml +++ b/zcash_proofs/Cargo.toml @@ -67,6 +67,9 @@ local-prover = ["directories"] ## Enables multithreading support for creating proofs. multicore = ["bellman/multicore", "zcash_primitives/multicore"] +## A feature used to isolate tests that are expensive to run. Test-only. +expensive-tests = [] + [lib] bench = false diff --git a/zcash_proofs/src/circuit/sprout/mod.rs b/zcash_proofs/src/circuit/sprout/mod.rs index 7adddb0794..4c71e92569 100644 --- a/zcash_proofs/src/circuit/sprout/mod.rs +++ b/zcash_proofs/src/circuit/sprout/mod.rs @@ -335,6 +335,7 @@ where #[test] #[ignore] +#[cfg(feature = "expensive-tests")] fn test_sprout_constraints() { use bellman::gadgets::test::*; use bls12_381::Scalar;