summaryrefslogtreecommitdiff
path: root/tools/fuzz.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tools/fuzz.sh')
-rwxr-xr-xtools/fuzz.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/tools/fuzz.sh b/tools/fuzz.sh
new file mode 100755
index 0000000..fd2391b
--- /dev/null
+++ b/tools/fuzz.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+TITLE=$1
+shift
+
+if [ ! -f ./public/$TITLE/rules.js ]
+then
+ echo usage: bash tools/fuzz.sh title_id
+ exit 1
+fi
+
+mkdir -p fuzzer/corpus-$TITLE
+
+RULES=../public/$TITLE/rules.js \
+ npx jazzer tools/rtt-fuzz.js --sync fuzzer/corpus-$TITLE "$@" -- -exact_artifact_path=/dev/null | \
+ tee fuzzer/log-$TITLE.txt