Skip to content

Commit

Permalink
github, scripts: minor tweaks all around
Browse files Browse the repository at this point in the history
  • Loading branch information
karalabe committed Jul 23, 2024
1 parent 8917a46 commit a796af9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
go-version: ['1.21.x', '1.22.x']
go-version: ['stable', 'oldstable']
runs-on: ${{ matrix.os }}

steps:
Expand Down
16 changes: 7 additions & 9 deletions scripts/fuzz.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,13 @@

fuzzTime=${1:-1m}

while true; do
files=$(grep -r --include='**_test.go' --files-with-matches 'func Fuzz' .)
for file in ${files}; do
funcs=$(grep '^func Fuzz' "$file" | sed s/func\ // | sed 's/(.*$//')
files=$(grep -r --include='**_test.go' --files-with-matches 'func Fuzz' .)
for file in ${files}; do
funcs=$(grep '^func Fuzz' "$file" | sed s/func\ // | sed 's/(.*$//')

for func in ${funcs}; do
echo "Fuzzing $func in $file"
parentDir=$(dirname "$file")
go test "$parentDir" -run="$func" -fuzz="^$func$" -fuzztime="${fuzzTime}"
done
for func in ${funcs}; do
echo "Fuzzing $func in $file"
parentDir=$(dirname "$file")
go test "$parentDir" -run="$func" -fuzz="^$func$" -fuzztime="${fuzzTime}"
done
done

0 comments on commit a796af9

Please sign in to comment.