By default LLDB currently runs an API test with 3 variants,
one of which, depending on platform, is gmodules. However,
most tests don't actually make use of any specific gmodules
feature since they compile a single main.cpp file without
importing types from other modules.
Instead of running all tests an extra time with -gmodules
enabled, we plan to test gmodules features with dedicated
API tests that explicitly opt-into compiling with -gmodules.
One of the main benefits of this will be a reduction in total
API test-suite run-time (by around 1/3).
This patch adds the @gmodules_test decorator which test cases
will be decorated with to specify that we're running a gmodules
test. The decorator serves following purposes:
- Will skip the test on unsupported platforms
- Add a single debug-info variant to the test-category such that we don't run a gmodules test multiple times
To enable compilation with -gmodules, the MAKE_GMODULES
flag will be needed in the test's Makefile.
Some simple savings stats for ninja check-lldb-api total run-time:
- With patch: ~955 seconds
- Without patch: ~1300 seconds
So ~26% reduction in run-time