aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-12-23 12:15:16 -0800
committerAlon Zakai <alonzakai@gmail.com>2013-12-23 12:15:16 -0800
commit9b3e1b8d8e948709a9df1a23ea8790c93eb5b82e (patch)
treec831e8afe49adfaa258aaa2c1ca49255557e2078
parent8825277bf323c15f8354e0429af85868b919cf9a (diff)
improve fuzz test tool
-rwxr-xr-xtests/fuzz/test.sh52
1 files changed, 34 insertions, 18 deletions
diff --git a/tests/fuzz/test.sh b/tests/fuzz/test.sh
index cc77dba4..166d4bab 100755
--- a/tests/fuzz/test.sh
+++ b/tests/fuzz/test.sh
@@ -2,22 +2,38 @@
# ~/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
+echo "builds"
+gcc $@ -I/home/alon/Dev/csmith/runtime -o n1.out &> /dev/null
+/home/alon/Dev/fastcomp/build/Release/bin/clang $@ -I/home/alon/Dev/csmith/runtime -o n2.out &> /dev/null
+/home/alon/Dev/fastcomp/build/Release/bin/clang $@ -I/home/alon/Dev/csmith/runtime -emit-llvm -c -o bc.bc &> o
+~/Dev/emscripten/emcc $@ -I/home/alon/Dev/csmith/runtime -o js.out.js &> /dev/null
+#~/Dev/emscripten/emcc $@ -s UNALIGNED_MEMORY=1 -I/home/alon/Dev/csmith/runtime -o ua.out.js &> /dev/null
+#~/Dev/emscripten/emcc $@ -s SAFE_HEAP=1 -I/home/alon/Dev/csmith/runtime -o sh.out.js &> /dev/null
+EMCC_FAST_COMPILER=1 ~/Dev/emscripten/emcc $@ -I/home/alon/Dev/csmith/runtime -o fc.out.js &> /dev/null
+echo "run n1"
+./n1.out &> n1
+echo "run n2"
+./n2.out &> n2
+echo "run bc"
+/home/alon/Dev/fastcomp/build/Release/bin/lli bc.bc &> bc
+echo "run js"
+mozjs js.out.js &> js
+echo "run ua"
+#mozjs ua.out.js &> ua
+echo "run sh"
+#mozjs sh.out.js &> sh
+echo "run fc"
+mozjs fc.out.js &> fc
+echo "n/n"
+diff n1 n2
+echo "n/bc"
+diff n1 bc
+echo "n/js"
+diff n1 js | grep -v warning
+echo "n/js-ua"
+#diff n1 ua | grep -v warning
+echo "n/js-sh"
+#diff n1 sh | grep -v warning
+echo "js/js"
+diff js fc | grep -v warning