print ("*********** Unit test Start *************")
build_options = {
'RELEASE':'false',
+ 'LOGGING':'true'
}
extra_option_str = "resource -c"
call_scons(build_options, extra_option_str)
build_options = {
- 'LOGGING':'false',
+ 'LOGGING':'true',
'RELEASE':'false',
}
extra_option_str = "resource"
build_options = {
'TEST':1,
'RELEASE':'false',
+ 'LOGGING':'true',
}
call_scons(build_options, extra_option_str)
build_options = {
'TEST':1,
'SECURED':1,
'RELEASE':'false',
+ 'LOGGING':'true',
}
call_scons(build_options, extra_option_str)
# Use the generated file internally
env.AppendUnique(CPPPATH = [os.path.join(src_dir, 'resource', 'c_common')])
+if not env.get('RELEASE'):
+ env.PrependUnique(LIBS = ['gcov'])
+ env.AppendUnique(CCFLAGS = ['--coverage'])
+
######################################################################
######################################################################
liboctbstack_src.append(OCTBSTACK_SRC + 'oickeepalive.c')
liboctbstack_env.UserInstallTargetHeader('stack/include/oickeepalive.h', 'resource', 'oickeepalive.h')
+if not env.get('RELEASE'):
+ liboctbstack_env.PrependUnique(LIBS = ['gcov'])
+ liboctbstack_env.AppendUnique(CCFLAGS = ['--coverage'])
+
if 'SERVER' in rd_mode:
liboctbstack_src.append(OCTBSTACK_SRC + 'oicresourcedirectory.c')
if target_os not in ['tizen']:
if ca_os in ['darwin','ios']:
env.AppendUnique(CPPDEFINES = ['_DARWIN_C_SOURCE'])
+if not env.get('RELEASE'):
+ env.PrependUnique(LIBS = ['gcov'])
+ env.AppendUnique(CCFLAGS = ['--coverage'])
+
# Getting common source files
env.SConscript(os.path.join(root_dir, 'common', 'SConscript'))
if env.get('OIC_SUPPORT_TIZEN_TRACE') == 'True':
env.AppendUnique(CPPDEFINES = ['OIC_SUPPORT_TIZEN_TRACE'])
+if not env.get('RELEASE'):
+ env.PrependUnique(LIBS = ['gcov'])
+ env.AppendUnique(CCFLAGS = ['--coverage'])
+
env.PrependUnique(LIBS = ['logger'])
local_env = env.Clone()
oclib_env.AppendUnique(LIBS = ['oc_logger'])
oclib_env.PrependUnique(LIBS = ['octbstack', 'connectivity_abstraction', 'ocsrm'])
+if not oclib_env.get('RELEASE'):
+ oclib_env.PrependUnique(LIBS = ['gcov'])
+ oclib_env.AppendUnique(CCFLAGS = ['--coverage'])
+
if 'g++' in oclib_env.get('CXX'):
oclib_env.AppendUnique(CXXFLAGS = ['-std=c++0x'])
oclib_env.AppendUnique(CXXFLAGS = ['-Wall'])
tests_list=(
"${IOTIVITY_BASE}/out/${IOTIVITY_TARGET_OS}/${IOTIVITY_TARGET_ARCH}/debug/resource/csdk/connectivity/test/catests"
+ "${IOTIVITY_BASE}/out/${IOTIVITY_TARGET_OS}/${IOTIVITY_TARGET_ARCH}/debug/resource/csdk/stack/test/stacktests"
+ "${IOTIVITY_BASE}/out/${IOTIVITY_TARGET_OS}/${IOTIVITY_TARGET_ARCH}/debug/resource/csdk/stack/test/cbortests"
+ "${IOTIVITY_BASE}/out/${IOTIVITY_TARGET_OS}/${IOTIVITY_TARGET_ARCH}/debug/resource/unittests/unittests"
+ "${IOTIVITY_BASE}/out/${IOTIVITY_TARGET_OS}/${IOTIVITY_TARGET_ARCH}/debug/resource/c_common/ocrandom/test/randomtests"
+ "${IOTIVITY_BASE}/out/${IOTIVITY_TARGET_OS}/${IOTIVITY_TARGET_ARCH}/debug/resource/c_common/oic_malloc/test/malloctests"
+ "${IOTIVITY_BASE}/out/${IOTIVITY_TARGET_OS}/${IOTIVITY_TARGET_ARCH}/debug/resource/c_common/oic_string/test/stringtests"
+ "${IOTIVITY_BASE}/out/${IOTIVITY_TARGET_OS}/${IOTIVITY_TARGET_ARCH}/debug/resource/c_common/oic_time/test/timetests"
);
for exe in ${tests_list[@]}; do
tests_list=(
"${IOTIVITY_BASE}/out/${IOTIVITY_TARGET_OS}/${IOTIVITY_TARGET_ARCH}/debug/service/resource-encapsulation/src/serverBuilder/rcs_server_test"
- "${IOTIVITY_BASE}/out/${IOTIVITY_TARGET_OS}/${IOTIVITY_TARGET_ARCH}/debug/service/resource-encapsulation/unittests/rcs_client_test"
- "${IOTIVITY_BASE}/out/${IOTIVITY_TARGET_OS}/${IOTIVITY_TARGET_ARCH}/debug/service/resource-encapsulation/src/common/primitiveResource/unittests/rcs_common_test"
+ "${IOTIVITY_BASE}/out/${IOTIVITY_TARGET_OS}/${IOTIVITY_TARGET_ARCH}/debug/service/resource-encapsulation/src/common/rcs_common_test"
"${IOTIVITY_BASE}/out/${IOTIVITY_TARGET_OS}/${IOTIVITY_TARGET_ARCH}/debug/service/resource-encapsulation/src/resourceCache/unittests/cache_test"
"${IOTIVITY_BASE}/out/${IOTIVITY_TARGET_OS}/${IOTIVITY_TARGET_ARCH}/debug/service/resource-encapsulation/src/resourceBroker/unittest/broker_test"
);