projects
/
platform
/
upstream
/
iotivity.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[IOT-2011] linker changes for oc_logger
[platform/upstream/iotivity.git]
/
resource
/
csdk
/
security
/
unittest
/
SConscript
diff --git
a/resource/csdk/security/unittest/SConscript
b/resource/csdk/security/unittest/SConscript
index
fd67ede
..
8782e86
100644
(file)
--- a/
resource/csdk/security/unittest/SConscript
+++ b/
resource/csdk/security/unittest/SConscript
@@
-20,10
+20,12
@@
import os
import os.path
import os
import os.path
+from tools.scons.RunTest import *
+
+Import('test_env')
# SConscript file for Local PKI google tests
# SConscript file for Local PKI google tests
-gtest_env = SConscript('#extlibs/gtest/SConscript')
-srmtest_env = gtest_env.Clone()
+srmtest_env = test_env.Clone()
src_dir = srmtest_env.get('SRC_DIR')
target_os = srmtest_env.get('TARGET_OS')
rd_mode = srmtest_env.get('RD_MODE')
src_dir = srmtest_env.get('SRC_DIR')
target_os = srmtest_env.get('TARGET_OS')
rd_mode = srmtest_env.get('RD_MODE')
@@
-47,42
+49,36
@@
srmtest_env.PrependUnique(CPPPATH = [
'../../connectivity/external/inc',
'../include/internal',
'../../logger/include',
'../../connectivity/external/inc',
'../include/internal',
'../../logger/include',
+ '../../include',
'../../stack/include',
'../../stack/include/internal',
'../../../oc_logger/include',
'../../stack/include',
'../../stack/include/internal',
'../../../oc_logger/include',
- '../../../../extlibs/cjson/',
'../provisioning/include',
'../include'
])
'../provisioning/include',
'../include'
])
-srmtest_env.AppendUnique(LIBPATH = [srmtest_env.get('BUILD_DIR')])
srmtest_env.PrependUnique(LIBS = ['ocsrm',
'octbstack_test',
srmtest_env.PrependUnique(LIBS = ['ocsrm',
'octbstack_test',
- 'oc_logger',
+ 'oc_logger
_internal
',
'connectivity_abstraction',
'coap'])
if srmtest_env.get('SECURED') == '1':
srmtest_env.AppendUnique(LIBS = ['mbedtls','mbedx509','mbedcrypto'])
'connectivity_abstraction',
'coap'])
if srmtest_env.get('SECURED') == '1':
srmtest_env.AppendUnique(LIBS = ['mbedtls','mbedx509','mbedcrypto'])
- srmtest_env.AppendUnique(LIBS = ['tinydtls'])
if srmtest_env.get('LOGGING') == '1':
srmtest_env.AppendUnique(CPPDEFINES = ['TB_LOG'])
if srmtest_env.get('MULTIPLE_OWNER') == '1':
if srmtest_env.get('LOGGING') == '1':
srmtest_env.AppendUnique(CPPDEFINES = ['TB_LOG'])
if srmtest_env.get('MULTIPLE_OWNER') == '1':
- srmtest_env.AppendUnique(CPPDEFINES=['
_ENABLE_MULTIPLE_OWNER_
'])
+ srmtest_env.AppendUnique(CPPDEFINES=['
MULTIPLE_OWNER
'])
if target_os == 'windows':
if target_os == 'windows':
- srmtest_env.AppendUnique(LINKFLAGS = ['/subsystem:CONSOLE'])
- srmtest_env.AppendUnique(LIBS = ['advapi32', 'bcrypt', 'kernel32', 'ws2_32', 'iphlpapi', 'octbstack_static'])
+ srmtest_env.AppendUnique(LIBS = ['octbstack_static', 'sqlite3'])
else:
# TODO: Implement feature check.
srmtest_env.AppendUnique(CPPDEFINES = ['HAVE_LOCALTIME_R'])
srmtest_env.AppendUnique(LIBS = ['octbstack'])
else:
# TODO: Implement feature check.
srmtest_env.AppendUnique(CPPDEFINES = ['HAVE_LOCALTIME_R'])
srmtest_env.AppendUnique(LIBS = ['octbstack'])
-if 'CLIENT' in rd_mode or 'SERVER' in rd_mode:
- srmtest_env.PrependUnique(LIBS = ['resource_directory'])
-
######################################################################
# Source files and Targets
######################################################################
######################################################################
# Source files and Targets
######################################################################
@@
-96,7
+92,7
@@
unittest = srmtest_env.Program('unittest', ['aclresourcetest.cpp',
'srmutility.cpp',
'iotvticalendartest.cpp',
'base64tests.cpp',
'srmutility.cpp',
'iotvticalendartest.cpp',
'base64tests.cpp',
- '
svcresourcetest
.cpp',
+ '
pbkdf2tests
.cpp',
'srmtestcommon.cpp',
'directpairingtest.cpp',
'crlresourcetest.cpp'])
'srmtestcommon.cpp',
'directpairingtest.cpp',
'crlresourcetest.cpp'])
@@
-104,9
+100,10
@@
unittest = srmtest_env.Program('unittest', ['aclresourcetest.cpp',
Alias("test", [unittest])
unittest_src_dir = os.path.join(src_dir, 'resource', 'csdk', 'security', 'unittest') + os.sep
Alias("test", [unittest])
unittest_src_dir = os.path.join(src_dir, 'resource', 'csdk', 'security', 'unittest') + os.sep
-unittest_build_dir = os.path.join(srmtest_env.get('BUILD_DIR'), 'resource', 'csdk', 'security', 'unittest') + os.sep
+unittest_build_dir = os.path.join(srmtest_env.get('BUILD_DIR'), 'resource', 'csdk', 'security', 'unittest')
+unittest_build_dir = os.path.normpath(unittest_build_dir) + os.sep
-srmtest_env.AppendUnique(CPPDEFINES = ['SECURITY_BUILD_UNITTEST_DIR='+unittest_build_dir.encode('string_escape')])
+srmtest_env.AppendUnique(CPPDEFINES = ['SECURITY_BUILD_UNITTEST_DIR='+unittest_build_dir.encode('string_escape')
.replace("\\", "\\\\")
])
srmtest_env.Alias("install", srmtest_env.Install( unittest_build_dir,
unittest_src_dir + 'oic_unittest.json'))
srmtest_env.Alias("install", srmtest_env.Install( unittest_build_dir,
unittest_src_dir + 'oic_unittest.json'))
@@
-127,7
+124,7
@@
srmtest_env.Alias("install", srmtest_env.Install( unittest_build_dir,
unittest_src_dir + 'oic_svr_db_prov.dat'))
srmtest_env.Alias("install", srmtest_env.Install( unittest_build_dir,
unittest_src_dir + 'oic_svr_db.dat'))
unittest_src_dir + 'oic_svr_db_prov.dat'))
srmtest_env.Alias("install", srmtest_env.Install( unittest_build_dir,
unittest_src_dir + 'oic_svr_db.dat'))
-
+
srmtest_env.AppendTarget('test')
if srmtest_env.get('TEST') == '1':
if target_os in ['linux', 'windows']:
srmtest_env.AppendTarget('test')
if srmtest_env.get('TEST') == '1':
if target_os in ['linux', 'windows']:
@@
-137,5
+134,4
@@
if srmtest_env.get('TEST') == '1':
os.makedirs(result_dir)
srmtest_env.AppendENVPath('GTEST_OUTPUT', ['xml:'+ result_dir])
srmtest_env.AppendENVPath('LD_LIBRARY_PATH', [out_dir])
os.makedirs(result_dir)
srmtest_env.AppendENVPath('GTEST_OUTPUT', ['xml:'+ result_dir])
srmtest_env.AppendENVPath('LD_LIBRARY_PATH', [out_dir])
- from tools.scons.RunTest import *
run_test(srmtest_env,'ut','resource/csdk/security/unittest/unittest')
run_test(srmtest_env,'ut','resource/csdk/security/unittest/unittest')