Compare commits
3 Commits
e1e219e884
...
f2cb171982
Author | SHA1 | Date |
---|---|---|
|
f2cb171982 | |
|
d2a0c777fd | |
|
9bcafdfeac |
|
@ -7,15 +7,17 @@ if [ -z "$1" ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
demo="${@:-1}"
|
declare -a nac3args
|
||||||
set -- "${@:1:$(($# - 1))}"
|
while [ $# -gt 1 ]; do
|
||||||
|
nac3args+=("$1")
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
demo="$1"
|
||||||
|
|
||||||
echo -n "Checking $demo... "
|
echo -n "Checking $demo... "
|
||||||
./interpret_demo.py "$demo" > interpreted.log &
|
./interpret_demo.py "$demo" > interpreted.log
|
||||||
./run_demo.sh --redirect-exe-stdout --suppress-nac3-warnings "$@" "$demo" &
|
./run_demo.sh --redirect-exe-stdout "${nac3args[@]}" "$demo"
|
||||||
./run_demo_lli.sh --redirect-exe-stdout --suppress-nac3-warnings "$@" "$demo" &
|
./run_demo_lli.sh --redirect-exe-stdout "${nac3args[@]}" "$demo"
|
||||||
wait
|
|
||||||
|
|
||||||
diff -Nau interpreted.log run.log
|
diff -Nau interpreted.log run.log
|
||||||
diff -Nau interpreted.log run_lli.log
|
diff -Nau interpreted.log run_lli.log
|
||||||
echo "ok"
|
echo "ok"
|
||||||
|
|
|
@ -13,9 +13,6 @@ while [ $# -ge 1 ]; do
|
||||||
--redirect-exe-stdout)
|
--redirect-exe-stdout)
|
||||||
redirect_exe_stdout=1
|
redirect_exe_stdout=1
|
||||||
;;
|
;;
|
||||||
--suppress-nac3-warnings)
|
|
||||||
suppress_nac3_warnings=1
|
|
||||||
;;
|
|
||||||
*)
|
*)
|
||||||
nac3args+=("$1")
|
nac3args+=("$1")
|
||||||
;;
|
;;
|
||||||
|
@ -32,14 +29,10 @@ fi
|
||||||
|
|
||||||
rm -f "*.o" demo
|
rm -f "*.o" demo
|
||||||
|
|
||||||
if [ -z "$suppress_nac3_warnings" ]; then
|
$nac3standalone "${nac3args[@]}"
|
||||||
$nac3standalone "${nac3args[@]}"
|
|
||||||
else
|
|
||||||
$nac3standalone "${nac3args[@]}" >/dev/null
|
|
||||||
fi
|
|
||||||
|
|
||||||
clang -c -std=gnu11 -Wall -Wextra -O3 -o demo.o demo.c
|
clang -c -std=gnu11 -Wall -Wextra -O3 -o demo.o demo.c
|
||||||
clang -o demo module.o demo.o
|
clang -lm -o demo module.o demo.o
|
||||||
|
|
||||||
if [ -z "$redirect_exe_stdout" ]; then
|
if [ -z "$redirect_exe_stdout" ]; then
|
||||||
./demo
|
./demo
|
||||||
|
|
|
@ -13,9 +13,6 @@ while [ $# -ge 1 ]; do
|
||||||
--redirect-exe-stdout)
|
--redirect-exe-stdout)
|
||||||
redirect_exe_stdout=1
|
redirect_exe_stdout=1
|
||||||
;;
|
;;
|
||||||
--suppress-nac3-warnings)
|
|
||||||
suppress_nac3_warnings=1
|
|
||||||
;;
|
|
||||||
*)
|
*)
|
||||||
nac3args+=("$1")
|
nac3args+=("$1")
|
||||||
;;
|
;;
|
||||||
|
@ -32,11 +29,7 @@ fi
|
||||||
|
|
||||||
rm -f "*.o" "*.bc" demo
|
rm -f "*.o" "*.bc" demo
|
||||||
|
|
||||||
if [ -z "$suppress_nac3_warnings" ]; then
|
$nac3standalone --emit-llvm "${nac3args[@]}"
|
||||||
$nac3standalone --emit-llvm "${nac3args[@]}"
|
|
||||||
else
|
|
||||||
$nac3standalone --emit-llvm "${nac3args[@]}" >/dev/null
|
|
||||||
fi
|
|
||||||
|
|
||||||
clang -c -std=gnu11 -Wall -Wextra -O3 -emit-llvm -o demo.bc demo.c
|
clang -c -std=gnu11 -Wall -Wextra -O3 -emit-llvm -o demo.bc demo.c
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue