File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22
3+ # First argument is the time, in seconds, to run each fuzz test for.
4+ # If not provided, defaults to 1 second.
5+ #
6+ # Second argument is the directory to run fuzz tests in.
7+ # If not provided, defaults to the current directory.
8+
39set -euo pipefail
410
511# Mostly taken from https://github.com/golang/go/issues/46312#issuecomment-1153345129
@@ -10,7 +16,9 @@ AVALANCHE_PATH=$( cd "$( dirname "${BASH_SOURCE[0]}" )"; cd .. && pwd )
1016source " $AVALANCHE_PATH " /scripts/constants.sh
1117
1218fuzzTime=${1:- 1}
13- files=$( grep -r --include=' **_test.go' --files-with-matches ' func Fuzz' .)
19+ fuzzDir=${2:- .}
20+
21+ files=$( grep -r --include=' **_test.go' --files-with-matches ' func Fuzz' $fuzzDir )
1422failed=false
1523for file in ${files}
1624do
You can’t perform that action at this time.
0 commit comments