fixing test status

This commit is contained in:
2025-12-14 18:51:59 +01:00
parent 4f2cdbc458
commit b9621a15f6

View File

@@ -50,10 +50,10 @@ impl fmt::Display for HMSDuration {
enum TestStatus { enum TestStatus {
Pass, Pass,
Fail, Fail,
Warn,
Skip, Skip,
Missing,
Flake,
Crash, Crash,
Timeout,
} }
impl TestStatus { impl TestStatus {
@@ -62,8 +62,8 @@ impl TestStatus {
TestStatus::Pass => "", TestStatus::Pass => "",
TestStatus::Fail => "", TestStatus::Fail => "",
TestStatus::Skip => "", TestStatus::Skip => "",
TestStatus::Missing => "🚫", TestStatus::Timeout => "⏱️",
TestStatus::Flake => "⚠️", TestStatus::Warn => "⚠️",
TestStatus::Crash => "💥", TestStatus::Crash => "💥",
} }
} }
@@ -72,9 +72,9 @@ impl TestStatus {
match self { match self {
TestStatus::Pass => "#22c55e", TestStatus::Pass => "#22c55e",
TestStatus::Fail => "#ff6467", TestStatus::Fail => "#ff6467",
TestStatus::Skip => "#ffdf20", TestStatus::Skip => "#38bdf8",
TestStatus::Missing => "#F77600", TestStatus::Timeout => "#F77600",
TestStatus::Flake => "#38bdf8", TestStatus::Warn => "#ffdf20",
TestStatus::Crash => "#e7000b", TestStatus::Crash => "#e7000b",
} }
} }
@@ -283,19 +283,18 @@ pub fn Landing() -> Element {
let mut total = 0_usize; let mut total = 0_usize;
for r in rows.iter() { for r in rows.iter() {
let name = &r[0]; let Ok(status) = TestStatus::from_str(&r[1]) else {
continue;
if let Some(ref s) = search { };
if !name.contains(s) { if let Some(wanted) = f {
if status != wanted {
continue; continue;
} }
} }
if let Some(wanted) = f { let name = &r[0];
let Ok(status) = TestStatus::from_str(&r[1]) else { if let Some(ref s) = search {
continue; if !name.contains(s) {
};
if status != wanted {
continue; continue;
} }
} }