Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev: update test fixtures #765

Merged
merged 2 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading