summaryrefslogtreecommitdiffstats
path: root/test/Unit/lit.cfg.py
blob: b40e1cae29e09b8c0f183b3026e06fa8a7ccf505 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# -*- Python -*-

import platform

import lit.formats

config.name = "Extra Tools Unit Tests"
config.suffixes = [] # Seems not to matter for google tests?

# Test Source and Exec root dirs both point to the same directory where google
# test binaries are built.

config.test_source_root = config.extra_tools_obj_dir
config.test_exec_root = config.test_source_root

# All GoogleTests are named to have 'Tests' as their suffix. The '.' option is
# a special value for GoogleTest indicating that it should look through the
# entire testsuite recursively for tests (alternatively, one could provide a
# ;-separated list of subdirectories).
config.test_format = lit.formats.GoogleTest('.', 'Tests')

if platform.system() == 'Darwin':
    shlibpath_var = 'DYLD_LIBRARY_PATH'
elif platform.system() == 'Windows':
    shlibpath_var = 'PATH'
else:
    shlibpath_var = 'LD_LIBRARY_PATH'

# Point the dynamic loader at dynamic libraries in 'lib'.
shlibpath = os.path.pathsep.join((config.shlibdir, config.llvm_libs_dir,
                                 config.environment.get(shlibpath_var,'')))

# Win32 seeks DLLs along %PATH%.
if sys.platform in ['win32', 'cygwin'] and os.path.isdir(config.shlibdir):
    shlibpath = os.path.pathsep.join((config.shlibdir, shlibpath))

config.environment[shlibpath_var] = shlibpath