Add a silent mode for running the diff.

This commit is contained in:
Tom Alexander
2023-10-14 14:47:57 -04:00
parent dde4bc7920
commit f43920fc7c
4 changed files with 64 additions and 26 deletions

View File

@@ -7,6 +7,7 @@ use std::path::PathBuf;
use futures::future::BoxFuture;
use futures::future::FutureExt;
use organic::compare::run_compare_on_file;
use organic::compare::silent_compare_on_file;
use tokio::sync::Semaphore;
use tokio::task::JoinError;
use walkdir::WalkDir;
@@ -156,11 +157,11 @@ impl TestConfig {
impl SingleFile {
async fn run_test(self) -> Result<SingleFileResult, JoinError> {
let _permit = TEST_PERMITS.acquire().await.unwrap();
let result = run_compare_on_file(&self.file_path);
let result = silent_compare_on_file(&self.file_path);
Ok(SingleFileResult {
name: self.name,
file_path: self.file_path,
status: if result.is_ok() {
status: if let Ok(true) = result {
TestStatus::Pass
} else {
TestStatus::Fail