| 1 |
import lit.formats |
| 2 |
config.name = "clangIncludeCleaner Unit Tests" |
| 3 |
config.test_format = lit.formats.GoogleTest('.', 'Tests') |
| 4 |
config.test_source_root = config.clang_include_cleaner_binary_dir + "/unittests" |
| 5 |
config.test_exec_root = config.clang_include_cleaner_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 |
# It is not realistically possible to account for all options that could |
| 21 |
# possibly be present in system and user configuration files, so disable |
| 22 |
# default configs for the test runs. |
| 23 |
config.environment["CLANG_NO_DEFAULT_CONFIG"] = "1" |