blob: 72f9f18eaf02dbbcd72193e96e3b33086916004e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#!/usr/bin/env bash
source $(dirname "$0")/tools.sh
type="$1"
shift
# Fetch artifact if needed.
fetch_dist
# Clone corpus.
./nss/fuzz/clone_corpus.sh
# Ensure we have a corpus.
if [ ! -d "nss/fuzz/corpus/$type" ]; then
mkdir -p nss/fuzz/corpus/$type
# Create a corpus out of what we have.
for f in $(find nss/fuzz/corpus -type f); do
cp $f "nss/fuzz/corpus/$type"
done
fi
# Fetch objdir name.
objdir=$(cat dist/latest)
# Run nssfuzz.
dist/$objdir/bin/nssfuzz-"$type" "$@"
|