Put expensive tests behind an additional `expensive-tests` feature flag.

This commit is contained in:
Kris Nuttycombe 2024-03-25 13:27:42 -06:00
parent 0d8f5692df
commit bda72e36eb
8 changed files with 19 additions and 0 deletions

View File

@ -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

View File

@ -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

View File

@ -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::<OrchardPoolTester>()
}

View File

@ -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::<SaplingPoolTester>()
}

View File

@ -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

View File

@ -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)?;
}

View File

@ -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

View File

@ -335,6 +335,7 @@ where
#[test]
#[ignore]
#[cfg(feature = "expensive-tests")]
fn test_sprout_constraints() {
use bellman::gadgets::test::*;
use bls12_381::Scalar;