1 #******************************************************************
3 # Copyright 2016 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 #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
22 from tools.scons.RunTest import *
26 c_common_windows_test_env = test_env.Clone()
28 ######################################################################
30 ######################################################################
31 c_common_windows_test_env.PrependUnique(CPPPATH = ['../include'])
33 c_common_windows_test_env.AppendUnique(LIBPATH = [os.path.join(c_common_windows_test_env.get('BUILD_DIR'), 'resource', 'c_common')])
34 c_common_windows_test_env.PrependUnique(LIBS = ['win_helper'])
36 if c_common_windows_test_env.get('LOGGING'):
37 c_common_windows_test_env.AppendUnique(CPPDEFINES = ['TB_LOG'])
39 ######################################################################
40 # Source files and Targets
41 ######################################################################
42 c_common_windows_tests = c_common_windows_test_env.Program('c_common_windows_tests', ['snprintf_test.cpp'])
44 Alias("test", [c_common_windows_tests])
46 c_common_windows_test_env.AppendTarget('test')
48 if c_common_windows_test_env.get('TEST') == '1':
49 run_test(c_common_windows_test_env,
50 'resource_c_common_windows_test.memcheck',
51 'resource/c_common/windows/test/c_common_windows_tests')