Skip to content

Commit

Permalink
some cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
rakita committed Jan 3, 2025
1 parent afce06e commit f36e0e6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
13 changes: 9 additions & 4 deletions bins/revme/src/cmd/eofvalidation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,16 +81,21 @@ pub fn run_test(path: &Path) -> Result<(), Error> {
} else {
Some(CodeType::ReturnOrStop)
};
let test_result = test_vector.results.get("Osaka");
// In future this can be generalized to cover multiple forks, Not just Osaka.
let Some(test_result) = test_vector.results.get("Osaka") else {
// if test does not have a result that we can compare to, we skip it
println!("Test without result: {} - {}", name, vector_name);
continue;
};
let res = validate_raw_eof_inner(test_vector.code.clone(), kind);
if test_result.map(|r| r.result).unwrap_or(res.is_ok()) != res.is_ok() {
if test_result.result != res.is_ok() {
println!(
"\nTest failed: {} - {}\nresult:{:?}\nrevm err_result:{:#?}\nExpected exception:{:?}\nbytes:{:?}\n",
name,
vector_name,
test_result.unwrap().result,
test_result.result,
res.as_ref().err(),
test_result.unwrap().exception,
test_result.exception,
test_vector.code
);
*types_of_error
Expand Down
7 changes: 1 addition & 6 deletions bins/revme/src/cmd/statetest/runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -342,12 +342,7 @@ pub fn execute_test_suite(
continue;
}

// Enable EOF in Prague tests.
cfg.spec = if spec_name == SpecName::Prague {
SpecId::OSAKA
} else {
spec_name.to_spec_id()
};
cfg.spec = spec_name.to_spec_id();

if cfg.spec.is_enabled_in(SpecId::MERGE) && block.prevrandao.is_none() {
// If spec is merge and prevrandao is not set, set it to default
Expand Down

0 comments on commit f36e0e6

Please sign in to comment.