Commit c3daaf45 authored by smartcontracts's avatar smartcontracts Committed by GitHub

fix(ci): skip files without modified functions (#11891)

Updates test-heavy-fuzz-modified-tests to skip any files that
don't have any modified fuzz tests.
parent e9b80ee1
...@@ -88,6 +88,11 @@ for FILE in $CHANGED_FILES; do ...@@ -88,6 +88,11 @@ for FILE in $CHANGED_FILES; do
# Extract function names and their line numbers from the entire file # Extract function names and their line numbers from the entire file
FUNCTION_LINES=$(awk '/function testFuzz_|function invariant_/ {print FNR, $0}' "$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. # 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 # 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. # than the modified line number which is not what we want.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment