mirror of https://github.com/google/oss-fuzz.git
native go fuzzing: Restrict fuzzer lookup to `*.go` (#8238)
native go fuzzing: Restrict fuzzer lookup to *.go Projects containing words starting with Fuzz in non-go files break compile_native_go_fuzzer with the error: sed: -e expression #1, char 15: unknown option to 's' Signed-off-by: Paulo Gomes <pjbgf@linux.com> Signed-off-by: Paulo Gomes <pjbgf@linux.com>
This commit is contained in:
parent
c113501247
commit
0b416da224
|
@ -77,7 +77,7 @@ tags="-tags gofuzz"
|
|||
abs_file_dir=$(go list $tags -f {{.Dir}} $path)
|
||||
|
||||
# TODO(adamkorcz): Get rid of "-r" flag here.
|
||||
fuzzer_filename=$(grep -r -l -s "$function" "${abs_file_dir}")
|
||||
fuzzer_filename=$(grep -r -l --include='*.go' -s "$function" "${abs_file_dir}")
|
||||
|
||||
# Test if file contains a line with "func $function" and "testing.F".
|
||||
if [ $(grep -r "func $function" $fuzzer_filename | grep "testing.F" | wc -l) -eq 1 ]
|
||||
|
|
Loading…
Reference in New Issue