Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does "0 skipped, 0 blacklisted" mean in the Qt Unit Test framework?

When I run my Qt Unit Test project, it ends with a summary that looks like this:

Totals: 28 passed, 1 failed, 0 skipped, 0 blacklisted

The "passed" and "failed" categories are obvious, but what is the meaning of "skipped" and "blacklisted"?

Under what conditions will the test framework skip a test? How is that different from blacklisting it?

My Qt version is Qt 5.4.1.

like image 345
sashoalm Avatar asked Oct 30 '25 20:10

sashoalm


1 Answers

Test is skipped, if QSKIP() gets called from a test method/slot.

QTestlib looks for a file called BLACKLIST in the test directory and parses it if found. The file contains a simple ini style list of functions to blacklist. For details see qtestblacklist.cpp.

For example, Qt5 has BLACKLIST file (without .ini extension) at tests/auto/corelib/kernel/qobject folder, with contents like:

[moveToThread]
windows

Which tells QTestlib to don't treat the moveToThread named slot as a test-case if the platform is windows, and instead, just increment "blacklisted" count.

like image 166
Meefte Avatar answered Nov 02 '25 11:11

Meefte