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 malloctest_env = gtest_env.Clone()
27 target_os = malloctest_env.get('TARGET_OS')
29 ######################################################################
31 ######################################################################
32 malloctest_env.PrependUnique(CPPPATH = [
35 if target_os not in ['windows']:
36 malloctest_env.PrependUnique(LIBS = ['pthread'])
38 malloctest_env.AppendUnique(LIBPATH = [os.path.join(malloctest_env.get('BUILD_DIR'), 'resource', 'c_common')])
39 malloctest_env.PrependUnique(LIBS = ['c_common', 'gtest', 'gtest_main'])
41 if malloctest_env.get('LOGGING'):
42 malloctest_env.AppendUnique(CPPDEFINES = ['TB_LOG'])
44 ######################################################################
45 # Source files and Targets
46 ######################################################################
47 malloctests = malloctest_env.Program('malloctests', ['linux/oic_malloc_tests.cpp'])
49 Alias("test", [malloctests])
51 malloctest_env.AppendTarget('test')
52 if malloctest_env.get('TEST') == '1':
53 if target_os in ['linux']:
54 from tools.scons.RunTest import *
55 run_test(malloctest_env,
56 'resource_ccommon_malloc_test.memcheck',
57 'resource/c_common/oic_malloc/test/malloctests')