From: Philippe Coval Date: Wed, 23 Nov 2016 22:27:46 +0000 (+0100) Subject: build: Valgrind script now depends on unit test executable X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1667f9bc10e8d049865f76b70b47b0da2169759b;p=contrib%2Fiotivity.git 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 --- 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)