mirror of
https://github.com/pezkuwichain/revive-differential-tests.git
synced 2026-05-08 23:37:57 +00:00
Allow Targets in Test Cases (#229)
* Add an optional `targets` field to cases. This PR adds an optional `targets` field to cases which takes presence over that same field in the `Metadata`. The hope from this is to allow us to limit specific tests so that they only run on specific platforms only. * Update the resolc tests submodule * Update the default resolc version to use * Update the default heap-size and stack-size in the cli * Update the report processor
This commit is contained in:
@@ -1,16 +1,22 @@
|
||||
use alloy::primitives::Address;
|
||||
use alloy::primitives::{Address, map::HashSet};
|
||||
use schemars::JsonSchema;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use revive_dt_common::{
|
||||
macros::define_wrapper_type,
|
||||
types::{Mode, ParsedMode},
|
||||
types::{Mode, ParsedMode, VmIdentifier},
|
||||
};
|
||||
|
||||
use crate::steps::*;
|
||||
|
||||
#[derive(Debug, Default, Serialize, Deserialize, Clone, Eq, PartialEq, JsonSchema)]
|
||||
pub struct Case {
|
||||
/// An optional vector of targets that this Metadata file's cases can be executed on. As an
|
||||
/// example, if we wish for the metadata file's cases to only be run on PolkaVM then we'd
|
||||
/// specify a target of "PolkaVM" in here.
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub targets: Option<HashSet<VmIdentifier>>,
|
||||
|
||||
/// An optional name of the test case.
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub name: Option<String>,
|
||||
|
||||
@@ -8,6 +8,7 @@ use std::{
|
||||
str::FromStr,
|
||||
};
|
||||
|
||||
use alloy::primitives::map::HashSet;
|
||||
use schemars::JsonSchema;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
@@ -83,7 +84,7 @@ pub struct Metadata {
|
||||
/// example, if we wish for the metadata file's cases to only be run on PolkaVM then we'd
|
||||
/// specify a target of "PolkaVM" in here.
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub targets: Option<Vec<VmIdentifier>>,
|
||||
pub targets: Option<HashSet<VmIdentifier>>,
|
||||
|
||||
/// A vector of the test cases and workloads contained within the metadata file. This is their
|
||||
/// primary description.
|
||||
|
||||
Reference in New Issue
Block a user