Skip to content

Commit

Permalink
Run fuzz tests in local directory (#7015)
Browse files Browse the repository at this point in the history
  • Loading branch information
ajeetdsouza authored Nov 30, 2020
1 parent 5d162e3 commit 8e5e538
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions gql/fuzzit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ export GO111MODULE="on"
go get -u github.com/dvyukov/go-fuzz/go-fuzz github.com/dvyukov/go-fuzz/go-fuzz-build

## Build a fuzz target which is later used for fuzzitdev for Continuous Fuzzing.
go-fuzz-build -libfuzzer -o parser-fuzz-target.a $GOPATH/src/github.com/dgraph-io/dgraph/gql/
docker run --rm -v $(pwd):/tmp rsmmr/clang clang -fsanitize=fuzzer /tmp/parser-fuzz-target.a -o /tmp/parser-fuzz-target
go-fuzz-build -o parser-fuzz-target.a -libfuzzer .
docker run --rm -v "$(pwd):/tmp" teeks99/clang-ubuntu:10 clang-10 -fsanitize=fuzzer /tmp/parser-fuzz-target.a -o /tmp/parser-fuzz-target

## Step 2: Perform Fuzzing and local regression on the fuzz target using fuzzit CLI

Expand All @@ -19,7 +19,7 @@ chmod a+x fuzzit

## Create a target on fuzzit servers
./fuzzit create target --skip-if-exists --seed ./gql/fuzz-data/corpus.tar.gz parser-fuzz-target
## Start a job (${1} = [fuzzing][local-regression]).
./fuzzit create job --type ${1} dgraph-io-gh/parser-fuzz-target parser-fuzz-target
## Start a job (${1} = [fuzzing][local-regression]).
./fuzzit create job --type "${1}" dgraph-io-gh/parser-fuzz-target parser-fuzz-target

rm -f parser-fuzz-target parser-fuzz-target.a fuzzit

0 comments on commit 8e5e538

Please sign in to comment.