From 6911d77abf61278e40a2ff941bb7c5a1f94ade33 Mon Sep 17 00:00:00 2001 From: David Mak Date: Fri, 9 Aug 2024 12:26:59 +0800 Subject: [PATCH] standalone: Add back support for --debug flag --- nac3standalone/demo/check_demo.sh | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/nac3standalone/demo/check_demo.sh b/nac3standalone/demo/check_demo.sh index d31ebe21..8b0dcb11 100755 --- a/nac3standalone/demo/check_demo.sh +++ b/nac3standalone/demo/check_demo.sh @@ -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"