#
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-Import('env')
import os
+import os.path
-stringtest_env = env.Clone()
-src_dir = stringtest_env.get('SRC_DIR')
+# SConscript file for Local PKI google tests
+gtest_env = SConscript('#extlibs/gtest/SConscript')
+stringtest_env = gtest_env.Clone()
+target_os = stringtest_env.get('TARGET_OS')
######################################################################
# Build flags
######################################################################
-stringtest_env.PrependUnique(CPPPATH = [
- '../include',
- '#extlibs/gtest/gtest-1.7.0/include' ])
+stringtest_env.PrependUnique(CPPPATH = ['../include'])
-stringtest_env.AppendUnique(LIBPATH = [os.path.join(env.get('BUILD_DIR'), 'resource/c_common')])
-stringtest_env.AppendUnique(LIBPATH = [src_dir + '/extlibs/gtest/gtest-1.7.0/lib/.libs'])
-stringtest_env.PrependUnique(LIBS = ['c_common', 'gtest', 'gtest_main', 'pthread'])
-
-if env.get('LOGGING'):
- stringtest_env.AppendUnique(CPPDEFINES = ['TB_LOG'])
+stringtest_env.AppendUnique(LIBPATH = [os.path.join(stringtest_env.get('BUILD_DIR'), 'resource', 'c_common')])
+stringtest_env.PrependUnique(LIBS = ['c_common'])
+if target_os not in ['windows']:
+ stringtest_env.PrependUnique(LIBS = ['pthread'])
+stringtest_env.PrependUnique(LIBS = ['gtest', 'gtest_main'])
+if stringtest_env.get('LOGGING'):
+ stringtest_env.AppendUnique(CPPDEFINES = ['TB_LOG'])
#
######################################################################
# Source files and Targets
Alias("test", [stringtests])
-env.AppendTarget('test')
-if env.get('TEST') == '1':
- target_os = env.get('TARGET_OS')
- if target_os == 'linux':
+stringtest_env.AppendTarget('test')
+if stringtest_env.get('TEST') == '1':
+ if target_os in ['linux']:
from tools.scons.RunTest import *
run_test(stringtest_env,
'resource_ccommon_string_test.memcheck',