[NFC][LoopVectorize] Add more loop early exit asserts (#122732)
[llvm-project.git] / llvm / test / Unit / lit.cfg.py
blobe29fd76bd8dccf2e68e989b9829e5d00a06c1482
1 # -*- Python -*-
3 # Configuration file for the 'lit' test runner.
5 import os
6 import subprocess
8 import lit.formats
10 # name: The name of this test suite.
11 config.name = "LLVM-Unit"
13 # suffixes: A list of file extensions to treat as test files.
14 config.suffixes = []
16 # test_source_root: The root path where tests are located.
17 # test_exec_root: The root path where tests should be run.
18 config.test_exec_root = os.path.join(config.llvm_obj_root, "unittests")
19 config.test_source_root = config.test_exec_root
21 # testFormat: The test format to use to interpret tests.
22 config.test_format = lit.formats.GoogleTest(
23 config.llvm_build_mode,
24 "Tests",
25 run_under=config.gtest_run_under,
28 # Propagate the temp directory. Windows requires this because it uses \Windows\
29 # if none of these are present.
30 if "TMP" in os.environ:
31 config.environment["TMP"] = os.environ["TMP"]
32 if "TEMP" in os.environ:
33 config.environment["TEMP"] = os.environ["TEMP"]
35 # Propagate HOME as it can be used to override incorrect homedir in passwd
36 # that causes the tests to fail.
37 if "HOME" in os.environ:
38 config.environment["HOME"] = os.environ["HOME"]
40 # Propagate sanitizer options.
41 for var in [
42 "ASAN_SYMBOLIZER_PATH",
43 "HWASAN_SYMBOLIZER_PATH",
44 "MSAN_SYMBOLIZER_PATH",
45 "TSAN_SYMBOLIZER_PATH",
46 "UBSAN_SYMBOLIZER_PATH",
47 "ASAN_OPTIONS",
48 "HWASAN_OPTIONS",
49 "MSAN_OPTIONS",
50 "RTSAN_OPTIONS",
51 "TSAN_OPTIONS",
52 "UBSAN_OPTIONS",
54 if var in os.environ:
55 config.environment[var] = os.environ[var]
57 # Win32 seeks DLLs along %PATH%.
58 if sys.platform in ["win32", "cygwin"] and os.path.isdir(config.shlibdir):
59 config.environment["PATH"] = os.path.pathsep.join(
60 (config.shlibdir, config.environment["PATH"])
63 # Win32 may use %SYSTEMDRIVE% during file system shell operations, so propagate.
64 if sys.platform == "win32" and "SYSTEMDRIVE" in os.environ:
65 config.environment["SYSTEMDRIVE"] = os.environ["SYSTEMDRIVE"]