[Flang][Parser] Add missing #include "flang/Common/idioms.h" (#77484)
[llvm-project.git] / clang-tools-extra / test / Unit / lit.cfg.py
blobb7376a02c89e19352502c928829a2079fbadff9a
1 # -*- Python -*-
3 import platform
5 import lit.formats
7 config.name = "Extra Tools Unit Tests"
8 config.suffixes = [] # Seems not to matter for google tests?
10 # Test Source and Exec root dirs both point to the same directory where google
11 # test binaries are built.
13 config.test_source_root = config.extra_tools_obj_dir
14 config.test_exec_root = config.test_source_root
16 # All GoogleTests are named to have 'Tests' as their suffix. The '.' option is
17 # a special value for GoogleTest indicating that it should look through the
18 # entire testsuite recursively for tests (alternatively, one could provide a
19 # ;-separated list of subdirectories).
20 config.test_format = lit.formats.GoogleTest(".", "Tests")
22 if platform.system() == "Darwin":
23 shlibpath_var = "DYLD_LIBRARY_PATH"
24 elif platform.system() == "Windows":
25 shlibpath_var = "PATH"
26 else:
27 shlibpath_var = "LD_LIBRARY_PATH"
29 # Point the dynamic loader at dynamic libraries in 'lib'.
30 shlibpath = os.path.pathsep.join(
31 (config.shlibdir, config.llvm_libs_dir, config.environment.get(shlibpath_var, ""))
34 # Win32 seeks DLLs along %PATH%.
35 if sys.platform in ["win32", "cygwin"] and os.path.isdir(config.shlibdir):
36 shlibpath = os.path.pathsep.join((config.shlibdir, shlibpath))
38 config.environment[shlibpath_var] = shlibpath
40 # It is not realistically possible to account for all options that could
41 # possibly be present in system and user configuration files, so disable
42 # default configs for the test runs.
43 config.environment["CLANG_NO_DEFAULT_CONFIG"] = "1"