initialize geth via the standard json

Signed-off-by: xermicus <bigcyrill@hotmail.com>
This commit is contained in:
xermicus
2025-03-23 00:05:53 +01:00
parent f9a0542d49
commit 6cd4519d89
15 changed files with 228 additions and 64 deletions
+39
View File
@@ -0,0 +1,39 @@
//! The global configuration used accross all revive differential testing crates.
use std::{path::PathBuf, sync::OnceLock};
use clap::Parser;
static ARGUMENTS: OnceLock<Arguments> = OnceLock::new();
/// Get the command line arguments.
pub fn get_args() -> &'static Arguments {
ARGUMENTS.get_or_init(Arguments::parse)
}
#[derive(Debug, Parser, Clone)]
#[command(
name = "revive compiler differential tester utility",
arg_required_else_help = true
)]
pub struct Arguments {
/// The path to the `resolc` executable to be tested.
///
/// By default it uses the `resolc` binary found in `$PATH`.
#[arg(long = "resolc", short, default_value = "resolc")]
pub resolc: PathBuf,
/// A list of test corpus JSON files to be tested.
#[arg(long = "corpus", short)]
pub corpus: Vec<PathBuf>,
/// A place to store temporary artifacts during test execution.
#[arg(long = "workdir", short)]
pub working_directory: PathBuf,
/// The path to the `geth` executable.
///
/// By default it uses `geth` binary found in `$PATH`.
#[arg(short, long = "geth", default_value = "geth")]
pub geth: PathBuf,
}