Skip to content

Commit

Permalink
refactor: move ef tests to own testing crate (#2847)
Browse files Browse the repository at this point in the history
  • Loading branch information
onbjerg authored and shekhirin committed May 26, 2023
1 parent 9e90a17 commit 1d1dc18
Show file tree
Hide file tree
Showing 18 changed files with 714 additions and 520 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,28 +58,30 @@ jobs:
RUST_LOG: info,sync=error
steps:
- name: Checkout sources
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Checkout ethereum/tests
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: ethereum/tests
path: ethtests
path: testing/ef-tests/ethereum-tests
submodules: recursive
depth: 1

- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true

- uses: Swatinem/rust-cache@v1
with:
cache-on-failure: true
- name: Install latest nextest release
uses: taiki-e/install-action@nextest

- name: Run Ethereum tests
run: cargo run --release -- test-chain ethtests/BlockchainTests/GeneralStateTests/
run: cargo nextest run --release -p ef-tests --features ef-tests

doc-test:
name: rustdoc
Expand Down
35 changes: 26 additions & 9 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ members = [
"crates/tasks",
"crates/transaction-pool",
"crates/trie",
"testing/ef-tests"
]
default-members = ["bin/reth"]

Expand Down
6 changes: 1 addition & 5 deletions bin/reth/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use crate::{
dirs::{LogsDir, PlatformPath},
merkle_debug, node, p2p,
runner::CliRunner,
stage, test_eth_chain, test_vectors,
stage, test_vectors,
version::{LONG_VERSION, SHORT_VERSION},
};
use clap::{ArgAction, Args, Parser, Subcommand};
Expand Down Expand Up @@ -35,7 +35,6 @@ pub fn run() -> eyre::Result<()> {
Commands::Stage(command) => runner.run_blocking_until_ctrl_c(command.execute()),
Commands::P2P(command) => runner.run_until_ctrl_c(command.execute()),
Commands::TestVectors(command) => runner.run_until_ctrl_c(command.execute()),
Commands::TestEthChain(command) => runner.run_until_ctrl_c(command.execute()),
Commands::Config(command) => runner.run_until_ctrl_c(command.execute()),
Commands::MerkleDebug(command) => runner.run_until_ctrl_c(command.execute()),
}
Expand All @@ -62,9 +61,6 @@ pub enum Commands {
/// P2P Debugging utilities
#[command(name = "p2p")]
P2P(p2p::Command),
/// Run Ethereum blockchain tests
#[command(name = "test-chain")]
TestEthChain(test_eth_chain::Command),
/// Generate Test Vectors
#[command(name = "test-vectors")]
TestVectors(test_vectors::Command),
Expand Down
1 change: 0 additions & 1 deletion bin/reth/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ pub mod p2p;
pub mod prometheus_exporter;
pub mod runner;
pub mod stage;
pub mod test_eth_chain;
pub mod test_vectors;
pub mod utils;
pub mod version;
Expand Down
60 changes: 0 additions & 60 deletions bin/reth/src/test_eth_chain/mod.rs

This file was deleted.

Loading

0 comments on commit 1d1dc18

Please sign in to comment.