build: use tools.scons.RunTest for csdk security tests
authorPhilippe Coval <philippe.coval@osg.samsung.com>
Tue, 29 Nov 2016 14:35:03 +0000 (15:35 +0100)
committerPhil Coval <philippe.coval@osg.samsung.com>
Tue, 6 Dec 2016 08:20:40 +0000 (08:20 +0000)
To avoid race conditions.

Bug: https://jira.iotivity.org/browse/IOT-1526
Change-Id: I1c525d58b7c220dd8043b65bf873e0d1d294a020
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/14915
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
Reviewed-by: George Nash <george.nash@intel.com>
(cherry picked from commit 162ce85af58df04c539b33e63a33d672eeb5317e)
Reviewed-on: https://gerrit.iotivity.org/gerrit/15103

resource/csdk/security/provisioning/unittest/SConscript

index 2e02697..bebe7c4 100644 (file)
@@ -20,6 +20,7 @@
 
 import os
 import os.path
+from tools.scons.RunTest import run_test
 
 # SConscript file for Local PKI google tests
 gtest_env = SConscript('#extlibs/gtest/SConscript')
@@ -123,5 +124,6 @@ if sptest_env.get('TEST') == '1':
                sptest_env.AppendENVPath('GTEST_OUTPUT', ['xml:'+ result_dir])
                sptest_env.AppendENVPath('LD_LIBRARY_PATH', [out_dir])
                sptest_env.AppendENVPath('PATH', sptest_env.get('BUILD_DIR'))
-               ut = sptest_env.Command ('ut', None, out_dir + '/resource/csdk/security/provisioning/unittest/unittest')
-               AlwaysBuild ('ut')
+               run_test(sptest_env,
+                                'resource_csdk_security_provisioning_unittest.memcheck',
+                                'resource/csdk/security/provisioning/unittest/unittest')