diff --git a/.github/scripts/parse_ported_tests.sh b/.github/scripts/parse_ported_tests.sh index 5501635d0d2..25ea44e4425 100755 --- a/.github/scripts/parse_ported_tests.sh +++ b/.github/scripts/parse_ported_tests.sh @@ -12,8 +12,20 @@ WORKSPACE_PATH="${2:-$GITHUB_WORKSPACE}" echo "Changed or new test files: $CHANGED_TEST_FILES" -# Extract ported_from markers -uv run fill $CHANGED_TEST_FILES --show-ported-from --clean --quiet --links-as-filled --skip-coverage-missed-reason --ported-from-output-file ported_from_files.txt +FILTERED_FILES="" +for file in $CHANGED_TEST_FILES; do + if git diff origin/main -- "$file" | grep -q "^+.*@pytest.mark.ported_from"; then + FILTERED_FILES="$FILTERED_FILES $file" + fi +done + +if [[ -z "$FILTERED_FILES" ]]; then + echo "No new ported_from markers found." + echo "any_ported=false" >> "$GITHUB_OUTPUT" + exit 0 +fi + +uv run fill $FILTERED_FILES --show-ported-from --clean --quiet --links-as-filled --skip-coverage-missed-reason --ported-from-output-file ported_from_files.txt files=$(cat ported_from_files.txt) echo "Extracted converted tests:" echo "$files" diff --git a/tests/frontier/opcodes/test_push.py b/tests/frontier/opcodes/test_push.py index e45e90ad6da..65cb213d6d1 100644 --- a/tests/frontier/opcodes/test_push.py +++ b/tests/frontier/opcodes/test_push.py @@ -8,6 +8,7 @@ from ethereum_test_forks import Fork, Frontier, Homestead from ethereum_test_tools import Account, Alloc, Environment, StateTestFiller, Transaction from ethereum_test_tools import Opcodes as Op +from ethereum_test_vm.bytecode import Bytecode def get_input_for_push_opcode(opcode: Op) -> bytes: @@ -112,7 +113,11 @@ def test_stack_overflow( | SSTORE | | [0]: excerpt | +---------------------------------------------------+ """ - contract_code = push_opcode(excerpt) * stack_height + Op.SSTORE + contract_code: Bytecode = Bytecode() + for _ in range(stack_height - 2): + contract_code += Op.PUSH1(0) # mostly push 0 to avoid contract size limit exceeded + contract_code += push_opcode(excerpt) * 2 + Op.SSTORE + contract = pre.deploy_contract(contract_code) tx = Transaction(