From 801f6f74250b91bb47f5dece795cec96bc0eb84e Mon Sep 17 00:00:00 2001 From: Paul Hauner Date: Sat, 2 Oct 2021 05:57:50 +1000 Subject: [PATCH] Disable autotests for beacon_chain (#2658) --- beacon_node/beacon_chain/Cargo.toml | 5 +++++ beacon_node/beacon_chain/tests/attestation_production.rs | 4 +--- beacon_node/beacon_chain/tests/attestation_verification.rs | 4 +--- beacon_node/beacon_chain/tests/block_verification.rs | 4 +--- beacon_node/beacon_chain/tests/main.rs | 7 +++++++ beacon_node/beacon_chain/tests/op_verification.rs | 4 +--- .../beacon_chain/tests/sync_committee_verification.rs | 4 +--- beacon_node/beacon_chain/tests/tests.rs | 4 +--- 8 files changed, 18 insertions(+), 18 deletions(-) create mode 100644 beacon_node/beacon_chain/tests/main.rs diff --git a/beacon_node/beacon_chain/Cargo.toml b/beacon_node/beacon_chain/Cargo.toml index 069557550..c9063a3cc 100644 --- a/beacon_node/beacon_chain/Cargo.toml +++ b/beacon_node/beacon_chain/Cargo.toml @@ -3,6 +3,7 @@ name = "beacon_chain" version = "0.2.0" authors = ["Paul Hauner ", "Age Manning "] edition = "2018" +autotests = false # using a single test binary compiles faster [features] default = ["participation_metrics"] @@ -56,3 +57,7 @@ eth2 = { path = "../../common/eth2" } strum = { version = "0.21.0", features = ["derive"] } logging = { path = "../../common/logging" } execution_layer = { path = "../execution_layer" } + +[[test]] +name = "beacon_chain_tests" +path = "tests/main.rs" diff --git a/beacon_node/beacon_chain/tests/attestation_production.rs b/beacon_node/beacon_chain/tests/attestation_production.rs index d2f564146..1ce2411c4 100644 --- a/beacon_node/beacon_chain/tests/attestation_production.rs +++ b/beacon_node/beacon_chain/tests/attestation_production.rs @@ -1,10 +1,8 @@ #![cfg(not(debug_assertions))] -#[macro_use] -extern crate lazy_static; - use beacon_chain::test_utils::{AttestationStrategy, BeaconChainHarness, BlockStrategy}; use beacon_chain::{StateSkipConfig, WhenSlotSkipped}; +use lazy_static::lazy_static; use tree_hash::TreeHash; use types::{AggregateSignature, EthSpec, Keypair, MainnetEthSpec, RelativeEpoch, Slot}; diff --git a/beacon_node/beacon_chain/tests/attestation_verification.rs b/beacon_node/beacon_chain/tests/attestation_verification.rs index 45d316e3d..f5942a2be 100644 --- a/beacon_node/beacon_chain/tests/attestation_verification.rs +++ b/beacon_node/beacon_chain/tests/attestation_verification.rs @@ -1,8 +1,5 @@ #![cfg(not(debug_assertions))] -#[macro_use] -extern crate lazy_static; - use beacon_chain::{ attestation_verification::Error as AttnError, test_utils::{ @@ -11,6 +8,7 @@ use beacon_chain::{ BeaconChain, BeaconChainTypes, WhenSlotSkipped, }; use int_to_bytes::int_to_bytes32; +use lazy_static::lazy_static; use state_processing::{ per_block_processing::errors::AttestationValidationError, per_slot_processing, }; diff --git a/beacon_node/beacon_chain/tests/block_verification.rs b/beacon_node/beacon_chain/tests/block_verification.rs index 93b303c26..e3fd4de1b 100644 --- a/beacon_node/beacon_chain/tests/block_verification.rs +++ b/beacon_node/beacon_chain/tests/block_verification.rs @@ -1,12 +1,10 @@ #![cfg(not(debug_assertions))] -#[macro_use] -extern crate lazy_static; - use beacon_chain::test_utils::{ AttestationStrategy, BeaconChainHarness, BlockStrategy, EphemeralHarnessType, }; use beacon_chain::{BeaconSnapshot, BlockError, ChainSegmentResult}; +use lazy_static::lazy_static; use logging::test_logger; use slasher::{Config as SlasherConfig, Slasher}; use state_processing::{ diff --git a/beacon_node/beacon_chain/tests/main.rs b/beacon_node/beacon_chain/tests/main.rs new file mode 100644 index 000000000..fb942d24e --- /dev/null +++ b/beacon_node/beacon_chain/tests/main.rs @@ -0,0 +1,7 @@ +mod attestation_production; +mod attestation_verification; +mod block_verification; +mod op_verification; +mod store_tests; +mod sync_committee_verification; +mod tests; diff --git a/beacon_node/beacon_chain/tests/op_verification.rs b/beacon_node/beacon_chain/tests/op_verification.rs index 56e76cffe..ec22a4804 100644 --- a/beacon_node/beacon_chain/tests/op_verification.rs +++ b/beacon_node/beacon_chain/tests/op_verification.rs @@ -2,13 +2,11 @@ #![cfg(not(debug_assertions))] -#[macro_use] -extern crate lazy_static; - use beacon_chain::observed_operations::ObservationOutcome; use beacon_chain::test_utils::{ test_spec, AttestationStrategy, BeaconChainHarness, BlockStrategy, DiskHarnessType, }; +use lazy_static::lazy_static; use sloggers::{null::NullLoggerBuilder, Build}; use std::sync::Arc; use store::{LevelDB, StoreConfig}; diff --git a/beacon_node/beacon_chain/tests/sync_committee_verification.rs b/beacon_node/beacon_chain/tests/sync_committee_verification.rs index 7326a02f4..2596ff18c 100644 --- a/beacon_node/beacon_chain/tests/sync_committee_verification.rs +++ b/beacon_node/beacon_chain/tests/sync_committee_verification.rs @@ -1,11 +1,9 @@ #![cfg(not(debug_assertions))] -#[macro_use] -extern crate lazy_static; - use beacon_chain::sync_committee_verification::Error as SyncCommitteeError; use beacon_chain::test_utils::{BeaconChainHarness, EphemeralHarnessType, RelativeSyncCommittee}; use int_to_bytes::int_to_bytes32; +use lazy_static::lazy_static; use safe_arith::SafeArith; use store::{SignedContributionAndProof, SyncCommitteeMessage}; use tree_hash::TreeHash; diff --git a/beacon_node/beacon_chain/tests/tests.rs b/beacon_node/beacon_chain/tests/tests.rs index 5b85da5bf..4f2d3904e 100644 --- a/beacon_node/beacon_chain/tests/tests.rs +++ b/beacon_node/beacon_chain/tests/tests.rs @@ -1,8 +1,5 @@ #![cfg(not(debug_assertions))] -#[macro_use] -extern crate lazy_static; - use beacon_chain::{ attestation_verification::Error as AttnError, test_utils::{ @@ -11,6 +8,7 @@ use beacon_chain::{ }, StateSkipConfig, WhenSlotSkipped, }; +use lazy_static::lazy_static; use operation_pool::PersistedOperationPool; use state_processing::{ per_slot_processing, per_slot_processing::Error as SlotProcessingError, EpochProcessingError,