From 3a07ea042b2015bc2461b1c0e67a2e199216374e Mon Sep 17 00:00:00 2001 From: pgherveou Date: Wed, 8 Oct 2025 10:45:49 +0200 Subject: [PATCH] fix --- crates/ml-test-runner/src/main.rs | 37 ++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 10 deletions(-) diff --git a/crates/ml-test-runner/src/main.rs b/crates/ml-test-runner/src/main.rs index 6ace67e..b356580 100644 --- a/crates/ml-test-runner/src/main.rs +++ b/crates/ml-test-runner/src/main.rs @@ -1,7 +1,10 @@ use anyhow::Context; use clap::Parser; -use revive_dt_common::{iterators::FilesWithExtensionIterator, types::PrivateKeyAllocator}; -use revive_dt_config::{TestExecutionContext, TestingPlatform}; +use revive_dt_common::{ + iterators::FilesWithExtensionIterator, + types::{PlatformIdentifier, PrivateKeyAllocator}, +}; +use revive_dt_config::TestExecutionContext; use revive_dt_core::{ CachedCompiler, Platform, helpers::{TestDefinition, TestPlatformInformation}, @@ -41,9 +44,9 @@ struct MlTestRunnerArgs { #[arg(long = "bail")] bail: bool, - /// Platform to test against (geth or kitchensink) - #[arg(long = "platform", default_value = "geth")] - platform: TestingPlatform, + /// Platform to test against (e.g., geth-evm-solc, kitchensink-polkavm-resolc) + #[arg(long = "platform", default_value = "geth-evm-solc")] + platform: PlatformIdentifier, /// Start the platform and wait for RPC readiness #[arg(long = "start-platform", default_value = "false")] @@ -267,9 +270,18 @@ async fn execute_test_file( // Get the platform based on CLI args let platform: &dyn Platform = match args.platform { - TestingPlatform::Geth => &revive_dt_core::GethEvmSolcPlatform, - TestingPlatform::Kitchensink => &revive_dt_core::KitchensinkPolkavmResolcPlatform, - TestingPlatform::Zombienet => &revive_dt_core::ZombienetPolkavmResolcPlatform, + PlatformIdentifier::GethEvmSolc => &revive_dt_core::GethEvmSolcPlatform, + PlatformIdentifier::LighthouseGethEvmSolc => &revive_dt_core::LighthouseGethEvmSolcPlatform, + PlatformIdentifier::KitchensinkPolkavmResolc => { + &revive_dt_core::KitchensinkPolkavmResolcPlatform + }, + PlatformIdentifier::KitchensinkRevmSolc => &revive_dt_core::KitchensinkRevmSolcPlatform, + PlatformIdentifier::ReviveDevNodePolkavmResolc => { + &revive_dt_core::ReviveDevNodePolkavmResolcPlatform + }, + PlatformIdentifier::ReviveDevNodeRevmSolc => &revive_dt_core::ReviveDevNodeRevmSolcPlatform, + PlatformIdentifier::ZombienetPolkavmResolc => &revive_dt_core::ZombienetPolkavmResolcPlatform, + PlatformIdentifier::ZombienetRevmSolc => &revive_dt_core::ZombienetRevmSolcPlatform, }; let temp_dir = TempDir::new()?; @@ -300,13 +312,18 @@ async fn execute_test_file( } else { info!("Using existing node"); let existing_node: Box = match args.platform { - TestingPlatform::Geth => Box::new( + PlatformIdentifier::GethEvmSolc | PlatformIdentifier::LighthouseGethEvmSolc => Box::new( revive_dt_node::node_implementations::geth::GethNode::new_existing( &args.private_key, ) .await?, ), - TestingPlatform::Kitchensink | TestingPlatform::Zombienet => Box::new( + PlatformIdentifier::KitchensinkPolkavmResolc + | PlatformIdentifier::KitchensinkRevmSolc + | PlatformIdentifier::ReviveDevNodePolkavmResolc + | PlatformIdentifier::ReviveDevNodeRevmSolc + | PlatformIdentifier::ZombienetPolkavmResolc + | PlatformIdentifier::ZombienetRevmSolc => Box::new( revive_dt_node::node_implementations::substrate::SubstrateNode::new_existing( &args.private_key, )