mirror of
https://github.com/pezkuwichain/revive-differential-tests.git
synced 2026-04-22 10:17:56 +00:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| fd6b707687 | |||
| 9fd6a8d408 | |||
| 0d5e80f80f | |||
| 340c2667e1 | |||
| 97d0cf1d1c | |||
| 3c9f845287 |
@@ -18,10 +18,9 @@ inputs:
|
|||||||
required: false
|
required: false
|
||||||
default: "main"
|
default: "main"
|
||||||
type: string
|
type: string
|
||||||
resolc-version:
|
resolc-path:
|
||||||
description: "The version of resolc to install and use in tests."
|
description: "The path of the resolc compiler."
|
||||||
required: false
|
required: true
|
||||||
default: "0.5.0"
|
|
||||||
type: string
|
type: string
|
||||||
use-compilation-caches:
|
use-compilation-caches:
|
||||||
description: "Controls if the compilation caches will be used for the test run or not."
|
description: "Controls if the compilation caches will be used for the test run or not."
|
||||||
@@ -29,6 +28,10 @@ inputs:
|
|||||||
default: true
|
default: true
|
||||||
type: boolean
|
type: boolean
|
||||||
# Test Execution Arguments
|
# Test Execution Arguments
|
||||||
|
# TODO: We need a better way for people to pass arguments to retester. This way is not very good
|
||||||
|
# because we need to add support for each argument separately and support defaults and all of that
|
||||||
|
# perhaps having people pass in a JSON String of the arguments is the better long term solution
|
||||||
|
# for this.
|
||||||
platform:
|
platform:
|
||||||
description: "The identifier of the platform to run the tests on (e.g., geth-evm-solc, revive-dev-node-revm-solc)"
|
description: "The identifier of the platform to run the tests on (e.g., geth-evm-solc, revive-dev-node-revm-solc)"
|
||||||
required: true
|
required: true
|
||||||
@@ -56,16 +59,6 @@ runs:
|
|||||||
ref: ${{ inputs['revive-differential-tests-ref'] }}
|
ref: ${{ inputs['revive-differential-tests-ref'] }}
|
||||||
path: revive-differential-tests
|
path: revive-differential-tests
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
- name: Installing the Latest Resolc
|
|
||||||
shell: bash
|
|
||||||
if: ${{ runner.os == 'Linux' && runner.arch == 'X64' }}
|
|
||||||
run: |
|
|
||||||
VERSION="${{ inputs['resolc-version'] }}"
|
|
||||||
ASSET_URL="https://github.com/paritytech/revive/releases/download/v$VERSION/resolc-x86_64-unknown-linux-musl"
|
|
||||||
echo "Downloading resolc v$VERSION from $ASSET_URL"
|
|
||||||
curl -Lsf --show-error -o resolc "$ASSET_URL"
|
|
||||||
chmod +x resolc
|
|
||||||
./resolc --version
|
|
||||||
- name: Installing Retester
|
- name: Installing Retester
|
||||||
shell: bash
|
shell: bash
|
||||||
run: ${{ inputs['cargo-command'] }} install --locked --path revive-differential-tests/crates/core
|
run: ${{ inputs['cargo-command'] }} install --locked --path revive-differential-tests/crates/core
|
||||||
@@ -120,11 +113,12 @@ runs:
|
|||||||
--revive-dev-node.path ${{ inputs['polkadot-sdk-path'] }}/target/release/revive-dev-node \
|
--revive-dev-node.path ${{ inputs['polkadot-sdk-path'] }}/target/release/revive-dev-node \
|
||||||
--eth-rpc.path ${{ inputs['polkadot-sdk-path'] }}/target/release/eth-rpc \
|
--eth-rpc.path ${{ inputs['polkadot-sdk-path'] }}/target/release/eth-rpc \
|
||||||
--polkadot-omni-node.path ${{ inputs['polkadot-sdk-path'] }}/target/release/polkadot-omni-node \
|
--polkadot-omni-node.path ${{ inputs['polkadot-sdk-path'] }}/target/release/polkadot-omni-node \
|
||||||
--resolc.path ./resolc \
|
--resolc.path ${{ inputs['resolc-path'] }} \
|
||||||
|
--resolc.heap-size 500000 \
|
||||||
"${OMNI_ARGS[@]}" || true
|
"${OMNI_ARGS[@]}" || true
|
||||||
- name: Generate the expectation file
|
- name: Generate the expectation file
|
||||||
shell: bash
|
shell: bash
|
||||||
run: report-processor generate-expectations-file --report-path ./workdir/report.json --output-path ./workdir/expectations.json --remove-prefix ./revive-differential-tests/resolc-compiler-tests
|
run: report-processor generate-expectations-file --report-path ./workdir/report.json --output-path ./workdir/expectations.json --remove-prefix ./revive-differential-tests/resolc-compiler-tests --include-status failed
|
||||||
- name: Upload the Report to the CI
|
- name: Upload the Report to the CI
|
||||||
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f
|
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f
|
||||||
with:
|
with:
|
||||||
|
|||||||
Generated
+1
@@ -5886,6 +5886,7 @@ dependencies = [
|
|||||||
"revive-dt-report",
|
"revive-dt-report",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
|
"strum",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|||||||
@@ -32,8 +32,12 @@ pub enum PlatformIdentifier {
|
|||||||
/// The Lighthouse Go-ethereum reference full node EVM implementation with the solc compiler.
|
/// The Lighthouse Go-ethereum reference full node EVM implementation with the solc compiler.
|
||||||
LighthouseGethEvmSolc,
|
LighthouseGethEvmSolc,
|
||||||
/// The revive dev node with the PolkaVM backend with the resolc compiler.
|
/// The revive dev node with the PolkaVM backend with the resolc compiler.
|
||||||
|
#[strum(serialize = "revive-dev-node-polkavm-resolc", serialize = "pez-revive-dev-node-polkavm-resolc")]
|
||||||
|
#[serde(alias = "pez-revive-dev-node-polkavm-resolc")]
|
||||||
ReviveDevNodePolkavmResolc,
|
ReviveDevNodePolkavmResolc,
|
||||||
/// The revive dev node with the REVM backend with the solc compiler.
|
/// The revive dev node with the REVM backend with the solc compiler.
|
||||||
|
#[strum(serialize = "revive-dev-node-revm-solc", serialize = "pez-revive-dev-node-revm-solc")]
|
||||||
|
#[serde(alias = "pez-revive-dev-node-revm-solc")]
|
||||||
ReviveDevNodeRevmSolc,
|
ReviveDevNodeRevmSolc,
|
||||||
/// A zombienet based Substrate/Polkadot node with the PolkaVM backend with the resolc compiler.
|
/// A zombienet based Substrate/Polkadot node with the PolkaVM backend with the resolc compiler.
|
||||||
ZombienetPolkavmResolc,
|
ZombienetPolkavmResolc,
|
||||||
@@ -98,6 +102,8 @@ pub enum NodeIdentifier {
|
|||||||
/// The go-ethereum node implementation.
|
/// The go-ethereum node implementation.
|
||||||
LighthouseGeth,
|
LighthouseGeth,
|
||||||
/// The revive dev node implementation.
|
/// The revive dev node implementation.
|
||||||
|
#[strum(serialize = "revive-dev-node", serialize = "pez-revive-dev-node")]
|
||||||
|
#[serde(alias = "pez-revive-dev-node")]
|
||||||
ReviveDevNode,
|
ReviveDevNode,
|
||||||
/// A zombienet spawned nodes
|
/// A zombienet spawned nodes
|
||||||
Zombienet,
|
Zombienet,
|
||||||
|
|||||||
@@ -806,6 +806,7 @@ pub struct ResolcConfiguration {
|
|||||||
/// If unspecified, the revive compiler default is used
|
/// If unspecified, the revive compiler default is used
|
||||||
#[clap(id = "resolc.heap-size", long = "resolc.heap-size")]
|
#[clap(id = "resolc.heap-size", long = "resolc.heap-size")]
|
||||||
pub heap_size: Option<u32>,
|
pub heap_size: Option<u32>,
|
||||||
|
|
||||||
/// Specifies the PVM stack size in bytes.
|
/// Specifies the PVM stack size in bytes.
|
||||||
///
|
///
|
||||||
/// If unspecified, the revive compiler default is used
|
/// If unspecified, the revive compiler default is used
|
||||||
|
|||||||
@@ -482,15 +482,16 @@ where
|
|||||||
.context("Failed to find deployment receipt for constructor call"),
|
.context("Failed to find deployment receipt for constructor call"),
|
||||||
Method::Fallback | Method::FunctionName(_) => {
|
Method::Fallback | Method::FunctionName(_) => {
|
||||||
let resolver = self.platform_information.node.resolver().await?;
|
let resolver = self.platform_information.node.resolver().await?;
|
||||||
let tx = match step
|
let mut tx = step
|
||||||
.as_transaction(resolver.as_ref(), self.default_resolution_context())
|
.as_transaction(resolver.as_ref(), self.default_resolution_context())
|
||||||
.await
|
.await?;
|
||||||
{
|
|
||||||
Ok(tx) => tx,
|
let gas_overrides = step
|
||||||
Err(err) => {
|
.gas_overrides
|
||||||
return Err(err);
|
.get(&self.platform_information.platform.platform_identifier())
|
||||||
}
|
.copied()
|
||||||
};
|
.unwrap_or_default();
|
||||||
|
gas_overrides.apply_to::<Ethereum>(&mut tx);
|
||||||
|
|
||||||
self.platform_information.node.execute_transaction(tx).await
|
self.platform_information.node.execute_transaction(tx).await
|
||||||
}
|
}
|
||||||
@@ -911,7 +912,6 @@ where
|
|||||||
.get(contract_instance)
|
.get(contract_instance)
|
||||||
{
|
{
|
||||||
info!(
|
info!(
|
||||||
|
|
||||||
%address,
|
%address,
|
||||||
"Contract instance already deployed."
|
"Contract instance already deployed."
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -223,17 +223,24 @@ impl<'a> TestDefinition<'a> {
|
|||||||
|
|
||||||
/// Checks if the platforms all support the desired targets in the metadata file.
|
/// Checks if the platforms all support the desired targets in the metadata file.
|
||||||
fn check_target_compatibility(&self) -> TestCheckFunctionResult {
|
fn check_target_compatibility(&self) -> TestCheckFunctionResult {
|
||||||
let mut error_map = indexmap! {
|
// The case targets takes presence over the metadata targets.
|
||||||
"test_desired_targets" => json!(self.metadata.targets.as_ref()),
|
let Some(targets) = self
|
||||||
|
.case
|
||||||
|
.targets
|
||||||
|
.as_ref()
|
||||||
|
.or(self.metadata.targets.as_ref())
|
||||||
|
else {
|
||||||
|
return Ok(());
|
||||||
};
|
};
|
||||||
|
|
||||||
|
let mut error_map = indexmap! {
|
||||||
|
"test_desired_targets" => json!(targets),
|
||||||
|
};
|
||||||
|
|
||||||
let mut is_allowed = true;
|
let mut is_allowed = true;
|
||||||
for (_, platform_information) in self.platforms.iter() {
|
for (_, platform_information) in self.platforms.iter() {
|
||||||
let is_allowed_for_platform = match self.metadata.targets.as_ref() {
|
let is_allowed_for_platform =
|
||||||
None => true,
|
targets.contains(&platform_information.platform.vm_identifier());
|
||||||
Some(required_vm_identifiers) => {
|
|
||||||
required_vm_identifiers.contains(&platform_information.platform.vm_identifier())
|
|
||||||
}
|
|
||||||
};
|
|
||||||
is_allowed &= is_allowed_for_platform;
|
is_allowed &= is_allowed_for_platform;
|
||||||
error_map.insert(
|
error_map.insert(
|
||||||
platform_information.platform.platform_identifier().into(),
|
platform_information.platform.platform_identifier().into(),
|
||||||
|
|||||||
@@ -1,16 +1,22 @@
|
|||||||
use alloy::primitives::Address;
|
use alloy::primitives::{Address, map::HashSet};
|
||||||
use schemars::JsonSchema;
|
use schemars::JsonSchema;
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
use revive_dt_common::{
|
use revive_dt_common::{
|
||||||
macros::define_wrapper_type,
|
macros::define_wrapper_type,
|
||||||
types::{Mode, ParsedMode},
|
types::{Mode, ParsedMode, VmIdentifier},
|
||||||
};
|
};
|
||||||
|
|
||||||
use crate::steps::*;
|
use crate::steps::*;
|
||||||
|
|
||||||
#[derive(Debug, Default, Serialize, Deserialize, Clone, Eq, PartialEq, JsonSchema)]
|
#[derive(Debug, Default, Serialize, Deserialize, Clone, Eq, PartialEq, JsonSchema)]
|
||||||
pub struct Case {
|
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.
|
/// An optional name of the test case.
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub name: Option<String>,
|
pub name: Option<String>,
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ use std::{
|
|||||||
str::FromStr,
|
str::FromStr,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
use alloy::primitives::map::HashSet;
|
||||||
use schemars::JsonSchema;
|
use schemars::JsonSchema;
|
||||||
use serde::{Deserialize, Serialize};
|
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
|
/// 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.
|
/// specify a target of "PolkaVM" in here.
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[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
|
/// A vector of the test cases and workloads contained within the metadata file. This is their
|
||||||
/// primary description.
|
/// primary description.
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
use std::{collections::HashMap, fmt::Display, str::FromStr};
|
use std::{collections::HashMap, fmt::Display, str::FromStr};
|
||||||
|
|
||||||
use alloy::hex::ToHexExt;
|
use alloy::hex::ToHexExt;
|
||||||
|
use alloy::network::Network;
|
||||||
use alloy::primitives::{FixedBytes, utils::parse_units};
|
use alloy::primitives::{FixedBytes, utils::parse_units};
|
||||||
use alloy::{
|
use alloy::{
|
||||||
eips::BlockNumberOrTag,
|
eips::BlockNumberOrTag,
|
||||||
@@ -11,6 +12,7 @@ use alloy::{
|
|||||||
};
|
};
|
||||||
use anyhow::Context as _;
|
use anyhow::Context as _;
|
||||||
use futures::{FutureExt, StreamExt, TryFutureExt, TryStreamExt, stream};
|
use futures::{FutureExt, StreamExt, TryFutureExt, TryStreamExt, stream};
|
||||||
|
use revive_dt_common::types::PlatformIdentifier;
|
||||||
use schemars::JsonSchema;
|
use schemars::JsonSchema;
|
||||||
use semver::VersionReq;
|
use semver::VersionReq;
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
@@ -152,6 +154,11 @@ pub struct FunctionCallStep {
|
|||||||
/// during the execution.
|
/// during the execution.
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub variable_assignments: Option<VariableAssignments>,
|
pub variable_assignments: Option<VariableAssignments>,
|
||||||
|
|
||||||
|
/// Allows for the test to set a specific value for the various gas parameter for each one of
|
||||||
|
/// the platforms we support. This is ignored for steps that perform contract deployments.
|
||||||
|
#[serde(default, skip_serializing_if = "HashMap::is_empty")]
|
||||||
|
pub gas_overrides: HashMap<PlatformIdentifier, GasOverrides>,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// This represents a balance assertion step where the framework needs to query the balance of some
|
/// This represents a balance assertion step where the framework needs to query the balance of some
|
||||||
@@ -965,6 +972,62 @@ impl<'de> Deserialize<'de> for EtherValue {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Clone, Copy, Debug, Default, Serialize, Deserialize, Eq, PartialEq, JsonSchema)]
|
||||||
|
pub struct GasOverrides {
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
|
pub gas_limit: Option<u64>,
|
||||||
|
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
|
pub gas_price: Option<u128>,
|
||||||
|
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
|
pub max_fee_per_gas: Option<u128>,
|
||||||
|
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
|
pub max_priority_fee_per_gas: Option<u128>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl GasOverrides {
|
||||||
|
pub fn new() -> Self {
|
||||||
|
Default::default()
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn with_gas_limit(mut self, value: impl Into<Option<u64>>) -> Self {
|
||||||
|
self.gas_limit = value.into();
|
||||||
|
self
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn with_gas_price(mut self, value: impl Into<Option<u128>>) -> Self {
|
||||||
|
self.gas_price = value.into();
|
||||||
|
self
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn with_max_fee_per_gas(mut self, value: impl Into<Option<u128>>) -> Self {
|
||||||
|
self.max_fee_per_gas = value.into();
|
||||||
|
self
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn with_max_priority_fee_per_gas(mut self, value: impl Into<Option<u128>>) -> Self {
|
||||||
|
self.max_priority_fee_per_gas = value.into();
|
||||||
|
self
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn apply_to<N: Network>(&self, transaction_request: &mut N::TransactionRequest) {
|
||||||
|
if let Some(gas_limit) = self.gas_limit {
|
||||||
|
transaction_request.set_gas_limit(gas_limit);
|
||||||
|
}
|
||||||
|
if let Some(gas_price) = self.gas_price {
|
||||||
|
transaction_request.set_gas_price(gas_price);
|
||||||
|
}
|
||||||
|
if let Some(max_fee_per_gas) = self.max_fee_per_gas {
|
||||||
|
transaction_request.set_max_fee_per_gas(max_fee_per_gas);
|
||||||
|
}
|
||||||
|
if let Some(max_priority_fee_per_gas) = self.max_priority_fee_per_gas {
|
||||||
|
transaction_request.set_max_priority_fee_per_gas(max_priority_fee_per_gas)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
|
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ revive-dt-common = { workspace = true }
|
|||||||
|
|
||||||
anyhow = { workspace = true }
|
anyhow = { workspace = true }
|
||||||
clap = { workspace = true }
|
clap = { workspace = true }
|
||||||
|
strum = { workspace = true }
|
||||||
serde = { workspace = true }
|
serde = { workspace = true }
|
||||||
serde_json = { workspace = true }
|
serde_json = { workspace = true }
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
use std::{
|
use std::{
|
||||||
borrow::Cow,
|
borrow::Cow,
|
||||||
collections::{BTreeMap, BTreeSet},
|
collections::{BTreeMap, BTreeSet, HashSet},
|
||||||
fmt::Display,
|
fmt::Display,
|
||||||
fs::{File, OpenOptions},
|
fs::{File, OpenOptions},
|
||||||
ops::{Deref, DerefMut},
|
ops::{Deref, DerefMut},
|
||||||
@@ -9,11 +9,12 @@ use std::{
|
|||||||
};
|
};
|
||||||
|
|
||||||
use anyhow::{Context as _, Error, Result, bail};
|
use anyhow::{Context as _, Error, Result, bail};
|
||||||
use clap::Parser;
|
use clap::{Parser, ValueEnum};
|
||||||
use serde::{Deserialize, Serialize, de::DeserializeOwned};
|
use serde::{Deserialize, Serialize, de::DeserializeOwned};
|
||||||
|
|
||||||
use revive_dt_common::types::{Mode, ParsedTestSpecifier};
|
use revive_dt_common::types::{Mode, ParsedTestSpecifier};
|
||||||
use revive_dt_report::{Report, TestCaseStatus};
|
use revive_dt_report::{Report, TestCaseStatus};
|
||||||
|
use strum::EnumString;
|
||||||
|
|
||||||
fn main() -> Result<()> {
|
fn main() -> Result<()> {
|
||||||
let cli = Cli::try_parse().context("Failed to parse the CLI arguments")?;
|
let cli = Cli::try_parse().context("Failed to parse the CLI arguments")?;
|
||||||
@@ -23,11 +24,14 @@ fn main() -> Result<()> {
|
|||||||
report_path,
|
report_path,
|
||||||
output_path: output_file,
|
output_path: output_file,
|
||||||
remove_prefix,
|
remove_prefix,
|
||||||
|
include_status,
|
||||||
} => {
|
} => {
|
||||||
let remove_prefix = remove_prefix
|
let remove_prefix = remove_prefix
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.map(|path| path.canonicalize().context("Failed to canonicalize path"))
|
.map(|path| path.canonicalize().context("Failed to canonicalize path"))
|
||||||
.collect::<Result<Vec<_>>>()?;
|
.collect::<Result<Vec<_>>>()?;
|
||||||
|
let include_status =
|
||||||
|
include_status.map(|value| value.into_iter().collect::<HashSet<_>>());
|
||||||
|
|
||||||
let expectations = report_path
|
let expectations = report_path
|
||||||
.execution_information
|
.execution_information
|
||||||
@@ -73,7 +77,12 @@ fn main() -> Result<()> {
|
|||||||
Status::from(status),
|
Status::from(status),
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
.filter(|(_, status)| *status == Status::Failed)
|
.filter(|(_, status)| {
|
||||||
|
include_status
|
||||||
|
.as_ref()
|
||||||
|
.map(|allowed_status| allowed_status.contains(status))
|
||||||
|
.unwrap_or(true)
|
||||||
|
})
|
||||||
.collect::<Expectations>();
|
.collect::<Expectations>();
|
||||||
|
|
||||||
let output_file = OpenOptions::new()
|
let output_file = OpenOptions::new()
|
||||||
@@ -143,6 +152,11 @@ pub enum Cli {
|
|||||||
/// Prefix paths to remove from the paths in the final expectations file.
|
/// Prefix paths to remove from the paths in the final expectations file.
|
||||||
#[clap(long)]
|
#[clap(long)]
|
||||||
remove_prefix: Vec<PathBuf>,
|
remove_prefix: Vec<PathBuf>,
|
||||||
|
|
||||||
|
/// Controls which test case statuses are included in the generated expectations file. If
|
||||||
|
/// nothing is specified then it will include all of the test case status.
|
||||||
|
#[clap(long)]
|
||||||
|
include_status: Option<Vec<Status>>,
|
||||||
},
|
},
|
||||||
|
|
||||||
/// Compares two expectation files to ensure that they match each other.
|
/// Compares two expectation files to ensure that they match each other.
|
||||||
@@ -157,7 +171,21 @@ pub enum Cli {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)]
|
#[derive(
|
||||||
|
Clone,
|
||||||
|
Copy,
|
||||||
|
Debug,
|
||||||
|
PartialEq,
|
||||||
|
Eq,
|
||||||
|
PartialOrd,
|
||||||
|
Ord,
|
||||||
|
Hash,
|
||||||
|
Serialize,
|
||||||
|
Deserialize,
|
||||||
|
ValueEnum,
|
||||||
|
EnumString,
|
||||||
|
)]
|
||||||
|
#[strum(serialize_all = "kebab-case")]
|
||||||
pub enum Status {
|
pub enum Status {
|
||||||
Succeeded,
|
Succeeded,
|
||||||
Failed,
|
Failed,
|
||||||
|
|||||||
+1
-1
Submodule resolc-compiler-tests updated: 55da34c4f6...9522e30552
Reference in New Issue
Block a user