fa8cffa4c9
We try our best to pass on the file location of a failure, including for
fatal errors, but the reporting or logging machinery should not assume
there is one.
By passing on nullptr for the file location we allow the logging backends
to decide how to handle the situation, e.g. by not emitting extra fields
for failure location.
This effectively reverts c25687fa0b
,
in favor of relying on the backends to cope with null filename,
which they already did.
As qFatal uses QMessageLogger, which by default disables file/line
information in release builds, we need to explicitly enable this in
our self-tests, to get uniform test results. Similarly, we disable
file/line info from testlib itself, as reporting Qt internal file
and line information for user diagnostics is less useful. The odd
one out there is qtestdata.cpp, which still ends up in test output
due to using QTEST_ASSERT instead of qFatal for its diagnostics.
Cleaning up that, and unifying how we report testlib issues to the
user, is left for another day.
Pick-to: 6.2
Change-Id: Ib9451b8eed86fe3ade4a4dcaf0037e1a3450321c
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
26 lines
2.7 KiB
Plaintext
26 lines
2.7 KiB
Plaintext
##teamcity[testSuiteStarted name='tst_Warnings' flowId='tst_Warnings']
|
|
##teamcity[testStarted name='initTestCase()' flowId='tst_Warnings']
|
|
##teamcity[testFinished name='initTestCase()' flowId='tst_Warnings']
|
|
##teamcity[testStarted name='testWarnings()' flowId='tst_Warnings']
|
|
##teamcity[testStdOut name='testWarnings()' out='QWARN: Warning|nQWARN: Warning|nQDEBUG: Debug|nQDEBUG: Debug|nQINFO: Info|nQINFO: Info|nQDEBUG: Baba|nQDEBUG: Baba|nQDEBUG: Bubublabla|nQWARN: Babablabla' flowId='tst_Warnings']
|
|
##teamcity[testFinished name='testWarnings()' flowId='tst_Warnings']
|
|
##teamcity[testStarted name='testMissingWarnings()' flowId='tst_Warnings']
|
|
##teamcity[testFailed name='testMissingWarnings()' message='Failure!' details='Not all expected messages were received' flowId='tst_Warnings']
|
|
##teamcity[testStdOut name='testMissingWarnings()' out='INFO: Did not receive message: "Warning0"|nINFO: Did not receive message: "Warning1"' flowId='tst_Warnings']
|
|
##teamcity[testFinished name='testMissingWarnings()' flowId='tst_Warnings']
|
|
##teamcity[testStarted name='testMissingWarningsRegularExpression()' flowId='tst_Warnings']
|
|
##teamcity[testFailed name='testMissingWarningsRegularExpression()' message='Failure!' details='Not all expected messages were received' flowId='tst_Warnings']
|
|
##teamcity[testStdOut name='testMissingWarningsRegularExpression()' out='INFO: Did not receive any message matching: "Warning\s\d"' flowId='tst_Warnings']
|
|
##teamcity[testFinished name='testMissingWarningsRegularExpression()' flowId='tst_Warnings']
|
|
##teamcity[testStarted name='testMissingWarningsWithData(first row)' flowId='tst_Warnings']
|
|
##teamcity[testFailed name='testMissingWarningsWithData(first row)' message='Failure!' details='Not all expected messages were received' flowId='tst_Warnings']
|
|
##teamcity[testStdOut name='testMissingWarningsWithData(first row)' out='INFO: Did not receive message: "Warning0"|nINFO: Did not receive message: "Warning1"' flowId='tst_Warnings']
|
|
##teamcity[testFinished name='testMissingWarningsWithData(first row)' flowId='tst_Warnings']
|
|
##teamcity[testStarted name='testMissingWarningsWithData(second row)' flowId='tst_Warnings']
|
|
##teamcity[testFailed name='testMissingWarningsWithData(second row)' message='Failure!' details='Not all expected messages were received' flowId='tst_Warnings']
|
|
##teamcity[testStdOut name='testMissingWarningsWithData(second row)' out='INFO: Did not receive message: "Warning0"|nINFO: Did not receive message: "Warning1"' flowId='tst_Warnings']
|
|
##teamcity[testFinished name='testMissingWarningsWithData(second row)' flowId='tst_Warnings']
|
|
##teamcity[testStarted name='cleanupTestCase()' flowId='tst_Warnings']
|
|
##teamcity[testFinished name='cleanupTestCase()' flowId='tst_Warnings']
|
|
##teamcity[testSuiteFinished name='tst_Warnings' flowId='tst_Warnings']
|