clang-tools 10.0.0

unittests/lit.cfg.py
Go to the documentation of this file.
1 import lit.formats
2 config.name = "Clangd Unit Tests"
3 config.test_format = lit.formats.GoogleTest('.', 'Tests')
4 config.test_source_root = config.clangd_binary_dir + "/unittests"
5 config.test_exec_root = config.clangd_binary_dir + "/unittests"
6
7 # Point the dynamic loader at dynamic libraries in 'lib'.
8 # FIXME: it seems every project has a copy of this logic. Move it somewhere.
9 import platform
10 if platform.system() == 'Darwin':
11 shlibpath_var = 'DYLD_LIBRARY_PATH'
12 elif platform.system() == 'Windows':
13 shlibpath_var = 'PATH'
14 else:
15 shlibpath_var = 'LD_LIBRARY_PATH'
16 config.environment[shlibpath_var] = os.path.pathsep.join((
17 "@SHLIBDIR@", "@LLVM_LIBS_DIR@",
18 config.environment.get(shlibpath_var,'')))
19
20
21