mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-03-31 17:50:26 +08:00
got valgrind tests to pass
This commit is contained in:
parent
ad5bb5a1b4
commit
204685b257
@ -14,9 +14,9 @@ list='tst_h_dimscales tst_h_vl2 tst_h_files '\
|
||||
'tst_h_grps tst_h_wrt_cmp tst_h_rd_cmp tst_h_vl tst_h_atts '\
|
||||
'tst_h_dimscales3 tst_h_files2 tst_h_compounds '\
|
||||
'tst_h_vars tst_h_opaques tst_h_compounds2 '\
|
||||
'tst_atts tst_atts2 tst_vl tst_compounds '\
|
||||
'tst_files tst_utf8 tst_fillbug tst_v2 '\
|
||||
'tst_vars2 tst_vars3 tst_xplatform tst_dims '\
|
||||
'tst_vl tst_compounds '\
|
||||
'tst_files tst_utf8 tst_fillbug '\
|
||||
'tst_vars3 tst_xplatform tst_dims '\
|
||||
'tst_dims2 tst_dims3 tst_varms tst_unlim_vars '\
|
||||
'tst_endian_fill tst_compounds2'
|
||||
|
||||
|
@ -64,6 +64,12 @@ tst_interops2_LDADD = ${lib_LTLIBRARIES} -lmfhdf -ldf -ljpeg -lhdf5_hl \
|
||||
-lhdf5 -lz
|
||||
endif # USE_HDF4
|
||||
|
||||
# This will run a bunch of the test programs with valgrind, the memory
|
||||
# checking tool. (Valgrind must be present for this to work.)
|
||||
if USE_VALGRIND_TESTS
|
||||
TESTS += run_valgrind_tests.sh
|
||||
endif # USE_VALGRIND_TESTS
|
||||
|
||||
CLEANFILES = cdm_sea_soundings.nc bm_chunking.nc bm_radar.nc \
|
||||
bm_radar1.nc radar_3d_compression_test.txt radar_3d_compression.txt \
|
||||
radar_2d_compression.txt radar_3d_chunking.txt tst_floats_1D.cdl \
|
||||
@ -89,7 +95,7 @@ EXTRA_DIST = run_par_test.sh run_bm.sh run_bm_test1.sh run_bm_test2.sh \
|
||||
run_bm_radar_2D.sh run_bm_radar_2D_compression1.sh run_par_bm_test.sh \
|
||||
run_bm_elena.sh run_par_bm_radar_2D.sh run_bm_radar_2D_endianness1.sh \
|
||||
run_tst_chunks.sh ref_chunks1.cdl ref_chunks2.cdl run_pnetcdf_test.sh \
|
||||
run_get_hdf4_files.sh
|
||||
run_get_hdf4_files.sh run_valgrind_tests.sh
|
||||
|
||||
if USE_HDF4_FILE_TESTS
|
||||
DISTCLEANFILES = AMSR_E_L2_Rain_V10_200905312326_A.hdf \
|
||||
|
27
nc_test4/run_valgrind_tests.sh
Executable file
27
nc_test4/run_valgrind_tests.sh
Executable file
@ -0,0 +1,27 @@
|
||||
#!/bin/sh
|
||||
|
||||
# This shell runs the tests with valgrind.
|
||||
|
||||
# $Id: run_valgrind_tests.sh,v 1.9 2010/01/26 20:24:18 ed Exp $
|
||||
|
||||
set -e
|
||||
echo ""
|
||||
echo "Testing programs with valgrind..."
|
||||
|
||||
# These are my test programs.
|
||||
list='tst_v2 '\
|
||||
'tst_vars2 tst_atts tst_atts2 '
|
||||
|
||||
# These don't work yet: tst_h_vars3
|
||||
# tst_h_strings tst_h_atts3 tst_h_vars2 tst_vars tst_fills tst_chunks
|
||||
# tst_coords tst_xplatform2
|
||||
|
||||
for tst in $list; do
|
||||
echo ""
|
||||
echo "Memory testing with $tst:"
|
||||
valgrind -q --error-exitcode=2 --leak-check=full ./$tst
|
||||
done
|
||||
|
||||
echo "SUCCESS!!!"
|
||||
|
||||
exit 0
|
Loading…
x
Reference in New Issue
Block a user