brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.5 KiB · 0254829 Raw
44 lines · python
1# -*- Python -*-2 3import platform4 5import lit.formats6 7config.name = "Extra Tools Unit Tests"8config.suffixes = []  # Seems not to matter for google tests?9 10# Test Source and Exec root dirs both point to the same directory where google11# test binaries are built.12 13config.test_source_root = config.extra_tools_obj_dir14config.test_exec_root = config.test_source_root15 16# All GoogleTests are named to have 'Tests' as their suffix. The '.' option is17# a special value for GoogleTest indicating that it should look through the18# entire testsuite recursively for tests (alternatively, one could provide a19# ;-separated list of subdirectories).20config.test_format = lit.formats.GoogleTest(".", "Tests")21 22if platform.system() == "Darwin":23    shlibpath_var = "DYLD_LIBRARY_PATH"24elif platform.system() == "Windows" or sys.platform == "cygwin":25    shlibpath_var = "PATH"26else:27    shlibpath_var = "LD_LIBRARY_PATH"28 29# Point the dynamic loader at dynamic libraries in 'lib'.30shlibpath = os.path.pathsep.join(31    (config.shlibdir, config.llvm_libs_dir, config.environment.get(shlibpath_var, ""))32)33 34# Win32 seeks DLLs along %PATH%.35if sys.platform in ["win32", "cygwin"] and os.path.isdir(config.shlibdir):36    shlibpath = os.path.pathsep.join((config.shlibdir, shlibpath))37 38config.environment[shlibpath_var] = shlibpath39 40# It is not realistically possible to account for all options that could41# possibly be present in system and user configuration files, so disable42# default configs for the test runs.43config.environment["CLANG_NO_DEFAULT_CONFIG"] = "1"44