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 <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/14705
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Kevin Kane <kkane@microsoft.com>
Reviewed-by: Nivedita Singhvi <niveditasinghvi@gmail.com>
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
# 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)