Skip to content

Commit

Permalink
fix(ci): skip files without modified functions (ethereum-optimism#11891)
Browse files Browse the repository at this point in the history
Updates test-heavy-fuzz-modified-tests to skip any files that
don't have any modified fuzz tests.
  • Loading branch information
smartcontracts authored and samlaf committed Nov 10, 2024
1 parent 54f2e9e commit e63b214
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,11 @@ for FILE in $CHANGED_FILES; do
# Extract function names and their line numbers from the entire file
FUNCTION_LINES=$(awk '/function testFuzz_|function invariant_/ {print FNR, $0}' "$FILE")

# If there are no function lines, skip the file.
if [ -z "$FUNCTION_LINES" ]; then
continue
fi

# Reverse the function lines so we can match the last function modified.
# We'd otherwise end up matching the first function with a line number less
# than the modified line number which is not what we want.
Expand Down

0 comments on commit e63b214

Please sign in to comment.