feat: skip tests run if the config is invalid
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
|
|
||||||
use alloy::{primitives::Keccak256, sol_types::SolValue};
|
use alloy::{primitives::Keccak256, sol_types::SolValue};
|
||||||
use miette::{miette, IntoDiagnostic, WrapErr};
|
use miette::{IntoDiagnostic, WrapErr};
|
||||||
use num_bigint::BigUint;
|
use num_bigint::BigUint;
|
||||||
use tycho_common::{dto::Chain, Bytes};
|
use tycho_common::{dto::Chain, Bytes};
|
||||||
use tycho_simulation::{
|
use tycho_simulation::{
|
||||||
|
|||||||
@@ -101,7 +101,13 @@ impl TestRunner {
|
|||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
|
|
||||||
let config = Self::parse_config(&config_yaml_path)?;
|
let config = match Self::parse_config(&config_yaml_path) {
|
||||||
|
Ok(cfg) => cfg,
|
||||||
|
Err(e) => {
|
||||||
|
warn!("Failed to parse config: {:?}", e);
|
||||||
|
return Ok(());
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
let tests = match &self.match_test {
|
let tests = match &self.match_test {
|
||||||
Some(filter) => config
|
Some(filter) => config
|
||||||
|
|||||||
Reference in New Issue
Block a user