Commit 0a34edc4 authored by Martin Beseda's avatar Martin Beseda

FIX: Rename memory leak test for module connection_m

parent e5608c82
......@@ -103,12 +103,12 @@ message ("BUILD_DIR:" ${BUILD_DIR})
message ("LIB_DIR: " ${LIB_DIR})
if (WIN32)
add_executable(connection_mem_leak_test ${SRC_DIR}/connection_mem_leak_test.f90)
target_link_libraries(connection_mem_leak_test connection_m)
add_executable(connection_m_mem_leak_test ${SRC_DIR}/connection_m_mem_leak_test.f90)
target_link_libraries(connection_m_mem_leak_test connection_m)
message ("Windows")
else ()
add_executable(connection_mem_leak_test.out ${SRC_DIR}/connection_mem_leak_test.f90)
target_link_libraries(connection_mem_leak_test.out connection_m)
add_executable(connection_m_mem_leak_test.out ${SRC_DIR}/connection_m_mem_leak_test.f90)
target_link_libraries(connection_m_mem_leak_test.out connection_m)
message ("Not Windows")
endif ()
......@@ -7,22 +7,29 @@ export FSFLAG='-cpp -I'
echo "#------------------#----------------------------------------------------------------------------------"
echo "# FUnit testing... #"
echo "#------------------#"
FUNIT_SCRIPTS=connection_m
cd src;
funit connection_m;
for F in ${FUNIT_SCRIPTS}; do
funit ${F};
done
echo "#---------------------#-------------------------------------------------------------------------------"
echo "# Memcheck testing... #"
echo "#---------------------#"
MEM_TEST_SCRIPTS=connection_m_mem_leak_test.out
cd ../build;
echo "Running connection_test.out..."
TEST1_MEM_STATUS=`valgrind --leak-check=yes build/connection_test.out 2>&1 | grep 'LEAK SUMMARY' | wc -l`
for F in ${MEM_TEST_SCRIPTS}; do
echo "Running ${F}..."
TEST1_MEM_STATUS=`valgrind --leak-check=yes build/${F} 2>&1 | grep 'LEAK SUMMARY' | wc -l`
if [[ TEST1_MEM_STATUS -gt 0 ]]; then
echo "ERROR: Memory leaks detected in connection_test.f90!"
exit -1
fi
echo "connection_test.out OK"
if [[ TEST1_MEM_STATUS -gt 0 ]]; then
echo "ERROR: Memory leaks detected in ${F}!"
exit -1
fi
echo "${F} OK"
done
echo "#---------------------------#"
echo "# No memory leaks detected. #"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment