mirror of
https://github.com/pezkuwichain/revive-differential-tests.git
synced 2026-04-22 21:57:58 +00:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d2af7f6c2b | |||
| 3dd4299bf1 | |||
| 07e7a62fd3 | |||
| 65e129654d | |||
| b3c8b0368c |
Generated
+11
@@ -1920,6 +1920,7 @@ dependencies = [
|
|||||||
"anstyle",
|
"anstyle",
|
||||||
"clap_lex",
|
"clap_lex",
|
||||||
"strsim",
|
"strsim",
|
||||||
|
"terminal_size",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -7838,6 +7839,16 @@ dependencies = [
|
|||||||
"winapi-util",
|
"winapi-util",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "terminal_size"
|
||||||
|
version = "0.4.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "45c6481c4829e4cc63825e62c49186a34538b7b2750b73b266581ffb612fb5ed"
|
||||||
|
dependencies = [
|
||||||
|
"rustix",
|
||||||
|
"windows-sys 0.59.0",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "thiserror"
|
name = "thiserror"
|
||||||
version = "1.0.69"
|
version = "1.0.69"
|
||||||
|
|||||||
+1
-1
@@ -26,7 +26,7 @@ ansi_term = "0.12.1"
|
|||||||
anyhow = "1.0"
|
anyhow = "1.0"
|
||||||
bson = { version = "2.15.0" }
|
bson = { version = "2.15.0" }
|
||||||
cacache = { version = "13.1.0" }
|
cacache = { version = "13.1.0" }
|
||||||
clap = { version = "4", features = ["derive"] }
|
clap = { version = "4", features = ["derive", "wrap_help"] }
|
||||||
dashmap = { version = "6.1.0" }
|
dashmap = { version = "6.1.0" }
|
||||||
foundry-compilers-artifacts = { version = "0.18.0" }
|
foundry-compilers-artifacts = { version = "0.18.0" }
|
||||||
futures = { version = "0.3.31" }
|
futures = { version = "0.3.31" }
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ use strum::{AsRefStr, Display, EnumString, IntoStaticStr};
|
|||||||
use temp_dir::TempDir;
|
use temp_dir::TempDir;
|
||||||
|
|
||||||
#[derive(Clone, Debug, Parser, Serialize, Deserialize)]
|
#[derive(Clone, Debug, Parser, Serialize, Deserialize)]
|
||||||
#[command(name = "retester")]
|
#[command(name = "retester", term_width = 100)]
|
||||||
pub enum Context {
|
pub enum Context {
|
||||||
/// Executes tests in the MatterLabs format differentially on multiple targets concurrently.
|
/// Executes tests in the MatterLabs format differentially on multiple targets concurrently.
|
||||||
Test(Box<TestExecutionContext>),
|
Test(Box<TestExecutionContext>),
|
||||||
@@ -510,7 +510,7 @@ pub struct ExportGenesisContext {
|
|||||||
|
|
||||||
impl Default for TestExecutionContext {
|
impl Default for TestExecutionContext {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
Self::parse_from(["execution-context"])
|
Self::parse_from(["execution-context", "--test", "."])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -612,7 +612,7 @@ impl AsRef<IgnoreSuccessConfiguration> for TestExecutionContext {
|
|||||||
|
|
||||||
impl Default for BenchmarkingContext {
|
impl Default for BenchmarkingContext {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
Self::parse_from(["benchmarking-context"])
|
Self::parse_from(["benchmarking-context", "--test", "."])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -759,7 +759,7 @@ pub struct CorpusConfiguration {
|
|||||||
/// - `{metadata_file_path}::{case_idx}::{mode}`: This is very similar to the above specifier
|
/// - `{metadata_file_path}::{case_idx}::{mode}`: This is very similar to the above specifier
|
||||||
/// with the exception that in this case the mode is specified and will be used in the test.
|
/// with the exception that in this case the mode is specified and will be used in the test.
|
||||||
#[serde_as(as = "Vec<serde_with::DisplayFromStr>")]
|
#[serde_as(as = "Vec<serde_with::DisplayFromStr>")]
|
||||||
#[arg(short = 't', long = "test")]
|
#[arg(short = 't', long = "test", required = true)]
|
||||||
pub test_specifiers: Vec<ParsedTestSpecifier>,
|
pub test_specifiers: Vec<ParsedTestSpecifier>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -330,6 +330,7 @@ async fn start_cli_reporting_task(output_format: OutputFormat, reporter: Reporte
|
|||||||
.unwrap();
|
.unwrap();
|
||||||
writeln!(buf).unwrap();
|
writeln!(buf).unwrap();
|
||||||
|
|
||||||
|
if aggregator_events_rx.is_empty() {
|
||||||
buf = tokio::task::spawn_blocking(move || {
|
buf = tokio::task::spawn_blocking(move || {
|
||||||
buf.flush().unwrap();
|
buf.flush().unwrap();
|
||||||
buf
|
buf
|
||||||
@@ -339,6 +340,8 @@ async fn start_cli_reporting_task(output_format: OutputFormat, reporter: Reporte
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
info!("Aggregator Broadcast Channel Closed");
|
||||||
|
|
||||||
// Summary at the end.
|
// Summary at the end.
|
||||||
match output_format {
|
match output_format {
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ where
|
|||||||
};
|
};
|
||||||
debug!(%tx_hash, "Submitted Transaction");
|
debug!(%tx_hash, "Submitted Transaction");
|
||||||
|
|
||||||
pending_transaction.set_timeout(Some(Duration::from_secs(120)));
|
pending_transaction.set_timeout(Some(Duration::from_secs(240)));
|
||||||
let tx_hash = pending_transaction.watch().await.context(format!(
|
let tx_hash = pending_transaction.watch().await.context(format!(
|
||||||
"Transaction inclusion watching timeout for {tx_hash}"
|
"Transaction inclusion watching timeout for {tx_hash}"
|
||||||
))?;
|
))?;
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ pub struct ReportAggregator {
|
|||||||
impl ReportAggregator {
|
impl ReportAggregator {
|
||||||
pub fn new(context: Context) -> Self {
|
pub fn new(context: Context) -> Self {
|
||||||
let (runner_tx, runner_rx) = unbounded_channel::<RunnerEvent>();
|
let (runner_tx, runner_rx) = unbounded_channel::<RunnerEvent>();
|
||||||
let (listener_tx, _) = channel::<ReporterEvent>(1024);
|
let (listener_tx, _) = channel::<ReporterEvent>(0xFFFF);
|
||||||
Self {
|
Self {
|
||||||
report: Report::new(context),
|
report: Report::new(context),
|
||||||
remaining_cases: Default::default(),
|
remaining_cases: Default::default(),
|
||||||
@@ -64,7 +64,7 @@ impl ReportAggregator {
|
|||||||
debug!("Starting to aggregate report");
|
debug!("Starting to aggregate report");
|
||||||
|
|
||||||
while let Some(event) = self.runner_rx.recv().await {
|
while let Some(event) = self.runner_rx.recv().await {
|
||||||
debug!(?event, "Received Event");
|
debug!(event = event.variant_name(), "Received Event");
|
||||||
match event {
|
match event {
|
||||||
RunnerEvent::SubscribeToEvents(event) => {
|
RunnerEvent::SubscribeToEvents(event) => {
|
||||||
self.handle_subscribe_to_events_event(*event);
|
self.handle_subscribe_to_events_event(*event);
|
||||||
|
|||||||
@@ -347,6 +347,16 @@ macro_rules! define_event {
|
|||||||
),*
|
),*
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl $ident {
|
||||||
|
pub fn variant_name(&self) -> &'static str {
|
||||||
|
match self {
|
||||||
|
$(
|
||||||
|
Self::$variant_ident { .. } => stringify!($variant_ident)
|
||||||
|
),*
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$(
|
$(
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
$(#[$variant_meta])*
|
$(#[$variant_meta])*
|
||||||
|
|||||||
Reference in New Issue
Block a user