From d70bc70dede853ff46eb9a212ec03ce6beccf87a Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Wed, 9 Sep 2009 01:39:46 +0000 Subject: [PATCH] updated regression test scripts --- qse/regress/awk/regress.sh | 19 ++++++++++--------- qse/regress/sed/regress.sh | 16 ++++++++-------- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/qse/regress/awk/regress.sh b/qse/regress/awk/regress.sh index b137931b..05911f86 100755 --- a/qse/regress/awk/regress.sh +++ b/qse/regress/awk/regress.sh @@ -166,18 +166,18 @@ PROGS=" run_scripts() { - local valgrind="${1}" + valgrind="${1}" echo "${PROGS}" > "${TMPFILE}" while read prog do [ -z "${prog}" ] && continue - local script="`echo ${prog} | cut -d/ -f1`" - local datafile="`echo ${prog} | cut -d/ -f2`" - local redinfile="`echo ${prog} | cut -d/ -f3`" - local awkopts="`echo ${prog} | cut -d/ -f4`" - local orgscript="${script}" + script="`echo ${prog} | cut -d/ -f1`" + datafile="`echo ${prog} | cut -d/ -f2`" + redinfile="`echo ${prog} | cut -d/ -f3`" + awkopts="`echo ${prog} | cut -d/ -f4`" + orgscript="${script}" [ -z "${script}" ] && continue @@ -236,17 +236,18 @@ test) echo_so "TEST OK" ;; leakcheck) - valgrind="`which valgrind 2> /dev/null || echo ""`" - [ -z "${valgrind}" ] && { + bin_valgrind="`which valgrind 2> /dev/null || echo ""`" + [ -z "${bin_valgrind}" ] && { echo_so "valgrind not found. cannot perform this test" exit 1 } - run_scripts "${valgrind} --leak-check=full --show-reachable=yes --track-fds=yes" 2>&1 > "${OUTFILE}.test" + run_scripts "${bin_valgrind} --leak-check=full --show-reachable=yes --track-fds=yes" 2>&1 > "${OUTFILE}.test" echo_so "Inspect the '${OUTFILE}.test' file for any memory and file descriptor leaks." ;; *) echo_so "USAGE: $0 init" echo_so " $0 test" + echo_so " $0 leakcheck" exit 1 ;; esac diff --git a/qse/regress/sed/regress.sh b/qse/regress/sed/regress.sh index b1028c9a..6d21685c 100755 --- a/qse/regress/sed/regress.sh +++ b/qse/regress/sed/regress.sh @@ -63,17 +63,17 @@ PROGS=" run_scripts() { - local valgrind="$1" + valgrind="$1" echo "${PROGS}" > "${TMPFILE}" while read prog do [ -z "${prog}" ] && continue - local script="`echo ${prog} | cut -d/ -f1`" - local datafile="`echo ${prog} | cut -d/ -f2`" - local redinfile="`echo ${prog} | cut -d/ -f3`" - local options="`echo ${prog} | cut -d/ -f4`" + script="`echo ${prog} | cut -d/ -f1`" + datafile="`echo ${prog} | cut -d/ -f2`" + redinfile="`echo ${prog} | cut -d/ -f3`" + options="`echo ${prog} | cut -d/ -f4`" [ -z "${script}" ] && continue @@ -116,12 +116,12 @@ test) echo_so "TEST OK" ;; leakcheck) - valgrind="`which valgrind 2> /dev/null || echo ""`" - [ -z "${valgrind}" ] && { + bin_valgrind="`which valgrind 2> /dev/null || echo ""`" + [ -z "${bin_valgrind}" ] && { echo_so "valgrind not found. cannot perform this test" exit 1 } - run_scripts "${valgrind} --leak-check=full --show-reachable=yes --track-fds=yes" 2>&1 > "${OUTFILE}.test" + run_scripts "${bin_valgrind} --leak-check=full --show-reachable=yes --track-fds=yes" 2>&1 > "${OUTFILE}.test" echo_so "Inspect the '${OUTFILE}.test' file for any memory and file descriptor leaks." ;; *)