mirror of
https://github.com/pezkuwichain/revive-differential-tests.git
synced 2026-06-14 08:41:06 +00:00
initialize geth via the standard json
Signed-off-by: xermicus <bigcyrill@hotmail.com>
This commit is contained in:
@@ -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,
|
||||
}
|
||||
Reference in New Issue
Block a user