standalone: Add back support for --debug flag

This commit is contained in:
David Mak 2024-08-09 12:26:59 +08:00
parent 98a85abc1b
commit 6911d77abf
1 changed files with 14 additions and 3 deletions

View File

@ -11,9 +11,12 @@ declare -a nac3args
while [ $# -ge 2 ]; do
case "$1" in
--help)
echo "Usage: check_demo.sh [-i686] -- demo [NAC3ARGS...]"
echo "Usage: check_demo.sh [--debug] [-i686] -- demo [NAC3ARGS...]"
exit
;;
--debug)
debug=1
;;
-i686)
i686=1
;;
@ -43,12 +46,20 @@ echo ">>>>>> Running $demo with the Python interpreter"
if [ -n "$i686" ]; then
echo "...... Trying NAC3's 32-bit code generator output"
./run_demo.sh -i686 --out run_32.log "${nac3args[@]}" "$demo"
if [ -n "$debug" ]; then
./run_demo.sh --debug -i686 --out run_32.log -- "${nac3args[@]}" "$demo"
else
./run_demo.sh -i686 --out run_32.log -- "${nac3args[@]}" "$demo"
fi
diff -Nau interpreted.log run_32.log
fi
echo "...... Trying NAC3's 64-bit code generator output"
./run_demo.sh --out run_64.log "${nac3args[@]}" "$demo"
if [ -n "$debug" ]; then
./run_demo.sh --debug --out run_64.log -- "${nac3args[@]}" "$demo"
else
./run_demo.sh --out run_64.log -- "${nac3args[@]}" "$demo"
fi
diff -Nau interpreted.log run_64.log
echo "...... OK"