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