Print skip/require messages when we enter the subtest
Cc: @mupuf
The issue: we execute all the igt_fixture {}
in a given binary even if its not directly relevant to a given subtest. This includes all the igt_require()
and igt_skip_on()
and we see their messages printed out. See example:
# executing igt@kms_chamelium@hdmi-edid-read, logs from the runner:
IGT-Version: 1.24-gad4542ef1 (x86_64) (Linux: 5.5.0-CI-CI_DRM_7885+ x86_64)
Test requirement not met in function require_connector_present, file ../tests/kms_chamelium.c:106:
Test requirement: found
No port of type HDMI-A was found
Subtest hdmi-edid-read: SKIP
Test requirement not met in function require_connector_present, file ../tests/kms_chamelium.c:106:
Test requirement: found
No port of type VGA was found
This makes bug fileing a lot harder and matching particular failures exceeds the capabilities of traditional regular expressions.
The idea: Print only messages that lead directly to a skip of a given test. We already store the skip state for igt_subtest_goup {}
and we can nest them any number of levels deep. We also use the same mechanism to store a buffer for igt_describe()
. We can add another buffer for storing and scoping log messages about skips/requires and then print them out if the tests is supposed to skip according to its group states. This would also improve the locality of the relevant log messages when running tests in the multiple mode - we would have the skip lines printed for each subtest.