ibverbs-tests: Add ability to skip test if it is not supported

This commit introduces the new macro - CHECK_TEST_OR_SKIP(FEATURE_NAME).
It should be placed at the beginning of test.

In case the feature declared as not supported (class member
skip_this_test is set), it will print line with "SKIPPED" mark.

As an example:
[----------] 1 test from tc_verbs_query_device
[ RUN      ] tc_verbs_query_device.ti_1
[  SKIPPED ] Feature Cross-Channel is not supported
[       OK ] tc_verbs_query_device.ti_1 (0 ms)
[----------] 1 test from tc_verbs_query_device (0 ms total)

Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
1 file changed