Skip to content

Commit

Permalink
dev: update test fixtures (#765)
Browse files Browse the repository at this point in the history
* dev: update test fixtures

* lint
  • Loading branch information
enitrat authored Sep 24, 2024
1 parent 1c94266 commit 0325111
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ endif

# The release tag of https://github.com/kkrt-labs/tests to use for EF tests. Usually an
# ethereum/tests release tag followed by `-kkrt`.
EF_TESTS_TAG := v14.1-kkrt
EF_TESTS_TAG := v14.1.1-kkrt
EF_TESTS_URL := https://github.com/kkrt-labs/tests/archive/refs/tags/$(EF_TESTS_TAG).tar.gz
EF_TESTS_DIR := ./crates/ef-testing/ethereum-tests

Expand Down
19 changes: 12 additions & 7 deletions scripts/generate_skip_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,18 @@
from collections import defaultdict


def format_into_identifier(s: str) -> str:
if "Pyspec" in s:
def format_into_identifier(s: str, is_pyspec: bool = False) -> str:
if is_pyspec:
test_name = s.split("/")[-1].split("::")[-1]
test_name = (
s.split("::")[-1]
.replace("test_", "")
test_name.replace("test_", "")
.replace("(", "_lpar_")
.replace(")", "_rpar")
.replace(")", "_rpar_")
.replace("[", "__")
.replace("]", "")
.replace("-", "_minus_")
.replace(" ", "_")
.replace(".", "_")
.split(",")
)
test_name = "_".join(part.strip() for part in test_name)
Expand All @@ -29,8 +31,11 @@ def extract_runresource_failures(input_file):
for line in file:
if "reverted:" in line:
test_name_line = line
test_name = test_name_line.split("reverted:")[0].split("::")[-1].strip()
test_name = format_into_identifier(test_name)
is_pyspec = ".py" in test_name_line
test_name_raw = (
test_name_line.split("reverted:")[0].split("::")[-1].strip()
)
test_name = format_into_identifier(test_name_raw, is_pyspec)
last_reverted = test_name
# If we find a line that says "RunResources has no remaining steps." after the last reverted test,
# we know that the test failed due to a RunResources error
Expand Down

0 comments on commit 0325111

Please sign in to comment.