Hello all,
There have been a few requests in the past to run libc untitests unconditionally (like how it is done in the rest of LLVM) as opposed to running the tests only when the deps change. If everyone agrees that this is a desirable change, I would like to prepare patches making this change. I would like to keep the granularity of running the tests intact post this change also. That is, one should be able to run an individual test by running the target corresponding to that test. Overall, I propose to make the following changes in order:
- Move all test related pieces, including the
UnitTest
andIntegrationTest
frameworks over to thetest
directory. This will make it easy to exclude all test related pieces whenLLVM_INCLUDE_TESTS
isOFF
. - For libc level targets like
check-libc
:-
check-libc
will run all tests which, depending on the build mode, will include unit tests, integration tests and api-test. The tests will be run unconditionally. - A new target to run unit tests will be introduced:
libc-unit-tests
. Invokingninja libc-unit-tests
will run the unit tests unconditionally. - The current target
libc-integration-tests
will run all integration tests unconditionally. - The current target
libc-api-test
will run the API test unconditionally.
-
- The individual test targets, for example
libc.src.string.strlen_test
will run the corresponding tests unconditionally.
All of the above targets will bring the build up-to-date before running the corresponding test(s). Feel free to share your concerns if you have any.
I think the first item can be taken up as a change not directly related to this RFC. However, it involves a widespread mechanical change which touches almost all test sources making arcanist and phabricator unhappy. So, I have included it here instead of creating a separate RFC for it. If everyone agrees, I plan to submit that change without review (to avoid the arcanist and phabricator problems).
Thanks,
Siva Chandra