2022-03-03 02:10:57 +00:00
|
|
|
/// This binary runs integration tests between Lighthouse and execution engines.
|
|
|
|
///
|
|
|
|
/// It will first attempt to build any supported integration clients, then it will run tests.
|
|
|
|
///
|
|
|
|
/// A return code of `0` indicates the tests succeeded.
|
2022-03-24 00:04:48 +00:00
|
|
|
mod build_utils;
|
2022-03-03 02:10:57 +00:00
|
|
|
mod execution_engine;
|
|
|
|
mod genesis_json;
|
2022-03-24 00:04:48 +00:00
|
|
|
mod geth;
|
|
|
|
mod nethermind;
|
2022-03-03 02:10:57 +00:00
|
|
|
mod test_rig;
|
|
|
|
|
2022-03-24 00:04:48 +00:00
|
|
|
use geth::GethEngine;
|
|
|
|
use nethermind::NethermindEngine;
|
2022-03-03 02:10:57 +00:00
|
|
|
use test_rig::TestRig;
|
|
|
|
|
|
|
|
/// Set to `false` to send logs to the console during tests. Logs are useful when debugging.
|
2022-06-09 10:47:03 +00:00
|
|
|
const SUPPRESS_LOGS: bool = false;
|
2022-03-03 02:10:57 +00:00
|
|
|
|
|
|
|
fn main() {
|
|
|
|
if cfg!(windows) {
|
|
|
|
panic!("windows is not supported, only linux");
|
|
|
|
}
|
|
|
|
|
2022-03-24 00:04:48 +00:00
|
|
|
test_geth();
|
|
|
|
test_nethermind();
|
2022-03-03 02:10:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
fn test_geth() {
|
2022-03-24 00:04:48 +00:00
|
|
|
let test_dir = build_utils::prepare_dir();
|
|
|
|
geth::build(&test_dir);
|
|
|
|
TestRig::new(GethEngine).perform_tests_blocking();
|
|
|
|
}
|
|
|
|
|
|
|
|
fn test_nethermind() {
|
|
|
|
let test_dir = build_utils::prepare_dir();
|
|
|
|
nethermind::build(&test_dir);
|
|
|
|
TestRig::new(NethermindEngine).perform_tests_blocking();
|
2022-03-03 02:10:57 +00:00
|
|
|
}
|