From 1de84b48b0c03e8925a2169dd807fc57e222844d Mon Sep 17 00:00:00 2001 From: Wei Tang Date: Thu, 31 May 2018 15:48:13 +0800 Subject: [PATCH 1/3] Mark test helpers and test-only specs as cfg(test) --- Cargo.lock | 8 ++++++++ ethcore/private-tx/Cargo.toml | 3 +++ ethcore/src/client/mod.rs | 4 ++++ ethcore/src/lib.rs | 4 ++-- ethcore/src/spec/spec.rs | 26 +++++++++++++++++++------- ethcore/test_helpers/Cargo.toml | 10 ++++++++++ ethcore/test_helpers/src/lib.rs | 22 ++++++++++++++++++++++ 7 files changed, 68 insertions(+), 9 deletions(-) create mode 100644 ethcore/test_helpers/Cargo.toml create mode 100644 ethcore/test_helpers/src/lib.rs diff --git a/Cargo.lock b/Cargo.lock index c8e60dce693..8b45b8c23ec 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -763,6 +763,7 @@ dependencies = [ "ethcore-io 1.12.0", "ethcore-logger 1.12.0", "ethcore-miner 1.12.0", + "ethcore-test-helpers 1.12.0", "ethcore-transaction 0.1.0", "ethereum-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "ethjson 0.1.0", @@ -891,6 +892,13 @@ dependencies = [ "triehash 0.1.0", ] +[[package]] +name = "ethcore-test-helpers" +version = "1.12.0" +dependencies = [ + "ethcore 1.12.0", +] + [[package]] name = "ethcore-transaction" version = "0.1.0" diff --git a/ethcore/private-tx/Cargo.toml b/ethcore/private-tx/Cargo.toml index 0fa11aec84b..5cb7766115d 100644 --- a/ethcore/private-tx/Cargo.toml +++ b/ethcore/private-tx/Cargo.toml @@ -35,3 +35,6 @@ serde_derive = "1.0" serde_json = "1.0" tiny-keccak = "1.3" url = "1" + +[dev-dependencies] +ethcore-test-helpers = { path = "../test_helpers" } diff --git a/ethcore/src/client/mod.rs b/ethcore/src/client/mod.rs index 4c410d30117..581574a2d68 100644 --- a/ethcore/src/client/mod.rs +++ b/ethcore/src/client/mod.rs @@ -20,16 +20,20 @@ mod ancient_import; mod client; mod config; mod error; +#[cfg(test)] mod evm_test_client; mod io_message; +#[cfg(test)] mod test_client; mod trace; pub use self::client::*; pub use self::config::{Mode, ClientConfig, DatabaseCompactionProfile, BlockChainConfig, VMType}; pub use self::error::Error; +#[cfg(test)] pub use self::evm_test_client::{EvmTestClient, EvmTestError, TransactResult}; pub use self::io_message::ClientIoMessage; +#[cfg(test)] pub use self::test_client::{TestBlockChainClient, EachBlockWith}; pub use self::chain_notify::{ChainNotify, ChainRoute, ChainRouteType, ChainMessageType}; pub use self::traits::{ diff --git a/ethcore/src/lib.rs b/ethcore/src/lib.rs index b1782cb1d6c..b72fcc32135 100644 --- a/ethcore/src/lib.rs +++ b/ethcore/src/lib.rs @@ -157,8 +157,6 @@ pub mod snapshot; pub mod spec; pub mod state; pub mod state_db; -// Test helpers made public for usage outside ethcore -pub mod test_helpers; pub mod trace; pub mod verification; @@ -178,6 +176,8 @@ mod tests; #[cfg(feature="json-tests")] mod json_tests; #[cfg(test)] +mod test_helpers; +#[cfg(test)] mod test_helpers_internal; pub use types::*; diff --git a/ethcore/src/spec/spec.rs b/ethcore/src/spec/spec.rs index 98720647d8f..bf8e051cb30 100644 --- a/ethcore/src/spec/spec.rs +++ b/ethcore/src/spec/spec.rs @@ -516,6 +516,7 @@ macro_rules! load_bundled { }; } +#[cfg(test)] macro_rules! load_machine_bundled { ($e:expr) => { Spec::load_machine( @@ -839,39 +840,44 @@ impl Spec { self.engine.genesis_epoch_data(&genesis, &call) } + /// Create a new Spec with InstantSeal consensus which does internal sealing (not requiring + /// work). + pub fn new_instant() -> Spec { + load_bundled!("instant_seal") + } + /// Create a new Spec which conforms to the Frontier-era Morden chain except that it's a /// NullEngine consensus. + #[cfg(test)] pub fn new_test() -> Spec { load_bundled!("null_morden") } /// Create the EthereumMachine corresponding to Spec::new_test. + #[cfg(test)] pub fn new_test_machine() -> EthereumMachine { load_machine_bundled!("null_morden") } - /// Create a new Spec which conforms to the Frontier-era Morden chain except that it's a NullEngine consensus with applying reward on block close. + #[cfg(test)] pub fn new_test_with_reward() -> Spec { load_bundled!("null_morden_with_reward") } /// Create a new Spec which is a NullEngine consensus with a premine of address whose /// secret is keccak(''). + #[cfg(test)] pub fn new_null() -> Spec { load_bundled!("null") } /// Create a new Spec which constructs a contract at address 5 with storage at 0 equal to 1. + #[cfg(test)] pub fn new_test_constructor() -> Spec { load_bundled!("constructor") } - /// Create a new Spec with InstantSeal consensus which does internal sealing (not requiring - /// work). - pub fn new_instant() -> Spec { - load_bundled!("instant_seal") - } - /// Create a new Spec with AuthorityRound consensus which does internal sealing (not /// requiring work). /// Accounts with secrets keccak("0") and keccak("1") are the validators. + #[cfg(test)] pub fn new_test_round() -> Self { load_bundled!("authority_round") } @@ -879,6 +885,7 @@ impl Spec { /// Create a new Spec with AuthorityRound consensus which does internal sealing (not /// requiring work) with empty step messages enabled. /// Accounts with secrets keccak("0") and keccak("1") are the validators. + #[cfg(test)] pub fn new_test_round_empty_steps() -> Self { load_bundled!("authority_round_empty_steps") } @@ -886,6 +893,7 @@ impl Spec { /// Create a new Spec with AuthorityRound consensus (with empty steps) using a block reward /// contract. The contract source code can be found at: /// https://github.com/parity-contracts/block-reward/blob/daf7d44383b6cdb11cb6b953b018648e2b027cfb/contracts/ExampleBlockReward.sol + #[cfg(test)] pub fn new_test_round_block_reward_contract() -> Self { load_bundled!("authority_round_block_reward_contract") } @@ -893,6 +901,7 @@ impl Spec { /// Create a new Spec with Tendermint consensus which does internal sealing (not requiring /// work). /// Account keccak("0") and keccak("1") are a authorities. + #[cfg(test)] pub fn new_test_tendermint() -> Self { load_bundled!("tendermint") } @@ -905,6 +914,7 @@ impl Spec { /// "0xbfc708a000000000000000000000000082a978b3f5962a5b0957d9ee9eef472ee55b42f1" and added /// back in using /// "0x4d238c8e00000000000000000000000082a978b3f5962a5b0957d9ee9eef472ee55b42f1". + #[cfg(test)] pub fn new_validator_safe_contract() -> Self { load_bundled!("validator_safe_contract") } @@ -912,6 +922,7 @@ impl Spec { /// The same as the `safeContract`, but allows reporting and uses AuthorityRound. /// Account is marked with `reportBenign` it can be checked as disliked with "0xd8f2e0bf". /// Validator can be removed with `reportMalicious`. + #[cfg(test)] pub fn new_validator_contract() -> Self { load_bundled!("validator_contract") } @@ -920,6 +931,7 @@ impl Spec { /// height. /// Account with secrets keccak("0") is the validator for block 1 and with keccak("1") /// onwards. + #[cfg(test)] pub fn new_validator_multi() -> Self { load_bundled!("validator_multi") } diff --git a/ethcore/test_helpers/Cargo.toml b/ethcore/test_helpers/Cargo.toml new file mode 100644 index 00000000000..35524d363a0 --- /dev/null +++ b/ethcore/test_helpers/Cargo.toml @@ -0,0 +1,10 @@ +[package] +description = "Ethcore public test helpers" +homepage = "http://parity.io" +license = "GPL-3.0" +name = "ethcore-test-helpers" +version = "1.12.0" +authors = ["Parity Technologies "] + +[dependencies] +ethcore = { path = ".." } diff --git a/ethcore/test_helpers/src/lib.rs b/ethcore/test_helpers/src/lib.rs new file mode 100644 index 00000000000..ab5501c5fdc --- /dev/null +++ b/ethcore/test_helpers/src/lib.rs @@ -0,0 +1,22 @@ +// Copyright 2015-2017 Parity Technologies (UK) Ltd. +// This file is part of Parity. + +// Parity is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// Parity is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Parity. If not, see . + +//! Ethcore public test helpers. + +#[path="../../src/test_helpers.rs"] +mod helpers; + +pub use helpers::*; From 6d969ed38a5f04f3d15e0f8f69f159c4c2ab4573 Mon Sep 17 00:00:00 2001 From: Wei Tang Date: Thu, 31 May 2018 17:42:15 +0800 Subject: [PATCH 2/3] Use test-probe to conditionally compile test helpers --- Cargo.lock | 5 ++-- ethcore/Cargo.toml | 2 ++ ethcore/private-tx/Cargo.toml | 3 ++- ethcore/private-tx/src/lib.rs | 2 ++ ethcore/src/client/mod.rs | 8 +++--- ethcore/src/lib.rs | 4 +-- ethcore/src/spec/spec.rs | 26 +++++++++---------- ethcore/sync/Cargo.toml | 1 + ethcore/sync/src/lib.rs | 1 + .../{test_helpers => test_probe}/Cargo.toml | 6 ++--- .../{test_helpers => test_probe}/src/lib.rs | 7 ++--- 11 files changed, 35 insertions(+), 30 deletions(-) rename ethcore/{test_helpers => test_probe}/Cargo.toml (50%) rename ethcore/{test_helpers => test_probe}/src/lib.rs (87%) diff --git a/Cargo.lock b/Cargo.lock index 8b45b8c23ec..d3982f47326 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -763,7 +763,7 @@ dependencies = [ "ethcore-io 1.12.0", "ethcore-logger 1.12.0", "ethcore-miner 1.12.0", - "ethcore-test-helpers 1.12.0", + "ethcore-test-probe 1.12.0", "ethcore-transaction 0.1.0", "ethereum-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "ethjson 0.1.0", @@ -871,6 +871,7 @@ dependencies = [ "ethcore-network 1.12.0", "ethcore-network-devp2p 1.12.0", "ethcore-private-tx 1.0.0", + "ethcore-test-probe 1.12.0", "ethcore-transaction 0.1.0", "ethereum-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "ethkey 0.3.0", @@ -893,7 +894,7 @@ dependencies = [ ] [[package]] -name = "ethcore-test-helpers" +name = "ethcore-test-probe" version = "1.12.0" dependencies = [ "ethcore 1.12.0", diff --git a/ethcore/Cargo.toml b/ethcore/Cargo.toml index 71c84a293f9..2b6ab9ebc3a 100644 --- a/ethcore/Cargo.toml +++ b/ethcore/Cargo.toml @@ -89,3 +89,5 @@ json-tests = ["ethcore-transaction/json-tests"] test-heavy = [] # Compile benches benches = [] +# Compile test helpers +test-helpers = [] diff --git a/ethcore/private-tx/Cargo.toml b/ethcore/private-tx/Cargo.toml index 5cb7766115d..68bf4ea5220 100644 --- a/ethcore/private-tx/Cargo.toml +++ b/ethcore/private-tx/Cargo.toml @@ -37,4 +37,5 @@ tiny-keccak = "1.3" url = "1" [dev-dependencies] -ethcore-test-helpers = { path = "../test_helpers" } +# A probe that enables ethcore public test helpers features. +ethcore-test-probe = { path = "../test_probe" } diff --git a/ethcore/private-tx/src/lib.rs b/ethcore/private-tx/src/lib.rs index 7aca4c85dc4..88c5f9a16fb 100644 --- a/ethcore/private-tx/src/lib.rs +++ b/ethcore/private-tx/src/lib.rs @@ -58,6 +58,8 @@ extern crate rlp_derive; extern crate rand; #[cfg(test)] extern crate ethcore_logger; +#[cfg(test)] +extern crate ethcore_test_probe; pub use encryptor::{Encryptor, SecretStoreEncryptor, EncryptorConfig, NoopEncryptor}; pub use private_transactions::{PrivateTransactionDesc, VerificationStore, PrivateTransactionSigningDesc, SigningStore}; diff --git a/ethcore/src/client/mod.rs b/ethcore/src/client/mod.rs index 581574a2d68..ff7fb8f692f 100644 --- a/ethcore/src/client/mod.rs +++ b/ethcore/src/client/mod.rs @@ -20,20 +20,20 @@ mod ancient_import; mod client; mod config; mod error; -#[cfg(test)] +#[cfg(any(test, feature="test-helpers"))] mod evm_test_client; mod io_message; -#[cfg(test)] +#[cfg(any(test, feature="test-helpers"))] mod test_client; mod trace; pub use self::client::*; pub use self::config::{Mode, ClientConfig, DatabaseCompactionProfile, BlockChainConfig, VMType}; pub use self::error::Error; -#[cfg(test)] +#[cfg(any(test, feature="test-helpers"))] pub use self::evm_test_client::{EvmTestClient, EvmTestError, TransactResult}; pub use self::io_message::ClientIoMessage; -#[cfg(test)] +#[cfg(any(test, feature="test-helpers"))] pub use self::test_client::{TestBlockChainClient, EachBlockWith}; pub use self::chain_notify::{ChainNotify, ChainRoute, ChainRouteType, ChainMessageType}; pub use self::traits::{ diff --git a/ethcore/src/lib.rs b/ethcore/src/lib.rs index b72fcc32135..3929b8dec79 100644 --- a/ethcore/src/lib.rs +++ b/ethcore/src/lib.rs @@ -175,8 +175,8 @@ mod tests; #[cfg(test)] #[cfg(feature="json-tests")] mod json_tests; -#[cfg(test)] -mod test_helpers; +#[cfg(any(test, feature="test-helpers"))] +pub mod test_helpers; #[cfg(test)] mod test_helpers_internal; diff --git a/ethcore/src/spec/spec.rs b/ethcore/src/spec/spec.rs index bf8e051cb30..1a022336f4a 100644 --- a/ethcore/src/spec/spec.rs +++ b/ethcore/src/spec/spec.rs @@ -516,7 +516,7 @@ macro_rules! load_bundled { }; } -#[cfg(test)] +#[cfg(any(test, feature="test-helpers"))] macro_rules! load_machine_bundled { ($e:expr) => { Spec::load_machine( @@ -848,28 +848,28 @@ impl Spec { /// Create a new Spec which conforms to the Frontier-era Morden chain except that it's a /// NullEngine consensus. - #[cfg(test)] + #[cfg(any(test, feature="test-helpers"))] pub fn new_test() -> Spec { load_bundled!("null_morden") } /// Create the EthereumMachine corresponding to Spec::new_test. - #[cfg(test)] + #[cfg(any(test, feature="test-helpers"))] pub fn new_test_machine() -> EthereumMachine { load_machine_bundled!("null_morden") } /// Create a new Spec which conforms to the Frontier-era Morden chain except that it's a NullEngine consensus with applying reward on block close. - #[cfg(test)] + #[cfg(any(test, feature="test-helpers"))] pub fn new_test_with_reward() -> Spec { load_bundled!("null_morden_with_reward") } /// Create a new Spec which is a NullEngine consensus with a premine of address whose /// secret is keccak(''). - #[cfg(test)] + #[cfg(any(test, feature="test-helpers"))] pub fn new_null() -> Spec { load_bundled!("null") } /// Create a new Spec which constructs a contract at address 5 with storage at 0 equal to 1. - #[cfg(test)] + #[cfg(any(test, feature="test-helpers"))] pub fn new_test_constructor() -> Spec { load_bundled!("constructor") } @@ -877,7 +877,7 @@ impl Spec { /// Create a new Spec with AuthorityRound consensus which does internal sealing (not /// requiring work). /// Accounts with secrets keccak("0") and keccak("1") are the validators. - #[cfg(test)] + #[cfg(any(test, feature="test-helpers"))] pub fn new_test_round() -> Self { load_bundled!("authority_round") } @@ -885,7 +885,7 @@ impl Spec { /// Create a new Spec with AuthorityRound consensus which does internal sealing (not /// requiring work) with empty step messages enabled. /// Accounts with secrets keccak("0") and keccak("1") are the validators. - #[cfg(test)] + #[cfg(any(test, feature="test-helpers"))] pub fn new_test_round_empty_steps() -> Self { load_bundled!("authority_round_empty_steps") } @@ -893,7 +893,7 @@ impl Spec { /// Create a new Spec with AuthorityRound consensus (with empty steps) using a block reward /// contract. The contract source code can be found at: /// https://github.com/parity-contracts/block-reward/blob/daf7d44383b6cdb11cb6b953b018648e2b027cfb/contracts/ExampleBlockReward.sol - #[cfg(test)] + #[cfg(any(test, feature="test-helpers"))] pub fn new_test_round_block_reward_contract() -> Self { load_bundled!("authority_round_block_reward_contract") } @@ -901,7 +901,7 @@ impl Spec { /// Create a new Spec with Tendermint consensus which does internal sealing (not requiring /// work). /// Account keccak("0") and keccak("1") are a authorities. - #[cfg(test)] + #[cfg(any(test, feature="test-helpers"))] pub fn new_test_tendermint() -> Self { load_bundled!("tendermint") } @@ -914,7 +914,7 @@ impl Spec { /// "0xbfc708a000000000000000000000000082a978b3f5962a5b0957d9ee9eef472ee55b42f1" and added /// back in using /// "0x4d238c8e00000000000000000000000082a978b3f5962a5b0957d9ee9eef472ee55b42f1". - #[cfg(test)] + #[cfg(any(test, feature="test-helpers"))] pub fn new_validator_safe_contract() -> Self { load_bundled!("validator_safe_contract") } @@ -922,7 +922,7 @@ impl Spec { /// The same as the `safeContract`, but allows reporting and uses AuthorityRound. /// Account is marked with `reportBenign` it can be checked as disliked with "0xd8f2e0bf". /// Validator can be removed with `reportMalicious`. - #[cfg(test)] + #[cfg(any(test, feature="test-helpers"))] pub fn new_validator_contract() -> Self { load_bundled!("validator_contract") } @@ -931,7 +931,7 @@ impl Spec { /// height. /// Account with secrets keccak("0") is the validator for block 1 and with keccak("1") /// onwards. - #[cfg(test)] + #[cfg(any(test, feature="test-helpers"))] pub fn new_validator_multi() -> Self { load_bundled!("validator_multi") } diff --git a/ethcore/sync/Cargo.toml b/ethcore/sync/Cargo.toml index cf163cc7bd5..b719707c5e0 100644 --- a/ethcore/sync/Cargo.toml +++ b/ethcore/sync/Cargo.toml @@ -38,3 +38,4 @@ ethcore-io = { path = "../../util/io", features = ["mio"] } ethkey = { path = "../../ethkey" } kvdb-memorydb = { path = "../../util/kvdb-memorydb" } ethcore-private-tx = { path = "../private-tx" } +ethcore-test-probe = { path = "../test_probe" } diff --git a/ethcore/sync/src/lib.rs b/ethcore/sync/src/lib.rs index c00ea5e4404..a3d3013b814 100644 --- a/ethcore/sync/src/lib.rs +++ b/ethcore/sync/src/lib.rs @@ -47,6 +47,7 @@ extern crate ethcore_light as light; #[cfg(test)] extern crate kvdb_memorydb; #[cfg(test)] extern crate rustc_hex; #[cfg(test)] extern crate ethcore_private_tx; +#[cfg(test)] extern crate ethcore_test_probe; #[macro_use] extern crate macros; diff --git a/ethcore/test_helpers/Cargo.toml b/ethcore/test_probe/Cargo.toml similarity index 50% rename from ethcore/test_helpers/Cargo.toml rename to ethcore/test_probe/Cargo.toml index 35524d363a0..883ee09480d 100644 --- a/ethcore/test_helpers/Cargo.toml +++ b/ethcore/test_probe/Cargo.toml @@ -1,10 +1,10 @@ [package] -description = "Ethcore public test helpers" +description = "A probe that enables test features on demand." homepage = "http://parity.io" license = "GPL-3.0" -name = "ethcore-test-helpers" +name = "ethcore-test-probe" version = "1.12.0" authors = ["Parity Technologies "] [dependencies] -ethcore = { path = ".." } +ethcore = { path = "..", features = ["test-helpers"] } diff --git a/ethcore/test_helpers/src/lib.rs b/ethcore/test_probe/src/lib.rs similarity index 87% rename from ethcore/test_helpers/src/lib.rs rename to ethcore/test_probe/src/lib.rs index ab5501c5fdc..8b7351e50b9 100644 --- a/ethcore/test_helpers/src/lib.rs +++ b/ethcore/test_probe/src/lib.rs @@ -14,9 +14,6 @@ // You should have received a copy of the GNU General Public License // along with Parity. If not, see . -//! Ethcore public test helpers. +//! A probe that enables ethcore test features on demand. -#[path="../../src/test_helpers.rs"] -mod helpers; - -pub use helpers::*; +extern crate ethcore; From e318e12cc7b6608ff7c9cd66d7cc86e566b97117 Mon Sep 17 00:00:00 2001 From: Wei Tang Date: Thu, 31 May 2018 18:06:46 +0800 Subject: [PATCH 3/3] Remove test probe and directly use features tag --- Cargo.lock | 9 --------- ethcore/private-tx/Cargo.toml | 3 +-- ethcore/private-tx/src/lib.rs | 2 -- ethcore/sync/Cargo.toml | 2 +- ethcore/sync/src/lib.rs | 1 - ethcore/test_probe/Cargo.toml | 10 ---------- ethcore/test_probe/src/lib.rs | 19 ------------------- 7 files changed, 2 insertions(+), 44 deletions(-) delete mode 100644 ethcore/test_probe/Cargo.toml delete mode 100644 ethcore/test_probe/src/lib.rs diff --git a/Cargo.lock b/Cargo.lock index d3982f47326..c8e60dce693 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -763,7 +763,6 @@ dependencies = [ "ethcore-io 1.12.0", "ethcore-logger 1.12.0", "ethcore-miner 1.12.0", - "ethcore-test-probe 1.12.0", "ethcore-transaction 0.1.0", "ethereum-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "ethjson 0.1.0", @@ -871,7 +870,6 @@ dependencies = [ "ethcore-network 1.12.0", "ethcore-network-devp2p 1.12.0", "ethcore-private-tx 1.0.0", - "ethcore-test-probe 1.12.0", "ethcore-transaction 0.1.0", "ethereum-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "ethkey 0.3.0", @@ -893,13 +891,6 @@ dependencies = [ "triehash 0.1.0", ] -[[package]] -name = "ethcore-test-probe" -version = "1.12.0" -dependencies = [ - "ethcore 1.12.0", -] - [[package]] name = "ethcore-transaction" version = "0.1.0" diff --git a/ethcore/private-tx/Cargo.toml b/ethcore/private-tx/Cargo.toml index 68bf4ea5220..0ca8ab8acdd 100644 --- a/ethcore/private-tx/Cargo.toml +++ b/ethcore/private-tx/Cargo.toml @@ -37,5 +37,4 @@ tiny-keccak = "1.3" url = "1" [dev-dependencies] -# A probe that enables ethcore public test helpers features. -ethcore-test-probe = { path = "../test_probe" } +ethcore = { path = "..", features = ["test-helpers"] } diff --git a/ethcore/private-tx/src/lib.rs b/ethcore/private-tx/src/lib.rs index 88c5f9a16fb..7aca4c85dc4 100644 --- a/ethcore/private-tx/src/lib.rs +++ b/ethcore/private-tx/src/lib.rs @@ -58,8 +58,6 @@ extern crate rlp_derive; extern crate rand; #[cfg(test)] extern crate ethcore_logger; -#[cfg(test)] -extern crate ethcore_test_probe; pub use encryptor::{Encryptor, SecretStoreEncryptor, EncryptorConfig, NoopEncryptor}; pub use private_transactions::{PrivateTransactionDesc, VerificationStore, PrivateTransactionSigningDesc, SigningStore}; diff --git a/ethcore/sync/Cargo.toml b/ethcore/sync/Cargo.toml index b719707c5e0..66ee5662158 100644 --- a/ethcore/sync/Cargo.toml +++ b/ethcore/sync/Cargo.toml @@ -38,4 +38,4 @@ ethcore-io = { path = "../../util/io", features = ["mio"] } ethkey = { path = "../../ethkey" } kvdb-memorydb = { path = "../../util/kvdb-memorydb" } ethcore-private-tx = { path = "../private-tx" } -ethcore-test-probe = { path = "../test_probe" } +ethcore = { path = "..", features = ["test-helpers"] } diff --git a/ethcore/sync/src/lib.rs b/ethcore/sync/src/lib.rs index a3d3013b814..c00ea5e4404 100644 --- a/ethcore/sync/src/lib.rs +++ b/ethcore/sync/src/lib.rs @@ -47,7 +47,6 @@ extern crate ethcore_light as light; #[cfg(test)] extern crate kvdb_memorydb; #[cfg(test)] extern crate rustc_hex; #[cfg(test)] extern crate ethcore_private_tx; -#[cfg(test)] extern crate ethcore_test_probe; #[macro_use] extern crate macros; diff --git a/ethcore/test_probe/Cargo.toml b/ethcore/test_probe/Cargo.toml deleted file mode 100644 index 883ee09480d..00000000000 --- a/ethcore/test_probe/Cargo.toml +++ /dev/null @@ -1,10 +0,0 @@ -[package] -description = "A probe that enables test features on demand." -homepage = "http://parity.io" -license = "GPL-3.0" -name = "ethcore-test-probe" -version = "1.12.0" -authors = ["Parity Technologies "] - -[dependencies] -ethcore = { path = "..", features = ["test-helpers"] } diff --git a/ethcore/test_probe/src/lib.rs b/ethcore/test_probe/src/lib.rs deleted file mode 100644 index 8b7351e50b9..00000000000 --- a/ethcore/test_probe/src/lib.rs +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright 2015-2017 Parity Technologies (UK) Ltd. -// This file is part of Parity. - -// Parity is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Parity is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Parity. If not, see . - -//! A probe that enables ethcore test features on demand. - -extern crate ethcore;