From: g0dil Date: Mon, 7 Sep 2009 08:13:25 +0000 (+0000) Subject: Better valgrind build target X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=01df0d406a88d06d19cae136560caea5cd1ab2dc;p=senf.git Better valgrind build target git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@1391 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/.gitignore b/.gitignore index 6d39273..e77f14a 100644 --- a/.gitignore +++ b/.gitignore @@ -17,6 +17,7 @@ all_includes.hh doc/ .test.bin .test.stamp +.test-valgrind.stamp # Local files (files in this directory) /SConscript.local diff --git a/SConstruct b/SConstruct index fa07861..a5de9b2 100644 --- a/SConstruct +++ b/SConstruct @@ -25,20 +25,20 @@ env.Tool('InstallDir') env.Help(""" Additional top-level build targets: -prepare Create all target files not part of the repository -default Build all default targets (like calling scons with no arguments) -examples Build all examples -all_tests Build and run unit tests for all modules -all_docs Build documentation for all modules -all Build everything -install_all Install SENF into $$PREFIX -deb Build debian source and binary package -debsrc Build debian source package -debbin Build debian binary package -linklint Check links of doxygen documentation with 'linklint' -fixlinks Fix broken links in doxygen documentation -valgrind Run all tests under valgrind/memcheck -lcov Generate test coverage output in doc/lcov and lcov.info +prepare Create all target files not part of the repository +default Build all default targets (like calling scons with no arguments) +examples Build all examples +all_tests Build and run unit tests for all modules +all_docs Build documentation for all modules +all Build everything +install_all Install SENF into $$PREFIX +deb Build debian source and binary package +debsrc Build debian source package +debbin Build debian binary package +linklint Check links of doxygen documentation with 'linklint' +fixlinks Fix broken links in doxygen documentation +all_valgrinds Run all tests under valgrind/memcheck +lcov Generate test coverage output in doc/lcov and lcov.info """) env.Append( @@ -167,17 +167,17 @@ env.Alias('all', [ 'default', 'all_tests', 'examples', 'all_docs' ]) env.PhonyTarget('prepare', [], []) #### valgrind -env.PhonyTarget('valgrind', [ 'all_tests' ], [ """ - find -name .test.bin - | while read test; do - echo; - echo "Running $$test"; - echo; - valgrind --tool=memcheck --error-exitcode=99 --suppressions=tools/valgrind.sup - $$test $BOOSTTESTARGS; - [ $$? -ne 99 ] || exit 1; - done -""".replace("\n"," ") ]) +for test in env.FindAllBoostUnitTests(): + stamp = env.Command(test[0].dir.File('.test-valgrind.stamp'), + [ test[0].dir.File('.test.bin'), test ], + [ """valgrind --tool=memcheck + --error-exitcode=99 + --suppressions=tools/valgrind.sup + $SOURCE $BOOSTTESTARGS; + [ $$? -ne 99 ] || exit 1""".replace("\n"," "), + Touch("$TARGET") ]) + alias = env.Command(test[0].dir.File('valgrind'), stamp, [ env.NopAction() ]) + env.Alias('all_valgrinds', alias) ### lcov env.PhonyTarget('lcov', [], [ diff --git a/tools/valgrind.sup b/tools/valgrind.sup index 6cff8a0..223c0be 100644 --- a/tools/valgrind.sup +++ b/tools/valgrind.sup @@ -108,3 +108,11 @@ ioctl(SIOCGIFINDEX) obj:/lib/ld-2.3.6.so } + +{ + boost_unittest_sigaltstack + Memcheck:Param + sigaltstack(ss) + obj:/lib/ld-2.7.so + fun:_ZN5boost17execution_monitor13catch_signalsERKNS_9unit_test9callback0IiEE +}