annotate libcxx/test/lit.cfg @ 190:b1364f705114

relax tail call error on goto from normal function. args.c worked.
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sat, 06 Jun 2020 13:15:35 +0900 (2020-06-06)
parents 0572611fdcc8
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 # -*- Python -*- vim: set ft=python ts=4 sw=4 expandtab tw=79:
anatofuz
parents:
diff changeset
2 # Configuration file for the 'lit' test runner.
anatofuz
parents:
diff changeset
3 import os
anatofuz
parents:
diff changeset
4 import site
anatofuz
parents:
diff changeset
5
anatofuz
parents:
diff changeset
6 site.addsitedir(os.path.join(os.path.dirname(os.path.dirname(__file__)), 'utils'))
anatofuz
parents:
diff changeset
7
anatofuz
parents:
diff changeset
8
anatofuz
parents:
diff changeset
9 # Tell pylint that we know config and lit_config exist somewhere.
anatofuz
parents:
diff changeset
10 if 'PYLINT_IMPORT' in os.environ:
anatofuz
parents:
diff changeset
11 config = object()
anatofuz
parents:
diff changeset
12 lit_config = object()
anatofuz
parents:
diff changeset
13
anatofuz
parents:
diff changeset
14 # name: The name of this test suite.
anatofuz
parents:
diff changeset
15 config.name = 'libc++'
anatofuz
parents:
diff changeset
16
anatofuz
parents:
diff changeset
17 # suffixes: A list of file extensions to treat as test files.
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
18 config.suffixes = ['.pass.cpp', '.fail.cpp', '.sh.cpp', '.pass.mm']
150
anatofuz
parents:
diff changeset
19
anatofuz
parents:
diff changeset
20 # test_source_root: The root path where tests are located.
anatofuz
parents:
diff changeset
21 config.test_source_root = os.path.dirname(__file__)
anatofuz
parents:
diff changeset
22
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
23 # Allow expanding substitutions that are based on other substitutions
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
24 config.recursiveExpansionLimit = 10
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
25
150
anatofuz
parents:
diff changeset
26 loaded_site_cfg = getattr(config, 'loaded_site_config', False)
anatofuz
parents:
diff changeset
27 if not loaded_site_cfg:
anatofuz
parents:
diff changeset
28 import libcxx.test.config
anatofuz
parents:
diff changeset
29 libcxx.test.config.loadSiteConfig(lit_config, config, 'libcxx_site_config',
anatofuz
parents:
diff changeset
30 'LIBCXX_SITE_CONFIG')
anatofuz
parents:
diff changeset
31
anatofuz
parents:
diff changeset
32 # Infer the test_exec_root from the libcxx_object root.
anatofuz
parents:
diff changeset
33 obj_root = getattr(config, 'libcxx_obj_root', None)
anatofuz
parents:
diff changeset
34
anatofuz
parents:
diff changeset
35 # Check that the test exec root is known.
anatofuz
parents:
diff changeset
36 if obj_root is None:
anatofuz
parents:
diff changeset
37 obj_root = getattr(config, 'libcxx_obj_root', None)
anatofuz
parents:
diff changeset
38 if obj_root is None:
anatofuz
parents:
diff changeset
39 import tempfile
anatofuz
parents:
diff changeset
40 obj_root = tempfile.mkdtemp(prefix='libcxx-testsuite-')
anatofuz
parents:
diff changeset
41 lit_config.warning('Creating temporary directory for object root: %s' %
anatofuz
parents:
diff changeset
42 obj_root)
anatofuz
parents:
diff changeset
43
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
44 if not config.test_exec_root:
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
45 config.test_exec_root = os.path.join(obj_root, 'test')
150
anatofuz
parents:
diff changeset
46
anatofuz
parents:
diff changeset
47 cfg_variant = getattr(config, 'configuration_variant', 'libcxx')
anatofuz
parents:
diff changeset
48 if cfg_variant:
anatofuz
parents:
diff changeset
49 lit_config.note('Using configuration variant: %s' % cfg_variant)
anatofuz
parents:
diff changeset
50
anatofuz
parents:
diff changeset
51 # Load the Configuration class from the module name <cfg_variant>.test.config.
anatofuz
parents:
diff changeset
52 config_module_name = '.'.join([cfg_variant, 'test', 'config'])
anatofuz
parents:
diff changeset
53 config_module = __import__(config_module_name, fromlist=['Configuration'])
anatofuz
parents:
diff changeset
54
anatofuz
parents:
diff changeset
55 configuration = config_module.Configuration(lit_config, config)
anatofuz
parents:
diff changeset
56 configuration.configure()
anatofuz
parents:
diff changeset
57 configuration.print_config_info()
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
58 if lit_config.params.get('use_old_format', False):
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
59 lit_config.note("Using the old libc++ testing format")
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
60 config.test_format = configuration.get_test_format()
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
61 else:
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
62 lit_config.note("Using the new libc++ testing format")
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
63 import libcxx.test.newformat
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
64 config.test_format = libcxx.test.newformat.CxxStandardLibraryTest()