aboutsummaryrefslogtreecommitdiff
path: root/tests/fuzz/test.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/fuzz/test.sh')
-rwxr-xr-xtests/fuzz/test.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/fuzz/test.sh b/tests/fuzz/test.sh
new file mode 100755
index 00000000..cc77dba4
--- /dev/null
+++ b/tests/fuzz/test.sh
@@ -0,0 +1,23 @@
+# e.g.
+# ~/Dev/emscripten/tests/fuzz$ CSMITH=~/Dev/csmith/src/csmith CSMITH_PATH=~/Dev/csmith python ./csmith_driver.py
+# to find failures, then check those out with this script
+
+echo "0"
+gcc $1 -I/home/alon/Dev/csmith/runtime &> /dev/null
+~/Dev/emscripten/emcc $1 -I/home/alon/Dev/csmith/runtime &> /dev/null
+./a.out > o
+mozjs a.out.js > b
+diff o b
+echo "1"
+gcc -O1 $1 -I/home/alon/Dev/csmith/runtime &> /dev/null
+~/Dev/emscripten/emcc -O1 $1 -I/home/alon/Dev/csmith/runtime &> /dev/null
+./a.out > o
+mozjs a.out.js > b
+diff o b
+echo "2"
+gcc -O2 $1 -I/home/alon/Dev/csmith/runtime &> /dev/null
+~/Dev/emscripten/emcc -O2 $1 -I/home/alon/Dev/csmith/runtime &> /dev/null
+./a.out > o
+mozjs a.out.js > b
+diff o b
+