build: Fix easy-setup unittests
authorPhilippe Coval <philippe.coval@osg.samsung.com>
Wed, 30 Nov 2016 08:35:31 +0000 (09:35 +0100)
committerPhil Coval <philippe.coval@osg.samsung.com>
Wed, 7 Dec 2016 21:24:13 +0000 (21:24 +0000)
Need to add a parameter to enable valgrind check

Without this change, a race condition may occur and complain like:
service/easy-setup/enrollee/unittests/easysetup_enrollee_test: not found

Bug: https://jira.iotivity.org/browse/IOT-1526
Change-Id: If927c9a2f6e00b18ab92664f014f4f85f34209aa
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/14957
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
(cherry picked from commit 47f52b3977fd9c78f549abc0683e8fadc840cac0)
Reviewed-on: https://gerrit.iotivity.org/gerrit/15219
Reviewed-by: George Nash <george.nash@intel.com>
service/easy-setup/enrollee/unittests/SConscript

index d7ff5fe..7d6266c 100644 (file)
@@ -22,6 +22,7 @@
 # Notification Unit Test build script
 ##
 
+from tools.scons.RunTest import run_test;
 Import('env')
 
 if env.get('RELEASE'):
@@ -89,6 +90,7 @@ Alias("easysetup_enrollee_test", easysetup_enrollee_test)
 env.AppendTarget('easysetup_enrollee_test')
 
 if env.get('TEST') == '1':
-    if target_os == 'linux':
-            from tools.scons.RunTest import *
-            run_test(easysetup_enrollee_test_env, '', 'service/easy-setup/enrollee/unittests/easysetup_enrollee_test')
+    if target_os in ['linux']:
+        run_test(easysetup_enrollee_test_env,
+                 'service_easy-setup_enrollee_unittests_easysetup_enrollee_test.memcheck',
+                 'service/easy-setup/enrollee/unittests/easysetup_enrollee_test')