1 #######################################################################
2 # Copyright 2016 Samsung Electronics All Rights Reserved.
4 #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
10 # http://www.apache.org/licenses/LICENSE-2.0
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
18 #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
23 # SConscript file for Local PKI google tests
24 gtest_env = SConscript('#extlibs/gtest/SConscript')
25 enrollee_test_env = gtest_env.Clone()
26 src_dir = enrollee_test_env.get('SRC_DIR')
27 target_os = enrollee_test_env.get('TARGET_OS')
29 ######################################################################
31 ######################################################################
33 enrollee_test_env.PrependUnique(CPPPATH = [
34 enrollee_test_env.get('SRC_DIR') + '/resource/c_common/ocrandom/include',
35 enrollee_test_env.get('SRC_DIR') + '/resource/csdk/stack/include/internal',
36 enrollee_test_env.get('SRC_DIR') + '/resource/csdk/connectivity/api',
37 enrollee_test_env.get('SRC_DIR') + '/resource/c_common/oic_malloc/include',
38 enrollee_test_env.get('SRC_DIR') + '/resource/include',
39 enrollee_test_env.get('SRC_DIR') + '/resource/csdk/logger/include',
40 enrollee_test_env.get('SRC_DIR') + '/resource/oc_logger/include',
41 enrollee_test_env.get('SRC_DIR') + '/resource/csdk/stack/include',
42 enrollee_test_env.get('SRC_DIR') + '/resource/csdk/stack/include/internal',
43 enrollee_test_env.get('SRC_DIR') + '/resource/csdk/logger/include',
44 enrollee_test_env.get('SRC_DIR') + '/resource/csdk/security/include',
45 enrollee_test_env.get('SRC_DIR') + '/extlibs/cjson',
46 enrollee_test_env.get('SRC_DIR') + '/extlibs/sqlite3',
47 enrollee_test_env.get('SRC_DIR') + '/service/easy-setup/inc',
48 enrollee_test_env.get('SRC_DIR') + '/service/easy-setup/enrollee/linux/wifi',
49 enrollee_test_env.get('SRC_DIR') + '/service/easy-setup/enrollee/inc',
50 enrollee_test_env.get('SRC_DIR') + '/service/easy-setup/enrollee/src'])
52 enrollee_test_env.AppendUnique(LIBPATH = [enrollee_test_env.get('BUILD_DIR')])
53 enrollee_test_env.PrependUnique(LIBS = [ 'octbstack',
55 'connectivity_abstraction',
57 if target_os not in ['windows']:
58 enrollee_test_env.AppendUnique(LIBS = ['m'])
60 if target_os != 'darwin':
61 enrollee_test_env.PrependUnique(LIBS = ['oc_logger'])
63 if enrollee_test_env.get('SECURED') == '1':
64 enrollee_test_env.AppendUnique(LIBS = ['tinydtls'])
66 if enrollee_test_env.get('LOGGING'):
67 enrollee_test_env.AppendUnique(CPPDEFINES = ['TB_LOG'])
69 if enrollee_test_env.get('ES_SOFTAP_MODE') == 'ENROLLEE_SOFTAP':
70 print "ES_SOFTAP_MODE == ENROLLEE_SOFTAP"
71 enrollee_test_env.AppendUnique(CPPDEFINES = ['ENROLLEE_SOFTAP'])
73 enrollee_test_env.PrependUnique(LIBS = ['ESEnrolleeSDK'])
75 ######################################################################
76 # Source files and Targets
77 ######################################################################
78 enrolleetests = enrollee_test_env.Program('enrolleetests', ['enrolleetests.cpp'])
80 Alias("test", [enrolleetests])
82 enrolleetests.AppendTarget('test')
83 if enrollee_test_env.get('TEST') == '1':
84 if target_os in ['linux']:
85 from tools.scons.RunTest import *
86 run_test(enrollee_test_env,
88 'service/easy-setup/enrollee/unittests/enrolleetests')