test(end2end/interceptors): fail by throwing instead of aborting


The test redefined QTEST_FAIL_ACTION to call std::abort() so that the
QTest macros could be used inside non-void helpers and callbacks. Any
failing check therefore killed the binary: SIGABRT locally, exit code
0xC0000409 on Windows. The XML log was truncated mid-run, so
qt-testrunner reported "the test executable probably crashed" instead
of the actual failure and could not re-run the failed function.

Define QTEST_THROW_ON_FAIL/QTEST_THROW_ON_SKIP instead. The macros then
expand to a throw expression, which compiles in non-void contexts; the
testlib harness catches the exception, records the failure, and the
remaining tests keep running and produce a parseable XML log. Checks
running on the mock server's completion-queue thread keep their fatal
behavior, as the exception terminates the process there, like abort()
did.

Pick-to: 6.12 6.11
Change-Id: Id565991f6c545016d606e762430ade55b252d5ee
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
commit99c2d5308c476dde5848d02b4aa21f610338bf68
parentec01274cf9b9b4dcc42527210efd178fef2021b8
authorDennis Oberst <dennis.oberst@qt.io>
committerDennis Oberst <dennis.oberst@qt.io>
commit timeTue, 21 Jul 2026 18:17:56 +0000