Merge "Merge remote-tracking branch 'origin/notification-service' Updated with static...
[platform/upstream/iotivity.git] / service / notification / unittest / SConscript
index 3c77952..8c26e4d 100644 (file)
@@ -59,12 +59,19 @@ notification_test_env.AppendUnique(LIBS = [
 if target_os not in ['windows', 'winrt']:
     notification_test_env.AppendUnique(CXXFLAGS = ['-O2', '-g', '-Wall', '-fmessage-length=0', '-std=c++0x'])
 
+notification_test_env.AppendUnique(LINKFLAGS = ['-Wl,--no-as-needed'])
+
 notification_test_env.AppendUnique(CXXFLAGS = ['-pthread'])
 notification_test_env.AppendUnique(LIBS = ['pthread'])
 
 notification_test_env.PrependUnique(CPPPATH = [ src_dir + '/extlibs/hippomocks-master', gtest_dir + '/include'])
 notification_test_env.AppendUnique(CPPPATH = ['../include'])
 
+if env.get('WITH_TCP') == True:
+       notification_test_env.AppendUnique(CPPDEFINES = ['WITH_TCP'])
+       if env.get('SECURED') == '1':
+               notification_test_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509', 'mbedcrypto'])
+
 ######################################################################
 # Build Test
 ######################################################################
@@ -88,5 +95,5 @@ env.AppendTarget('notification_provider_test')
 if env.get('TEST') == '1':
     if target_os == 'linux':
             from tools.scons.RunTest import *
-            run_test(notification_consumer_test_env, '', 'service/notification/unittest/notification_consumer_test')
-            run_test(notification_provider_test_env, '', 'service/notification/unittest/notification_provider_test')
\ No newline at end of file
+            #run_test(notification_consumer_test_env, '', 'service/notification/unittest/notification_consumer_test')
+            run_test(notification_provider_test_env, '', 'service/notification/unittest/notification_provider_test')