-env.AppendTarget('test')
-if env.get('TEST') == '1':
- target_os = env.get('TARGET_OS')
- if target_os == 'linux':
- out_dir = env.get('BUILD_DIR')
- result_dir = env.get('BUILD_DIR') + '/test_out/'
- if not os.path.isdir(result_dir):
- os.makedirs(result_dir)
- catest_env.AppendENVPath('GTEST_OUTPUT', ['xml:'+ result_dir])
- catest_env.AppendENVPath('LD_LIBRARY_PATH', [out_dir])
- catest_env.AppendENVPath('LD_LIBRARY_PATH', ['./extlibs/gtest/gtest-1.7.0/lib/.libs'])
- ut = catest_env.Command ('ut', None, 'valgrind -q --leak-check=full --xml=yes --xml-file=resource_csdk_connectivity_test.memcheck ' + out_dir + 'resource/csdk/connectivity/test/catests')
- AlwaysBuild ('ut')
+catest_env.AppendTarget('test')
+if catest_env.get('TEST') == '1':
+ if target_os in ['linux', 'windows']:
+ catest_env.AppendENVPath('PATH', catest_env.get('BUILD_DIR'))
+ from tools.scons.RunTest import *
+ run_test(catest_env,
+ 'resource_csdk_connectivity_test.memcheck',
+ 'resource/csdk/connectivity/test/catests')