1 #******************************************************************
3 # Copyright 2017 Microsoft
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 #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
23 from tools.scons.RunTest import *
27 eventtests_env = test_env.Clone()
28 target_os = eventtests_env.get('TARGET_OS')
30 ######################################################################
32 ######################################################################
33 eventtests_env.PrependUnique(CPPPATH=['#resource/c_common/ocevent/include'])
35 eventtests_env.AppendUnique(LIBPATH=[eventtests_env.get('BUILD_DIR')])
36 eventtests_env.Append(LIBS=['logger'])
38 if eventtests_env.get('LOGGING'):
39 eventtests_env.AppendUnique(CPPDEFINES=['TB_LOG'])
41 ######################################################################
42 # Source files and Targets
43 ######################################################################
44 eventtests = eventtests_env.Program('eventtests', ['eventtest.cpp'])
46 Alias("test", [eventtests])
48 eventtests_env.AppendTarget('test')
49 if eventtests_env.get('TEST') == '1':
50 if target_os in ['linux', 'windows']:
51 run_test(eventtests_env,
52 'resource_c_common_event_test.memcheck',
53 'resource/c_common/ocevent/test/eventtests')