Skip to content
This repository was archived by the owner on Jul 22, 2020. It is now read-only.

Commit eff6e69

Browse files
authored
Make fuzzit.sh independent of travis
1 parent 76c698e commit eff6e69

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

ci/fuzzit.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ fi
2020
go get -u github.com/dvyukov/go-fuzz/go-fuzz github.com/dvyukov/go-fuzz/go-fuzz-build
2121

2222
## build fuzz target
23-
go build ./...
2423

2524
# target name can only contain lower-case letters (a-z), digits (0-9) and a dash (-)
2625
TARGET=parse-complex
@@ -30,6 +29,7 @@ clang -fsanitize=fuzzer ${TARGET}.a -o ${TARGET}
3029

3130
# you can repeat the above for more fuzzing targets
3231

32+
## Install fuzzit cmd-line tool for talking to https://fuzzit.dev
3333
wget -q -O fuzzit https://github.com/fuzzitdev/fuzzit/releases/download/v2.4.12/fuzzit_Linux_x86_64
3434
chmod a+x fuzzit
3535

@@ -39,8 +39,11 @@ chmod a+x fuzzit
3939
# create fuzzing target on the server if it doesn't already exist
4040
./fuzzit create target ${TARGET} || true
4141

42+
GIT_BRANCH=`git rev-parse --abbrev-ref HEAD`
43+
GIT_COMMIT=`git rev-parse --short HEAD`
44+
4245
if [ $1 == "fuzzing" ]; then
43-
./fuzzit create job --branch $TRAVIS_BRANCH --revision $TRAVIS_COMMIT ${TARGET} ./${TARGET}
46+
./fuzzit create job --branch $GIT_BRANCH --revision $GIT_COMMIT ${TARGET} ./${TARGET}
4447
else
4548
./fuzzit create job --local ${TARGET} ./${TARGET}
4649
fi

0 commit comments

Comments
 (0)