diff options
author | Jøger Hansegård <[email protected]> | 2023-08-11 17:03:01 +0200 |
---|---|---|
committer | Jøger Hansegård <[email protected]> | 2023-11-15 11:07:09 +0000 |
commit | 80a14c86b2739492d7f7fbdb1cbde1da85d1341d (patch) | |
tree | 93ff671e91100fc43d71d59593cfcf0ff3daf2f3 /src/testlib/qtestlog.cpp | |
parent | f67499baab77e287a54d5c2abf0e8e6088ef5930 (diff) |
Add QTest option for repeating the entire test execution
Repeated test execution can be useful, under a debugger, to catch an
intermittent failure or, under memory instrumentation, to make memory
leaks easier to recognize.
The new -repeat flag allows running the entire test suite multiple times
within the same process. It works by executing all tests sequentially
before repeating the execution again.
This switch is a developer tool, and is not intended for CI. It can only
be used with the plain text logger.
Change-Id: I2439462c5c44d1c8aa3d3b5656de3eef44898c68
Reviewed-by: Edward Welbourne <[email protected]>
Reviewed-by: Tor Arne Vestbø <[email protected]>
Diffstat (limited to 'src/testlib/qtestlog.cpp')
-rw-r--r-- | src/testlib/qtestlog.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/testlib/qtestlog.cpp b/src/testlib/qtestlog.cpp index e01da379115..127cefe50ec 100644 --- a/src/testlib/qtestlog.cpp +++ b/src/testlib/qtestlog.cpp @@ -559,6 +559,21 @@ bool QTestLog::hasLoggers() return !QTest::loggers()->empty(); } +/*! + \internal + + Returns true if all loggers support repeated test runs +*/ +bool QTestLog::isRepeatSupported() +{ + FOREACH_TEST_LOGGER { + if (!logger->isRepeatSupported()) + return false; + } + + return true; +} + bool QTestLog::loggerUsingStdout() { FOREACH_TEST_LOGGER { |