summaryrefslogtreecommitdiffstats
path: root/src/testlib/doc/src
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2020-12-03 00:15:53 +0100
committerGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2020-12-04 14:09:46 +0000
commita1a55d5b9301c4e7ea6f9ff1d1c5096081019a4d (patch)
tree7ab0c1f89cdca4484e5ea5635129d39b8de652d4 /src/testlib/doc/src
parentbc093cd294cbf48eb93b776fc0b927f0a43fa603 (diff)
QTestLib: add a abort-on-fail environment variable
When debugging a spurious failure it's extremely useful to run the test repeadtly into a debugger until a failure appears. When that happens, one wants to immediately start debugging. In so far, this has only been possible by placing breakpoints inside Qt itself (when a failure is logged). Add another way: an env variable, similar to QT_FATAL_WARNINGS, that makes any failure fatal (terminate() gets called. Bonus: you can control the termination handler!) [ChangeLog][QtTestLib][QtTest] When the QTEST_FATAL_FAIL environment variable is set to a non-zero value, a test immediately aborts its execution. This is useful to debug intermittent failures. Change-Id: If2395f964ea482c30b8c8feab98db7fdee701cd3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Jason McDonald <macadder1@gmail.com>
Diffstat (limited to 'src/testlib/doc/src')
-rw-r--r--src/testlib/doc/src/qttestlib-manual.qdoc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/testlib/doc/src/qttestlib-manual.qdoc b/src/testlib/doc/src/qttestlib-manual.qdoc
index 73c010888f..9073cc7c88 100644
--- a/src/testlib/doc/src/qttestlib-manual.qdoc
+++ b/src/testlib/doc/src/qttestlib-manual.qdoc
@@ -374,6 +374,12 @@
\li \c QTEST_DISABLE_STACK_DUMP \br
Setting this variable to a non-zero value will prevent Qt Test from
printing a stacktrace in case an autotest times out or crashes.
+ \li \c QTEST_FATAL_FAIL \br
+ Setting this variable to a non-zero value will cause a failure in
+ an autotest to immediately abort the entire autotest. This is useful
+ to e.g. debug an unstable or intermittent failure in a test, by
+ launching the test in a debugger. Support for this variable has been
+ added in Qt 6.1.
\endlist
\section1 Creating a Benchmark