2010-06-03 21:24:43 +08:00
|
|
|
#!/bin/sh
|
|
|
|
|
2017-03-09 08:01:10 +08:00
|
|
|
if test "x$srcdir" = x ; then srcdir=`pwd`; fi
|
|
|
|
. ../test_common.sh
|
|
|
|
|
2010-06-03 21:24:43 +08:00
|
|
|
# This shell runs the tests with valgrind.
|
|
|
|
|
|
|
|
set -e
|
|
|
|
echo ""
|
|
|
|
echo "Testing programs with valgrind..."
|
|
|
|
|
|
|
|
# These are my test programs.
|
2010-10-12 17:12:08 +08:00
|
|
|
list='tst_h_files tst_h_files2 tst_h_files4 tst_h_atts '\
|
|
|
|
'tst_h_atts3 tst_h_atts4 tst_h_vars tst_h_vars2 tst_h_vars3 tst_h_grps '\
|
|
|
|
'tst_h_compounds tst_h_compounds2 tst_h_wrt_cmp tst_h_rd_cmp tst_h_vl '\
|
2010-11-30 06:23:16 +08:00
|
|
|
'tst_h_opaques tst_h_strings tst_h_strings1 tst_h_strings2 tst_h_ints '\
|
|
|
|
'tst_h_dimscales tst_h_dimscales1 tst_h_dimscales2 tst_h_dimscales3 '\
|
2011-03-15 18:19:08 +08:00
|
|
|
'tst_h_enums'
|
2010-06-03 21:24:43 +08:00
|
|
|
|
|
|
|
for tst in $list; do
|
|
|
|
echo ""
|
2010-10-12 17:12:08 +08:00
|
|
|
cmd1="valgrind -q --error-exitcode=2 --leak-check=full ./$tst"
|
|
|
|
echo "$cmd1:"
|
|
|
|
$cmd1
|
2010-06-03 21:24:43 +08:00
|
|
|
done
|
|
|
|
|
|
|
|
echo "SUCCESS!!!"
|
|
|
|
|
|
|
|
exit 0
|