From d93834b1ece4db4a322d4b9cb4861b4ca6ba74ae Mon Sep 17 00:00:00 2001 From: "hyuna0213.jo" Date: Thu, 21 Apr 2016 09:42:11 +0900 Subject: [PATCH] fixed build script to test ca api. currently, blockwise transfer can be supported for ip. so blockwise transfer unit test has to be included only in case target transport type is ip or all. Change-Id: I7501847cbf7f1035d287ba6770838faea122eeca Signed-off-by: hyuna0213.jo Reviewed-on: https://gerrit.iotivity.org/gerrit/7863 Tested-by: jenkins-iotivity Reviewed-by: Jon A. Cruz --- resource/csdk/connectivity/test/SConscript | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/resource/csdk/connectivity/test/SConscript b/resource/csdk/connectivity/test/SConscript index efa854c..688a04f 100644 --- a/resource/csdk/connectivity/test/SConscript +++ b/resource/csdk/connectivity/test/SConscript @@ -67,19 +67,31 @@ if env.get('LOGGING'): ###################################################################### # Source files and Targets ###################################################################### -catests = catest_env.Program('catests', ['catests.cpp', - 'caprotocolmessagetest.cpp', - 'cablocktransfertest.cpp', - 'ca_api_unittest.cpp', - 'camutex_tests.cpp', - 'uarraylist_test.cpp' - ]) + +target_os = env.get('TARGET_OS') +target_transport = env.get('TARGET_TRANSPORT') + +if (('IP' in target_transport) or ('ALL' in target_transport)): + if target_os != 'arduino': + catests = catest_env.Program('catests', ['catests.cpp', + 'caprotocolmessagetest.cpp', + 'cablocktransfertest.cpp', + 'ca_api_unittest.cpp', + 'camutex_tests.cpp', + 'uarraylist_test.cpp' + ]) +else: + catests = catest_env.Program('catests', ['catests.cpp', + 'caprotocolmessagetest.cpp', + 'ca_api_unittest.cpp', + 'camutex_tests.cpp', + 'uarraylist_test.cpp' + ]) Alias("test", [catests]) env.AppendTarget('test') if env.get('TEST') == '1': - target_os = env.get('TARGET_OS') if target_os == 'linux': from tools.scons.RunTest import * run_test(catest_env, -- 2.7.4