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>