mirror of
https://github.com/pezkuwichain/revive-differential-tests.git
synced 2026-06-12 18:11:08 +00:00
Allow for succeeding tests to be ignored (#186)
This commit is contained in:
@@ -10,7 +10,7 @@ use std::{
|
||||
use ansi_term::{ANSIStrings, Color};
|
||||
use anyhow::Context as _;
|
||||
use futures::{FutureExt, StreamExt};
|
||||
use revive_dt_common::types::PrivateKeyAllocator;
|
||||
use revive_dt_common::{cached_fs::read_to_string, types::PrivateKeyAllocator};
|
||||
use revive_dt_core::Platform;
|
||||
use tokio::sync::{Mutex, RwLock, Semaphore};
|
||||
use tracing::{Instrument, error, info, info_span, instrument};
|
||||
@@ -72,11 +72,20 @@ pub async fn handle_differential_tests(
|
||||
info!("Spawned the platform nodes");
|
||||
|
||||
// Preparing test definitions.
|
||||
let only_execute_failed_tests = match context.ignore_success_configuration.path.as_ref() {
|
||||
Some(path) => {
|
||||
let report = read_to_string(path)
|
||||
.context("Failed to read the report file to ignore the succeeding test cases")?;
|
||||
Some(serde_json::from_str(&report).context("Failed to deserialize report")?)
|
||||
}
|
||||
None => None,
|
||||
};
|
||||
let full_context = Context::Test(Box::new(context.clone()));
|
||||
let test_definitions = create_test_definitions_stream(
|
||||
&full_context,
|
||||
metadata_files.iter(),
|
||||
&platforms_and_nodes,
|
||||
only_execute_failed_tests.as_ref(),
|
||||
reporter.clone(),
|
||||
)
|
||||
.await
|
||||
|
||||
Reference in New Issue
Block a user