diff options
Diffstat (limited to '')
-rwxr-xr-x | security/nss/automation/taskcluster/scripts/fuzz.sh | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/security/nss/automation/taskcluster/scripts/fuzz.sh b/security/nss/automation/taskcluster/scripts/fuzz.sh new file mode 100755 index 0000000000..75851ff5b9 --- /dev/null +++ b/security/nss/automation/taskcluster/scripts/fuzz.sh @@ -0,0 +1,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" "$@" |