feat: add test runner structure

This commit is contained in:
Thales Lima
2025-03-11 13:59:02 -03:00
committed by Tamara
parent e3ae70ab43
commit 160523a888
3 changed files with 163 additions and 1 deletions

View File

@@ -0,0 +1,43 @@
mod config;
mod rpc;
mod test_runner;
mod utils;
mod tycho_runner;
use clap::Parser;
use tracing_subscriber::EnvFilter;
use crate::test_runner::TestRunner;
#[derive(Parser, Debug)]
#[command(version, about = "Run indexer within a specified range of blocks")]
struct Args {
/// Name of the package to test
#[arg(long)]
package: String,
/// Enable tycho logs
#[arg(long, default_value_t = true)]
tycho_logs: bool,
/// Postgres database URL for the Tycho indexer
#[arg(long, default_value = "postgres://postgres:mypassword@localhost:5431/tycho_indexer_0")]
db_url: String,
/// Enable tracing during vm simulations
#[arg(long, default_value_t = false)]
vm_traces: bool,
}
fn main() {
tracing_subscriber::fmt()
.with_env_filter(EnvFilter::from_default_env())
.with_target(false)
.init();
let args = Args::parse();
let test_runner = TestRunner::new(args.package, args.tycho_logs, args.db_url, args.vm_traces);
test_runner.run_tests();
}