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 stringtest_env = env.Clone()
25 src_dir = stringtest_env.get('SRC_DIR')
27 ######################################################################
29 ######################################################################
30 stringtest_env.PrependUnique(CPPPATH = [
32 '#extlibs/gtest/gtest-1.7.0/include' ])
34 stringtest_env.AppendUnique(LIBPATH = [os.path.join(env.get('BUILD_DIR'), 'resource/c_common')])
35 stringtest_env.AppendUnique(LIBPATH = [src_dir + '/extlibs/gtest/gtest-1.7.0/lib/.libs'])
36 stringtest_env.PrependUnique(LIBS = ['c_common', 'gtest', 'gtest_main', 'pthread'])
38 if env.get('LOGGING'):
39 stringtest_env.AppendUnique(CPPDEFINES = ['TB_LOG'])
41 ######################################################################
42 # Source files and Targets
43 ######################################################################
44 stringtests = stringtest_env.Program('stringtests', ['linux/oic_string_tests.cpp'])
46 Alias("test", [stringtests])
48 env.AppendTarget('test')
49 if env.get('TEST') == '1':
50 target_os = env.get('TARGET_OS')
51 if target_os == 'linux':
52 from tools.scons.RunTest import *
53 run_test(stringtest_env,
54 'resource_ccommon_string_test.memcheck',
55 'resource/c_common/oic_string/test/stringtests')