X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=SConstruct;h=a5de9b2d731e7128641f21ab4a88fde7eb4d4b33;hb=01df0d406a88d06d19cae136560caea5cd1ab2dc;hp=fa07861321f8a0f70760aed86ed675748c441065;hpb=4f878fb70e70b724b615b957ec55e3d853c3a61b;p=senf.git 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', [], [