Add more identifiers to the platform

This commit is contained in:
Omar Abdulla
2025-09-17 06:25:35 +03:00
parent 01d8042841
commit 1a25c8e0ab
6 changed files with 146 additions and 33 deletions
+21 -2
View File
@@ -3,7 +3,7 @@
//! This crate defines the testing configuration and
//! provides a helper utility to execute tests.
use revive_dt_common::types::VersionOrRequirement;
use revive_dt_common::types::*;
use revive_dt_compiler::{DynSolidityCompiler, SolidityCompiler, revive_resolc, solc};
use revive_dt_config::*;
use revive_dt_format::traits::ResolverApi;
@@ -49,9 +49,28 @@ impl Platform for Kitchensink {
/// A trait that describes the interface for the platforms that are supported by the tool.
pub trait DynPlatform {
/// Returns the identifier of this platform.
/// Returns the identifier of this platform. This is a combination of the node and the compiler
/// used.
fn platform_identifier(&self) -> PlatformIdentifier;
/// Returns a full identifier for the platform.
fn full_identifier(&self) -> (NodeIdentifier, VmIdentifier, CompilerIdentifier) {
(
self.node_identifier(),
self.vm_identifier(),
self.compiler_identifier(),
)
}
/// Returns the identifier of the node used.
fn node_identifier(&self) -> NodeIdentifier;
/// Returns the identifier of the vm used.
fn vm_identifier(&self) -> VmIdentifier;
/// Returns the identifier of the compiler used.
fn compiler_identifier(&self) -> CompilerIdentifier;
/// Creates a new node for the platform by spawning a new thread, creating the node object,
/// initializing it, spawning it, and waiting for it to start up.
fn new_node(