aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-xtests/fuzz/csmith_driver.py2
-rw-r--r--tests/fuzz/test.sh20
2 files changed, 21 insertions, 1 deletions
diff --git a/tests/fuzz/csmith_driver.py b/tests/fuzz/csmith_driver.py
index c987a3be..ecf5d2dc 100755
--- a/tests/fuzz/csmith_driver.py
+++ b/tests/fuzz/csmith_driver.py
@@ -10,7 +10,7 @@ import os, sys, difflib, shutil
from distutils.spawn import find_executable
from subprocess import check_call, Popen, PIPE, STDOUT, CalledProcessError
-sys.path += [os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(__file__))), 'tools')]
+sys.path += [os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))), 'tools')]
import shared
engine1 = eval('shared.' + sys.argv[1]) if len(sys.argv) > 1 else shared.JS_ENGINES[0]
diff --git a/tests/fuzz/test.sh b/tests/fuzz/test.sh
new file mode 100644
index 00000000..60815c9f
--- /dev/null
+++ b/tests/fuzz/test.sh
@@ -0,0 +1,20 @@
+# 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/emscripten/emcc $1 -I/home/alon/Dev/csmith/runtime
+./a.out
+mozjs a.out.js
+echo "1"
+gcc -O1 $1 -I/home/alon/Dev/csmith/runtime
+~/Dev/emscripten/emcc -O1 $1 -I/home/alon/Dev/csmith/runtime
+./a.out
+mozjs a.out.js
+echo "2"
+gcc -O2 $1 -I/home/alon/Dev/csmith/runtime
+~/Dev/emscripten/emcc -O2 $1 -I/home/alon/Dev/csmith/runtime
+./a.out
+mozjs a.out.js
+