From 2d943e6792f52a31ff3d4d7221b1dcbf968b0f95 Mon Sep 17 00:00:00 2001 From: Michael Sproul Date: Wed, 29 May 2019 17:20:09 +1000 Subject: [PATCH] ef deposit tests: parse bls_setting and skip appropriately --- tests/ef_tests/src/cases/operations_deposit.rs | 4 ++++ tests/ef_tests/tests/tests.rs | 5 ----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/ef_tests/src/cases/operations_deposit.rs b/tests/ef_tests/src/cases/operations_deposit.rs index 1d0b43af97..23b791ba53 100644 --- a/tests/ef_tests/src/cases/operations_deposit.rs +++ b/tests/ef_tests/src/cases/operations_deposit.rs @@ -6,6 +6,7 @@ use types::{BeaconState, Deposit, EthSpec}; #[derive(Debug, Clone, Deserialize)] pub struct OperationsDeposit { + pub bls_setting: Option, pub description: String, #[serde(bound = "E: EthSpec")] pub pre: BeaconState, @@ -26,6 +27,9 @@ impl Case for OperationsDeposit { } fn result(&self, _case_index: usize) -> Result<(), Error> { + if self.bls_setting == Some(cfg!(feature = "fake_crypto") as u8) { + return Ok(()); + } let mut state = self.pre.clone(); let deposit = self.deposit.clone(); let mut expected = self.post.clone(); diff --git a/tests/ef_tests/tests/tests.rs b/tests/ef_tests/tests/tests.rs index 4735a8b18f..ddf13388f0 100644 --- a/tests/ef_tests/tests/tests.rs +++ b/tests/ef_tests/tests/tests.rs @@ -70,7 +70,6 @@ fn shuffling() { } #[test] -#[cfg(not(feature = "fake_crypto"))] fn operations_deposit() { yaml_files_in_test_dir(&Path::new("operations").join("deposit")) .into_par_iter() @@ -80,7 +79,6 @@ fn operations_deposit() { } #[test] -#[cfg(not(feature = "fake_crypto"))] fn operations_transfer() { yaml_files_in_test_dir(&Path::new("operations").join("transfer")) .into_par_iter() @@ -91,7 +89,6 @@ fn operations_transfer() { } #[test] -#[cfg(not(feature = "fake_crypto"))] fn operations_exit() { yaml_files_in_test_dir(&Path::new("operations").join("voluntary_exit")) .into_par_iter() @@ -101,7 +98,6 @@ fn operations_exit() { } #[test] -#[cfg(not(feature = "fake_crypto"))] fn operations_proposer_slashing() { yaml_files_in_test_dir(&Path::new("operations").join("proposer_slashing")) .into_par_iter() @@ -111,7 +107,6 @@ fn operations_proposer_slashing() { } #[test] -#[cfg(not(feature = "fake_crypto"))] fn operations_attester_slashing() { yaml_files_in_test_dir(&Path::new("operations").join("attester_slashing")) .into_par_iter()