[libcxx-commits] [PATCH] D151156: [WIP][libc++] Support on-the-fly generated tests

Nikolas Klauser via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon May 22 15:25:39 PDT 2023


philnik added a comment.

In D151156#4362491 <https://reviews.llvm.org/D151156#4362491>, @aaron.ballman wrote:

> 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.



================
Comment at: libcxx/test/libcxx/assertions/headers_declare_verbose_abort.gen.py:26-31
+    if header in vars['header_restrictions']:
+        print(f'#if {vars["header_restrictions"][header]}')
+    print(f'#include <{header}>')
+    print(f'using HandlerType = decltype(std::__libcpp_verbose_abort);')
+    if header in vars['header_restrictions']:
+        print(f'#endif')
----------------
I haven't tested this, but I think something like this would be easier to follow.


================
Comment at: libcxx/test/libcxx/lit.local.cfg:5
+
+# Several tests in this directory require additional information about libc++ headers
+# to generate tests.
----------------
ldionne wrote:
> This stuff would have to be duplicated until all the tests are moved to this new format.
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`?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D151156/new/

https://reviews.llvm.org/D151156



More information about the libcxx-commits mailing list