summaryrefslogtreecommitdiffstats
path: root/tests/run-fuzzer.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/run-fuzzer.sh')
-rwxr-xr-xtests/run-fuzzer.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/run-fuzzer.sh b/tests/run-fuzzer.sh
new file mode 100755
index 0000000..0a86c63
--- /dev/null
+++ b/tests/run-fuzzer.sh
@@ -0,0 +1,23 @@
+#!/usr/bin/env bash
+
+# For the license, see the LICENSE file in the root directory.
+
+DIR=${PWD}/$(dirname "$0")
+ROOT=${DIR}/..
+WORKDIR=$(mktemp -d)
+
+function cleanup()
+{
+ rm -rf ${WORKDIR}
+}
+
+trap "cleanup" QUIT EXIT
+
+pushd $WORKDIR
+
+${DIR}/fuzz $@ ${DIR}/corpus-execute-command
+rc=$?
+
+popd
+
+exit $rc