From: <ai...@us...> - 2013-10-22 01:33:22
|
Revision: 12616 http://sourceforge.net/p/plplot/code/12616 Author: airwin Date: 2013-10-22 01:33:19 +0000 (Tue, 22 Oct 2013) Log Message: ----------- Implement a VALGRIND_ALL_TESTS option to use valgrind for all runs of plplot-test.sh. With this option, time make VERBOSE=1 -j4 test_c_psc >& test_c_psc.out takes 6 minutes to complete on a mediocre PC (5-yr old box with 2 real cpu's). Tested by Alan W. Irwin <ai...@us...> using the test_c_psc target on a 64-bit Linux system. The result was all examples were valgrind perfect, e.g., ==4688== HEAP SUMMARY: ==4688== in use at exit: 0 bytes in 0 blocks ==4688== total heap usage: 360 allocs, 360 frees, 122,385 bytes allocated ==4688== ==4688== All heap blocks were freed -- no leaks are possible ==4688== ==4688== For counts of detected and suppressed errors, rerun with: -v ==4688== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 4 from 4) except for x16c and x33c where valgrind showed plcolorbar memory management issues which I will now attempt to figure out. Modified Paths: -------------- trunk/examples/CMakeLists.txt Modified: trunk/examples/CMakeLists.txt =================================================================== --- trunk/examples/CMakeLists.txt 2013-10-21 22:14:00 UTC (rev 12615) +++ trunk/examples/CMakeLists.txt 2013-10-22 01:33:19 UTC (rev 12616) @@ -420,6 +420,18 @@ ${CMAKE_CURRENT_BINARY_DIR}/lena.pgm ) + find_program(VALGRIND_EXECUTABLE valgrind) + if(VALGRIND_EXECUTABLE) + option(VALGRIND_ALL_TESTS "Apply valgrind to all runs of plplot_test/plplot-test.sh" OFF) + if(VALGRIND_ALL_TESTS) + set(plplot_test_debug --debug) + else(VALGRIND_ALL_TESTS) + set(plplot_test_debug) + endif(VALGRIND_ALL_TESTS) + else(VALGRIND_EXECUTABLE) + set(plplot_test_debug) + endif(VALGRIND_EXECUTABLE) + if(CORE_BUILD) set(custom_test_script ${CMAKE_BINARY_DIR}/plplot_test/plplot-test.sh) set(custom_env EXAMPLES_DIR=${CMAKE_BINARY_DIR}/examples SRC_EXAMPLES_DIR=${CMAKE_SOURCE_DIR}/examples) @@ -492,7 +504,7 @@ add_custom_command( OUTPUT ${output_list} COMMAND ${CMAKE_COMMAND} -E echo "Generate ${language} results for psc device" - COMMAND env ${environment} ${custom_test_command} --verbose --front-end=${language} --device=psc + COMMAND env ${environment} ${custom_test_command} --verbose --front-end=${language} --device=psc ${plplot_test_debug} DEPENDS ${compare_file_depends_${language}} VERBATIM ) @@ -574,7 +586,7 @@ add_custom_command( OUTPUT ${output_list} COMMAND ${CMAKE_COMMAND} -E echo "Generate C results for ${device} file device" - COMMAND env ${custom_env} ${custom_test_command} --verbose --front-end=c --device=${device} + COMMAND env ${custom_env} ${custom_test_command} --verbose --front-end=c --device=${device} ${plplot_test_debug} DEPENDS ${file_device_depends_${device}} VERBATIM @@ -682,7 +694,7 @@ endif(ENABLE_DYNDRIVERS) add_custom_target(test_c_${device} COMMAND ${CMAKE_COMMAND} -E echo "Generate C results for ${device} interactive device" - COMMAND env ${custom_env} ${custom_test_command} --verbose --interactive --device=${device} + COMMAND env ${custom_env} ${custom_test_command} --verbose --interactive --device=${device} ${plplot_test_debug} DEPENDS ${interactive_device_depends_${device}} VERBATIM @@ -711,7 +723,7 @@ get_property(files_examples_octave GLOBAL PROPERTY FILES_examples_octave) add_custom_target(test_octave_${device} COMMAND ${CMAKE_COMMAND} -E echo "Generate interactive octave results for ${device} interactive device" - COMMAND env ${custom_env} ${custom_test_command} --verbose --interactive_octave --device=${device} + COMMAND env ${custom_env} ${custom_test_command} --verbose --interactive_octave --device=${device} ${plplot_test_debug} DEPENDS ${interactive_device_depends_${device}} ${files_examples_octave} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |