blob: 75851ff5b92f3255ae0abc043c21f6ce60b49e14 (
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
29
30
31
32
|
#!/usr/bin/env bash
source $(dirname "$0")/tools.sh
type="$1"
shift
# Fetch artifact if needed.
fetch_dist
# Clone corpus.
./nss/fuzz/config/clone_corpus.sh
# Ensure we have a corpus.
if [ ! -d "nss/fuzz/corpus/$type" ]; then
mkdir -p nss/fuzz/corpus/$type
set +x
# 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
set -x
fi
# Fetch objdir name.
objdir=$(cat dist/latest)
# Run nssfuzz.
dist/$objdir/bin/nssfuzz-"$type" "$@"
|