From: doil.kwon Date: Mon, 3 Aug 2015 11:25:52 +0000 (+0900) Subject: [Resource Encapsulation]Add UnitTest Execute Option(TEST) into the SConscript. X-Git-Tag: 1.2.0+RC1~1281 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d75aa6ecf0d6b8d8988cdaa7aafb905b3512b6eb;p=platform%2Fupstream%2Fiotivity.git [Resource Encapsulation]Add UnitTest Execute Option(TEST) into the SConscript. Change-Id: Iffc6c67391af5b8a0fd9e34334543e4cefafdbcc Signed-off-by: doil.kwon Reviewed-on: https://gerrit.iotivity.org/gerrit/2065 Tested-by: jenkins-iotivity Reviewed-by: Madan Lanka --- diff --git a/service/resource-encapsulation/src/resourceBroker/unittest/SConscript b/service/resource-encapsulation/src/resourceBroker/unittest/SConscript index c63eaea..d1371d8 100644 --- a/service/resource-encapsulation/src/resourceBroker/unittest/SConscript +++ b/service/resource-encapsulation/src/resourceBroker/unittest/SConscript @@ -61,7 +61,7 @@ broker_test_env.AppendUnique(CPPPATH = ['../../common/utils/include']) broker_test_env.PrependUnique(CPPPATH = [env.get('SRC_DIR')+'/extlibs/hippomocks-master', gtest_dir + '/include']) broker_test_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')]) -broker_test_env.PrependUnique(LIBS = ['rcs_client','rcs_common', 'oc', 'octbstack', 'oc_logger', 'connectivity_abstraction', 'libcoap', gtest, gtest_main]) +broker_test_env.PrependUnique(LIBS = ['rcs_client','rcs_common', 'oc', 'octbstack', 'oc_logger', 'connectivity_abstraction', 'coap', gtest, gtest_main]) if target_os not in ['windows', 'winrt']: broker_test_env.AppendUnique(CXXFLAGS = ['-O2', '-g', '-Wall', '-fmessage-length=0', '-std=c++0x']) @@ -78,4 +78,10 @@ broker_test = broker_test_env.Program('broker_test', broker_test_src) Alias("broker_test", broker_test) env.AppendTarget('broker_test') - +if env.get('TEST') == '1': + target_os = env.get('TARGET_OS') + if target_os == 'linux': + from tools.scons.RunTest import * + run_test(broker_test_env, + '', + 'service/resource-encapsulation/src/resourceBroker/unittest/broker_test')