From a796af998df1cfc11f44a0b6f92bd4dfaa91d662 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Tue, 23 Jul 2024 16:42:38 +0300 Subject: [PATCH] github, scripts: minor tweaks all around --- .github/workflows/tests.yml | 2 +- scripts/fuzz.sh | 16 +++++++--------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 974867d..e3a0b99 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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: diff --git a/scripts/fuzz.sh b/scripts/fuzz.sh index c926289..ad19a44 100755 --- a/scripts/fuzz.sh +++ b/scripts/fuzz.sh @@ -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