1 #******************************************************************
3 # Copyright 2014 Intel Mobile Communications GmbH All Rights Reserved.
5 #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
7 # Licensed under the Apache License, Version 2.0 (the "License");
8 # you may not use this file except in compliance with the License.
9 # You may obtain a copy of the License at
11 # http://www.apache.org/licenses/LICENSE-2.0
13 # Unless required by applicable law or agreed to in writing, software
14 # distributed under the License is distributed on an "AS IS" BASIS,
15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 # See the License for the specific language governing permissions and
17 # limitations under the License.
19 #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
24 # SConscript file for Local PKI google tests
25 gtest_env = SConscript('#extlibs/gtest/SConscript')
26 randomtest_env = gtest_env.Clone()
27 target_os = randomtest_env.get('TARGET_OS')
29 ######################################################################
31 ######################################################################
32 randomtest_env.PrependUnique(CPPPATH = [
34 '../../logger/include',
35 '../../../oc_logger/include',
38 randomtest_env.AppendUnique(LIBPATH = [randomtest_env.get('BUILD_DIR')])
39 randomtest_env.PrependUnique(LIBS = ['octbstack',
42 if target_os in ['linux']:
43 randomtest_env.AppendUnique(LIBS = ['m'])
45 if randomtest_env.get('SECURED') == '1':
46 if randomtest_env.get('WITH_TCP') == True:
47 randomtest_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509','mbedcrypto'])
49 if randomtest_env.get('LOGGING'):
50 randomtest_env.AppendUnique(CPPDEFINES = ['TB_LOG'])
52 ######################################################################
53 # Source files and Targets
54 ######################################################################
55 randomtests = randomtest_env.Program('randomtests', ['linux/randomtest.cpp'])
57 Alias("test", [randomtests])
59 randomtest_env.AppendTarget('test')
60 if randomtest_env.get('TEST') == '1':
61 if target_os in ['linux']:
62 from tools.scons.RunTest import *
63 run_test(randomtest_env,
64 'resource_csdk_random_test.memcheck',
65 'resource/c_common/ocrandom/test/randomtests')