From db1ca032206047377a82bb095f9b672d5adcf0a5 Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Fri, 14 Aug 2015 23:39:07 +0200 Subject: [PATCH] build the valgrind-suppression similar to the testsuite the valgrind memcheck got more and more flooded with "possibly lost" memory blocks allocated by GLib and friends. Linking the vgsuppression binary in the same way than the testsuite helps us getting ahead of all that noise Incidentally, we need to rearrange the build dependency tree here; previously we made the testsuite depend on vgsuppression, to ensure the latter gets recompiled prior to running tests; now vgsuppression itself depends on all the test libraries, so we rather need to make it direcly a prerequisite target of running the testsuite (this approach is not precisely correct in a logical sense, yet helps us to get it recompiled when needed) --- tests/SConscript | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/SConscript b/tests/SConscript index ae83ca623..bcc471ab0 100644 --- a/tests/SConscript +++ b/tests/SConscript @@ -68,7 +68,7 @@ def testCases(env,dir): # force explicit linking against all dependencies to ensure auto-registration of # any test-class on startup, even if no code dependency is visible for the linker envSuite = env.Clone() -envSuite.Append(LINKFLAGS='-Wl,--no-as-needed') +envSuite.Append(LINKFLAGS='-Wl,--no-as-needed') # have to treat some subdirs separately. @@ -93,9 +93,8 @@ Export('testsuite') # for creating a Valgrind-Suppression file -vgsuppr = env.Program('vgsuppression',['tool/vgsuppression.c']+core_lib) ## for suppressing false valgrind alarms -tools += [vgsuppr] -Depends(testsuite,vgsuppr) +vgsuppression = envSuite.Program('vgsuppression',['tool/vgsuppression.c']+testLibs+core_lib) ## for suppressing false valgrind alarms +tools += [vgsuppression] # @@ -132,6 +131,7 @@ testDir = env.Dir('#$TARGDIR') runTest = env.File("test.sh").abspath runTests = testEnv.Command('#$TARGDIR/,testlog', testsuite, runTest, chdir=testDir) +Depends(runTests,vgsuppression)