This reduces the amount of boilerplate that we need to generate
for each commit. It also resolves a problem where the modular CI
would run extremely slow on this test because we'd define a macro
before including the standard library, defeating the module cache.
Details
- Reviewers
philnik ldionne - Group Reviewers
Restricted Project - Commits
- rG1ee839d0ce13: [libc++] Use the new .gen tests to implement __verbose_abort tests
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
libcxx/test/libcxx/lit.local.cfg | ||
---|---|---|
5 | This stuff would have to be duplicated until all the tests are moved to this new format. |
What's the expectation for folks on Windows (where .sh isn't likely to work too well)?
The tests are generated using python scripts, so I don't think that's a problem.
libcxx/test/libcxx/assertions/headers_declare_verbose_abort.gen.py | ||
---|---|---|
26–31 | I haven't tested this, but I think something like this would be easier to follow. | |
libcxx/test/libcxx/lit.local.cfg | ||
5 | Could we move this to its own file? lit.local.cfg isn't exactly the first place I'd expect some data. Maybe just put something like header_test_info.py into libcxx/utils/data? |
I believe we're using Lit's internal shell which actually also works on Windows. In this case, the invocation is extremely simple -- we basically call python <script> so that should work on windows just as well. There really isn't much of a change compared to how we used to do things, but this shifts the moment at which the generation happens (from being explicit via developer running a command to being implicit when you run the test suite).
Ah, thank you! I hadn't realized this was using lit's internal shell, I thought these scripts were to be executed on the command line as well. If it's all going through python and lit, that sounds lovely to me. Thanks!
I haven't tested this, but I think something like this would be easier to follow.