libcxx-trunk-shared.cfg.in
1.52 KB
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
38
39
40
@AUTO_GEN_COMMENT@
LIBCXX_ROOT = "@LIBCXX_SOURCE_DIR@"
INSTALL_ROOT = "@CMAKE_BINARY_DIR@"
COMPILER = "@CMAKE_CXX_COMPILER@"
EXEC_ROOT = "@LIBCXX_BINARY_DIR@"
import os
import pipes
import site
import sys
site.addsitedir(os.path.join(LIBCXX_ROOT, 'utils'))
import libcxx.test.features
import libcxx.test.format
import libcxx.test.newconfig
import libcxx.test.params
# Configure basic properties of the test suite
config.name = 'libcxx-trunk-shared'
config.test_source_root = os.path.join(LIBCXX_ROOT, 'test')
config.test_format = libcxx.test.format.CxxStandardLibraryTest()
config.recursiveExpansionLimit = 10
config.test_exec_root = EXEC_ROOT
# Configure basic substitutions
runPy = os.path.join(LIBCXX_ROOT, 'utils', 'run.py')
config.substitutions.append(('%{cxx}', COMPILER))
config.substitutions.append(('%{flags}', ''))
config.substitutions.append(('%{compile_flags}', '-nostdinc++ -isystem {} -I {}'.format(os.path.join(INSTALL_ROOT, 'include', 'c++', 'v1'),
os.path.join(LIBCXX_ROOT, 'test', 'support'))))
config.substitutions.append(('%{link_flags}', '-nostdlib++ -L {0} -lc++ -Wl,-rpath,{0}'.format(os.path.join(INSTALL_ROOT, 'lib'))))
config.substitutions.append(('%{exec}', '{} {} --execdir %T -- '.format(pipes.quote(sys.executable), pipes.quote(runPy))))
# Add parameters and features to the config
libcxx.test.newconfig.configure(
libcxx.test.params.DEFAULT_PARAMETERS,
libcxx.test.features.DEFAULT_FEATURES,
config,
lit_config
)