mirror of
https://github.com/pezkuwichain/revive-differential-tests.git
synced 2026-04-29 21:47:59 +00:00
Update the format of the expectations file
This commit is contained in:
+6
-1
@@ -82,7 +82,12 @@ zombienet-sdk = { git = "https://github.com/paritytech/zombienet-sdk.git", rev =
|
||||
|
||||
[profile.bench]
|
||||
inherits = "release"
|
||||
lto = true
|
||||
codegen-units = 1
|
||||
lto = true
|
||||
|
||||
[profile.production]
|
||||
inherits = "release"
|
||||
codegen-units = 1
|
||||
lto = true
|
||||
|
||||
[workspace.lints.clippy]
|
||||
|
||||
@@ -70,7 +70,7 @@ fn main() -> Result<()> {
|
||||
case_idx: case_idx.into_inner(),
|
||||
mode: Cow::Borrowed(mode),
|
||||
},
|
||||
Cow::Borrowed(status),
|
||||
Status::from(status),
|
||||
)
|
||||
})
|
||||
.collect::<Expectations>();
|
||||
@@ -118,7 +118,7 @@ fn main() -> Result<()> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
type Expectations<'a> = BTreeMap<TestSpecifier<'a>, Cow<'a, TestCaseStatus>>;
|
||||
type Expectations<'a> = BTreeMap<TestSpecifier<'a>, Status>;
|
||||
|
||||
/// A tool that's used to process the reports generated by the retester binary in various ways.
|
||||
#[derive(Clone, Debug, Parser)]
|
||||
@@ -156,6 +156,33 @@ pub enum Cli {
|
||||
},
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)]
|
||||
pub enum Status {
|
||||
Succeeded,
|
||||
Failed,
|
||||
Ignored,
|
||||
}
|
||||
|
||||
impl From<TestCaseStatus> for Status {
|
||||
fn from(value: TestCaseStatus) -> Self {
|
||||
match value {
|
||||
TestCaseStatus::Succeeded { .. } => Self::Succeeded,
|
||||
TestCaseStatus::Failed { .. } => Self::Failed,
|
||||
TestCaseStatus::Ignored { .. } => Self::Ignored,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> From<&'a TestCaseStatus> for Status {
|
||||
fn from(value: &'a TestCaseStatus) -> Self {
|
||||
match value {
|
||||
TestCaseStatus::Succeeded { .. } => Self::Succeeded,
|
||||
TestCaseStatus::Failed { .. } => Self::Failed,
|
||||
TestCaseStatus::Ignored { .. } => Self::Ignored,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||||
pub struct JsonFile<T> {
|
||||
path: PathBuf,
|
||||
|
||||
Reference in New Issue
Block a user