File tree Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change 5
5
inputs :
6
6
directory :
7
7
description : " Directory to search for Go fuzz tests in."
8
- default : ' . '
8
+ default : " . "
9
9
required : false
10
10
type : string
11
11
fuzz-time :
@@ -33,15 +33,20 @@ jobs:
33
33
RESULTS=()
34
34
35
35
for FILE in $TEST_FILES; do
36
- FUZZ_FUNC =$(grep -E 'func Fuzz\w*' $FILE | sed 's/func //' | sed 's/(.*$//')
37
- if [ -z "$FUZZ_FUNC " ]; then
36
+ FUZZ_FUNCS =$(grep -E 'func Fuzz\w*' $FILE | sed 's/func //' | sed 's/(.*$//')
37
+ if [ -z "$FUZZ_FUNCS " ]; then
38
38
continue
39
39
fi
40
40
41
41
PACKAGE_PATH=$(dirname ${FILE#${{ inputs.directory }}/})
42
- RESULTS+=("{\"package\":\"$PACKAGE_PATH\",\"function\":\"$FUZZ_FUNC\"}")
43
-
44
- echo "Found $FUZZ_FUNC in $PACKAGE_PATH"
42
+ for FUZZ_FUNC in $FUZZ_FUNCS; do
43
+ if [ -z "$FUZZ_FUNC" ]; then
44
+ continue
45
+ fi
46
+
47
+ RESULTS+=("{\"package\":\"$PACKAGE_PATH\",\"function\":\"$FUZZ_FUNC\"}")
48
+ echo "Found $FUZZ_FUNC in $PACKAGE_PATH"
49
+ done
45
50
done
46
51
47
52
NUM_RESULTS=${#RESULTS[@]}
74
79
cache : false
75
80
76
81
- name : Find cache location
77
- run :
78
- echo "FUZZ_CACHE=$(go env GOCACHE)/fuzz" >> $GITHUB_ENV
82
+ run : echo "FUZZ_CACHE=$(go env GOCACHE)/fuzz" >> $GITHUB_ENV
79
83
80
84
- name : Restore fuzz cache
81
85
uses : actions/cache@v4
You can’t perform that action at this time.
0 commit comments