OSDN Git Service

[libc++] Allow specifying custom Lit config files
authorLouis Dionne <ldionne@apple.com>
Fri, 12 Jun 2020 19:19:55 +0000 (15:19 -0400)
committerLouis Dionne <ldionne@apple.com>
Thu, 18 Jun 2020 14:06:04 +0000 (10:06 -0400)
commit0c66af970c806d65d9335c7272610c82c2388e31
treeca959d07aa27f95d55733c60ba377691821b91ab
parent7622ea5835f0381a426e504f4c03f11733732b83
[libc++] Allow specifying custom Lit config files

Before this patch, the libc++ test suite first loads lit.site.cfg
(generated by CMake), and then lit.cfg. It's also possible to load
lit.cfg before lit.site.cfg and to point to a custom lit.site.cfg
file using '--param=libcxx_site_config'. However, in that case, lit.cfg
still relies on the site configuration filling up the 'config' object
like the default lit.site.cfg file does, which isn't flexible enough.

This commit simplifies the setup by having just a single Lit site config
file per CMake configuration, and always loading exactly that config file.
However, the config file to use can be selected when setting up CMake via
the LIBCXX_TEST_CONFIG setting. Furthermore, the site configs are entirely
standalone, which means that a new site config can be added that doesn't
need to conform what's expected by config.py.

Differential Revision: https://reviews.llvm.org/D81846
libcxx/CMakeLists.txt
libcxx/docs/TestingLibcxx.rst
libcxx/test/CMakeLists.txt
libcxx/test/lit.cfg [deleted file]
libcxx/test/lit.cfg.py [new file with mode: 0644]
libcxx/test/lit.site.cfg.in