This finishes the transition of tests covered in generate_header_tests.py
to the new .gen.py format.
Details
- Reviewers
philnik Mordante - Group Reviewers
Restricted Project - Commits
- rG81cc929d4f9b: [libc++] Use .gen.py tests for the transitive inclusion tests
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
I think this makes sense, but I'd rather have @Mordante have a look, since he is more familiar with the interns of this test, and especially the transitive_includes_to_csv.py script.
In general the approach seems fine, but I want to do some testing with this patch.
Especially to see what happens when the regenerate_expected_results flag is toggled.
libcxx/test/libcxx/transitive_includes.gen.py | ||
---|---|---|
28–31 | These instructions seem outdated an no longer working. The regeneration happen when I try to run this test. Unfortunately running the test fails. <build>/bin/llvm-lit --param std=c++03 test/libcxx/transitive_includes.gen.py gives <llvm>/llvm/utils/lit/lit/discovery.py:189: error: 'llvm-libc++-shared.cfg.in :: libcxx/transitive_includes.gen.py' would not be run indirectly: change name or LIT config(e.g. suffixes or standalone_tests variables) 1 errors, exiting Running the generated test manually llvm-lit: <llvm>/llvm/utils/lit/lit/discovery.py:137: warning: unable to find test suite for '<build>/test/libcxx/transitive_includes.gen.py/algorithm.sh.cpp' llvm-lit: <llvm>/llvm/utils/lit/lit/discovery.py:314: warning: input '<build>/test/libcxx/transitive_includes.gen.py/algorithm.sh.cpp' contained no tests error: did not discover any tests for provided path(s) How can we run this test and update the transitive includes? | |
37 | This file is generated when regenerate_expected_results is set to True but not removed when set to False again. I would like to test whether this generated test will be executed, but I can't seem to run this test. (See comment above.) | |
89 | It seems we don't use awk in our tests yet. It's already a dependency since it's on of the POSIX tools. However I wonder why not using grep instead? |
LGTM modulo one nit.
libcxx/test/libcxx/transitive_includes.gen.py | ||
---|---|---|
28–29 | ||
28–31 | Great! That patch was also very useful to test the new style tests for D151814. | |
37 | I tested this with D151664 and only the proper branch of regenerate_expected_results was executed. So this works as expected and the stale files are not an issue. | |
89 | Ah interesting. |
I'm going to ship this now despite D151664 not being landed because this is blocking other work.
No objections. I just needed to be able to test the patch locally to see whether the stale tests were an issue.