updated regression test scripts

This commit is contained in:
hyung-hwan 2009-09-09 01:39:46 +00:00
parent 454c76bd22
commit d70bc70ded
2 changed files with 18 additions and 17 deletions

View File

@ -166,18 +166,18 @@ PROGS="
run_scripts() run_scripts()
{ {
local valgrind="${1}" valgrind="${1}"
echo "${PROGS}" > "${TMPFILE}" echo "${PROGS}" > "${TMPFILE}"
while read prog while read prog
do do
[ -z "${prog}" ] && continue [ -z "${prog}" ] && continue
local script="`echo ${prog} | cut -d/ -f1`" script="`echo ${prog} | cut -d/ -f1`"
local datafile="`echo ${prog} | cut -d/ -f2`" datafile="`echo ${prog} | cut -d/ -f2`"
local redinfile="`echo ${prog} | cut -d/ -f3`" redinfile="`echo ${prog} | cut -d/ -f3`"
local awkopts="`echo ${prog} | cut -d/ -f4`" awkopts="`echo ${prog} | cut -d/ -f4`"
local orgscript="${script}" orgscript="${script}"
[ -z "${script}" ] && continue [ -z "${script}" ] && continue
@ -236,17 +236,18 @@ test)
echo_so "TEST OK" echo_so "TEST OK"
;; ;;
leakcheck) leakcheck)
valgrind="`which valgrind 2> /dev/null || echo ""`" bin_valgrind="`which valgrind 2> /dev/null || echo ""`"
[ -z "${valgrind}" ] && { [ -z "${bin_valgrind}" ] && {
echo_so "valgrind not found. cannot perform this test" echo_so "valgrind not found. cannot perform this test"
exit 1 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 "Inspect the '${OUTFILE}.test' file for any memory and file descriptor leaks."
;; ;;
*) *)
echo_so "USAGE: $0 init" echo_so "USAGE: $0 init"
echo_so " $0 test" echo_so " $0 test"
echo_so " $0 leakcheck"
exit 1 exit 1
;; ;;
esac esac

View File

@ -63,17 +63,17 @@ PROGS="
run_scripts() run_scripts()
{ {
local valgrind="$1" valgrind="$1"
echo "${PROGS}" > "${TMPFILE}" echo "${PROGS}" > "${TMPFILE}"
while read prog while read prog
do do
[ -z "${prog}" ] && continue [ -z "${prog}" ] && continue
local script="`echo ${prog} | cut -d/ -f1`" script="`echo ${prog} | cut -d/ -f1`"
local datafile="`echo ${prog} | cut -d/ -f2`" datafile="`echo ${prog} | cut -d/ -f2`"
local redinfile="`echo ${prog} | cut -d/ -f3`" redinfile="`echo ${prog} | cut -d/ -f3`"
local options="`echo ${prog} | cut -d/ -f4`" options="`echo ${prog} | cut -d/ -f4`"
[ -z "${script}" ] && continue [ -z "${script}" ] && continue
@ -116,12 +116,12 @@ test)
echo_so "TEST OK" echo_so "TEST OK"
;; ;;
leakcheck) leakcheck)
valgrind="`which valgrind 2> /dev/null || echo ""`" bin_valgrind="`which valgrind 2> /dev/null || echo ""`"
[ -z "${valgrind}" ] && { [ -z "${bin_valgrind}" ] && {
echo_so "valgrind not found. cannot perform this test" echo_so "valgrind not found. cannot perform this test"
exit 1 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 "Inspect the '${OUTFILE}.test' file for any memory and file descriptor leaks."
;; ;;
*) *)