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 randomtest_env = env.Clone()
26 src_dir = randomtest_env.get('SRC_DIR')
28 ######################################################################
30 ######################################################################
31 randomtest_env.PrependUnique(CPPPATH = [
33 '../../logger/include',
34 '../../../oc_logger/include',
35 '../../../../extlibs/gtest/gtest-1.7.0/include'
38 randomtest_env.AppendUnique(CXXFLAGS = ['-std=c++0x', '-Wall', '-pthread'])
39 randomtest_env.AppendUnique(LIBS = ['-lpthread'])
40 randomtest_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
41 randomtest_env.AppendUnique(LIBPATH = [src_dir + '/extlibs/gtest/gtest-1.7.0/lib/.libs'])
42 randomtest_env.PrependUnique(LIBS = ['m',
49 if 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 env.AppendTarget('test')
60 if env.get('TEST') == '1':
61 target_os = env.get('TARGET_OS')
62 if target_os == 'linux':
63 from tools.scons.RunTest import *
64 run_test(randomtest_env,
65 'resource_csdk_random_test.memcheck',
66 'resource/csdk/ocrandom/test/randomtests')