From 1667f9bc10e8d049865f76b70b47b0da2169759b Mon Sep 17 00:00:00 2001 From: Philippe Coval Date: Wed, 23 Nov 2016 23:27:46 +0100 Subject: [PATCH] build: Valgrind script now depends on unit test executable This prevents Sporadic Valgrind Failures, caused by race conditions Common error message is like: out/linux/x86_64/debug/resource/unittests/unittests: Permission denied Bug: https://jira.iotivity.org/browse/IOT-1526 Change-Id: I49bfb21ee7cd934b965e132cb150d59c047ef383 Signed-off-by: Philippe Coval Reviewed-on: https://gerrit.iotivity.org/gerrit/14705 Tested-by: jenkins-iotivity Reviewed-by: Kevin Kane Reviewed-by: Nivedita Singhvi Reviewed-by: Ziran Sun --- tools/scons/RunTest.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/scons/RunTest.py b/tools/scons/RunTest.py index d10a177..91375e6 100644 --- a/tools/scons/RunTest.py +++ b/tools/scons/RunTest.py @@ -63,5 +63,6 @@ def run_test(env, xml_file, test): # Set up to run the test under Valgrind. test_cmd = '%s valgrind --leak-check=full --suppressions=%s --xml=yes --xml-file=%s %s' % (valgrind_environment, suppression_file, xml_file, test_cmd) + env.Depends('ut' + test , os.path.join(build_dir, test)) ut = env.Command('ut' + test, None, test_cmd) env.AlwaysBuild('ut' + test) -- 2.7.4