comparison libcxx/test/lit.cfg @ 173:0572611fdcc8 llvm10 llvm12

reorgnization done
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 11:55:54 +0900
parents 1d019706d866
children
comparison
equal deleted inserted replaced
172:9fbae9c8bf63 173:0572611fdcc8
13 13
14 # name: The name of this test suite. 14 # name: The name of this test suite.
15 config.name = 'libc++' 15 config.name = 'libc++'
16 16
17 # suffixes: A list of file extensions to treat as test files. 17 # suffixes: A list of file extensions to treat as test files.
18 config.suffixes = ['.pass.cpp', '.fail.cpp', '.sh.cpp'] 18 config.suffixes = ['.pass.cpp', '.fail.cpp', '.sh.cpp', '.pass.mm']
19 19
20 # test_source_root: The root path where tests are located. 20 # test_source_root: The root path where tests are located.
21 config.test_source_root = os.path.dirname(__file__) 21 config.test_source_root = os.path.dirname(__file__)
22
23 # Allow expanding substitutions that are based on other substitutions
24 config.recursiveExpansionLimit = 10
22 25
23 loaded_site_cfg = getattr(config, 'loaded_site_config', False) 26 loaded_site_cfg = getattr(config, 'loaded_site_config', False)
24 if not loaded_site_cfg: 27 if not loaded_site_cfg:
25 import libcxx.test.config 28 import libcxx.test.config
26 libcxx.test.config.loadSiteConfig(lit_config, config, 'libcxx_site_config', 29 libcxx.test.config.loadSiteConfig(lit_config, config, 'libcxx_site_config',
36 import tempfile 39 import tempfile
37 obj_root = tempfile.mkdtemp(prefix='libcxx-testsuite-') 40 obj_root = tempfile.mkdtemp(prefix='libcxx-testsuite-')
38 lit_config.warning('Creating temporary directory for object root: %s' % 41 lit_config.warning('Creating temporary directory for object root: %s' %
39 obj_root) 42 obj_root)
40 43
41 config.test_exec_root = os.path.join(obj_root, 'test') 44 if not config.test_exec_root:
45 config.test_exec_root = os.path.join(obj_root, 'test')
42 46
43 cfg_variant = getattr(config, 'configuration_variant', 'libcxx') 47 cfg_variant = getattr(config, 'configuration_variant', 'libcxx')
44 if cfg_variant: 48 if cfg_variant:
45 lit_config.note('Using configuration variant: %s' % cfg_variant) 49 lit_config.note('Using configuration variant: %s' % cfg_variant)
46 50
49 config_module = __import__(config_module_name, fromlist=['Configuration']) 53 config_module = __import__(config_module_name, fromlist=['Configuration'])
50 54
51 configuration = config_module.Configuration(lit_config, config) 55 configuration = config_module.Configuration(lit_config, config)
52 configuration.configure() 56 configuration.configure()
53 configuration.print_config_info() 57 configuration.print_config_info()
54 config.test_format = configuration.get_test_format() 58 if lit_config.params.get('use_old_format', False):
59 lit_config.note("Using the old libc++ testing format")
60 config.test_format = configuration.get_test_format()
61 else:
62 lit_config.note("Using the new libc++ testing format")
63 import libcxx.test.newformat
64 config.test_format = libcxx.test.newformat.CxxStandardLibraryTest()