diff --git a/src/testlib/CMakeLists.txt b/src/testlib/CMakeLists.txt index 18fd9d2cee..c1c4270e12 100644 --- a/src/testlib/CMakeLists.txt +++ b/src/testlib/CMakeLists.txt @@ -62,6 +62,8 @@ qt_internal_add_module(Test QT_NO_CAST_TO_ASCII QT_NO_DATASTREAM QT_NO_FOREACH + # Ensure uniform location info between release and debug builds + QT_NO_MESSAGELOGCONTEXT LIBRARIES Qt::CorePrivate PUBLIC_LIBRARIES diff --git a/src/testlib/qtestlog.cpp b/src/testlib/qtestlog.cpp index 7fbb3155fa..134df48f0f 100644 --- a/src/testlib/qtestlog.cpp +++ b/src/testlib/qtestlog.cpp @@ -239,7 +239,7 @@ namespace QTest { * this function, it will proceed with calling exit() and abort() * and hence crash. Therefore, we call these logging functions such * that we wrap up nicely, and in particular produce well-formed XML. */ - QTestResult::addFailure("Received a fatal error.", "Unknown file", 0); + QTestResult::addFailure("Received a fatal error.", context.file, context.line); QTestLog::leaveTestFunction(); QTestLog::stopLogging(); } @@ -336,7 +336,6 @@ void QTestLog::addFail(const char *msg, const char *file, int line) void QTestLog::addXFail(const char *msg, const char *file, int line) { QTEST_ASSERT(msg); - QTEST_ASSERT(file); FOREACH_TEST_LOGGER logger->addIncident(QAbstractTestLogger::XFail, msg, file, line); @@ -345,7 +344,6 @@ void QTestLog::addXFail(const char *msg, const char *file, int line) void QTestLog::addXPass(const char *msg, const char *file, int line) { QTEST_ASSERT(msg); - QTEST_ASSERT(file); ++QTest::fails; @@ -366,7 +364,6 @@ void QTestLog::addBPass(const char *msg) void QTestLog::addBFail(const char *msg, const char *file, int line) { QTEST_ASSERT(msg); - QTEST_ASSERT(file); ++QTest::blacklists; @@ -377,7 +374,6 @@ void QTestLog::addBFail(const char *msg, const char *file, int line) void QTestLog::addBXPass(const char *msg, const char *file, int line) { QTEST_ASSERT(msg); - QTEST_ASSERT(file); ++QTest::blacklists; @@ -388,7 +384,6 @@ void QTestLog::addBXPass(const char *msg, const char *file, int line) void QTestLog::addBXFail(const char *msg, const char *file, int line) { QTEST_ASSERT(msg); - QTEST_ASSERT(file); ++QTest::blacklists; @@ -399,7 +394,6 @@ void QTestLog::addBXFail(const char *msg, const char *file, int line) void QTestLog::addSkip(const char *msg, const char *file, int line) { QTEST_ASSERT(msg); - QTEST_ASSERT(file); ++QTest::skips; diff --git a/src/testlib/qtestresult.cpp b/src/testlib/qtestresult.cpp index 96c7af29d5..7498b92024 100644 --- a/src/testlib/qtestresult.cpp +++ b/src/testlib/qtestresult.cpp @@ -164,15 +164,14 @@ static void clearExpectFail() void QTestResult::finishedCurrentTestData() { - if (QTest::expectFailMode) { - addFailure("QEXPECT_FAIL was called without any subsequent verification statements", - "Unknown File", 0); - } + if (QTest::expectFailMode) + addFailure("QEXPECT_FAIL was called without any subsequent verification statements"); + clearExpectFail(); if (!QTest::hasFailed() && QTestLog::unhandledIgnoreMessages()) { QTestLog::printUnhandledIgnoreMessages(); - addFailure("Not all expected messages were received", "Unknown File", 0); + addFailure("Not all expected messages were received"); } QTestLog::clearIgnoreMessages(); } diff --git a/src/testlib/qtestresult_p.h b/src/testlib/qtestresult_p.h index 05ae764722..ba2237afec 100644 --- a/src/testlib/qtestresult_p.h +++ b/src/testlib/qtestresult_p.h @@ -77,7 +77,7 @@ public: static void reset(); static void setBlacklistCurrentTest(bool b); - static void addFailure(const char *message, const char *file, int line); + static void addFailure(const char *message, const char *file = nullptr, int line = 0); static bool compare(bool success, const char *failureMsg, char *val1, char *val2, const char *actual, const char *expected, diff --git a/tests/auto/testlib/selftests/CMakeLists.txt b/tests/auto/testlib/selftests/CMakeLists.txt index 0564fdaaf7..5ff460546d 100644 --- a/tests/auto/testlib/selftests/CMakeLists.txt +++ b/tests/auto/testlib/selftests/CMakeLists.txt @@ -126,6 +126,9 @@ if(TARGET Qt::Gui) ) endif() +# Ensure uniform location info between release and debug builds +add_definitions(-DQT_MESSAGELOGCONTEXT) + foreach(subprogram IN LISTS subprograms) add_subdirectory(${subprogram}) endforeach() diff --git a/tests/auto/testlib/selftests/expected_assert.lightxml b/tests/auto/testlib/selftests/expected_assert.lightxml index 1591f4cf41..33294fb19a 100644 --- a/tests/auto/testlib/selftests/expected_assert.lightxml +++ b/tests/auto/testlib/selftests/expected_assert.lightxml @@ -15,7 +15,7 @@ - + diff --git a/tests/auto/testlib/selftests/expected_assert.tap b/tests/auto/testlib/selftests/expected_assert.tap index 4cd26848ac..0e8b73fab4 100644 --- a/tests/auto/testlib/selftests/expected_assert.tap +++ b/tests/auto/testlib/selftests/expected_assert.tap @@ -6,8 +6,8 @@ ok 2 - testNumber1() not ok 3 - testNumber2() --- # Received a fatal error. - at: tst_Assert::testNumber2() (Unknown file:0) - file: Unknown file + at: tst_Assert::testNumber2() (qtbase/tests/auto/testlib/selftests/assert/tst_assert.cpp:0) + file: qtbase/tests/auto/testlib/selftests/assert/tst_assert.cpp line: 0 ... 1..3 diff --git a/tests/auto/testlib/selftests/expected_assert.teamcity b/tests/auto/testlib/selftests/expected_assert.teamcity index 3f68c5f21b..cb897cfd09 100644 --- a/tests/auto/testlib/selftests/expected_assert.teamcity +++ b/tests/auto/testlib/selftests/expected_assert.teamcity @@ -4,7 +4,7 @@ ##teamcity[testStarted name='testNumber1()' flowId='tst_Assert'] ##teamcity[testFinished name='testNumber1()' flowId='tst_Assert'] ##teamcity[testStarted name='testNumber2()' flowId='tst_Assert'] -##teamcity[testFailed name='testNumber2()' message='Failure! |[Loc: Unknown file(0)|]' details='Received a fatal error.' flowId='tst_Assert'] +##teamcity[testFailed name='testNumber2()' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/assert/tst_assert.cpp(0)|]' details='Received a fatal error.' flowId='tst_Assert'] ##teamcity[testStdOut name='testNumber2()' out='QFATAL: ASSERT: "false" in file qtbase/tests/auto/testlib/selftests/assert/tst_assert.cpp, line 0' flowId='tst_Assert'] ##teamcity[testFinished name='testNumber2()' flowId='tst_Assert'] ##teamcity[testSuiteFinished name='tst_Assert' flowId='tst_Assert'] diff --git a/tests/auto/testlib/selftests/expected_assert.txt b/tests/auto/testlib/selftests/expected_assert.txt index 9380eeddc1..e3fde7d25e 100644 --- a/tests/auto/testlib/selftests/expected_assert.txt +++ b/tests/auto/testlib/selftests/expected_assert.txt @@ -4,6 +4,6 @@ PASS : tst_Assert::initTestCase() PASS : tst_Assert::testNumber1() QFATAL : tst_Assert::testNumber2() ASSERT: "false" in file qtbase/tests/auto/testlib/selftests/assert/tst_assert.cpp, line 0 FAIL! : tst_Assert::testNumber2() Received a fatal error. - Loc: [Unknown file(0)] + Loc: [qtbase/tests/auto/testlib/selftests/assert/tst_assert.cpp(0)] Totals: 2 passed, 1 failed, 0 skipped, 0 blacklisted, 0ms ********* Finished testing of tst_Assert ********* diff --git a/tests/auto/testlib/selftests/expected_assert.xml b/tests/auto/testlib/selftests/expected_assert.xml index cdb7f4d8d1..cc93892389 100644 --- a/tests/auto/testlib/selftests/expected_assert.xml +++ b/tests/auto/testlib/selftests/expected_assert.xml @@ -17,7 +17,7 @@ - + diff --git a/tests/auto/testlib/selftests/expected_blacklisted.lightxml b/tests/auto/testlib/selftests/expected_blacklisted.lightxml index 5cf62ed104..a692badea1 100644 --- a/tests/auto/testlib/selftests/expected_blacklisted.lightxml +++ b/tests/auto/testlib/selftests/expected_blacklisted.lightxml @@ -58,7 +58,7 @@ - + diff --git a/tests/auto/testlib/selftests/expected_blacklisted.tap b/tests/auto/testlib/selftests/expected_blacklisted.tap index 8107939e6d..2c96bec472 100644 --- a/tests/auto/testlib/selftests/expected_blacklisted.tap +++ b/tests/auto/testlib/selftests/expected_blacklisted.tap @@ -34,8 +34,8 @@ ok 7 - xpass() # TODO 'true' returned TRUE unexpectedly. (This test should BXPAS not ok 8 - messages() # TODO Received a fatal error. --- # Received a fatal error. - at: tst_Blacklisted::messages() (Unknown file:0) - file: Unknown file + at: tst_Blacklisted::messages() (qtbase/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp:0) + file: qtbase/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp line: 0 ... 1..8 diff --git a/tests/auto/testlib/selftests/expected_blacklisted.txt b/tests/auto/testlib/selftests/expected_blacklisted.txt index da59bbfecf..89085e2f56 100644 --- a/tests/auto/testlib/selftests/expected_blacklisted.txt +++ b/tests/auto/testlib/selftests/expected_blacklisted.txt @@ -21,6 +21,6 @@ INFO : tst_Blacklisted::messages() This is an internal testlib info message th Loc: [qtbase/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp(0)] QFATAL : tst_Blacklisted::messages() This is a fatal error message that should still appear in silent test output BFAIL : tst_Blacklisted::messages() Received a fatal error. - Loc: [Unknown file(0)] + Loc: [qtbase/tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp(0)] Totals: 1 passed, 0 failed, 1 skipped, 6 blacklisted, 0ms ********* Finished testing of tst_Blacklisted ********* diff --git a/tests/auto/testlib/selftests/expected_blacklisted.xml b/tests/auto/testlib/selftests/expected_blacklisted.xml index 04d7e6c828..bfd42f4214 100644 --- a/tests/auto/testlib/selftests/expected_blacklisted.xml +++ b/tests/auto/testlib/selftests/expected_blacklisted.xml @@ -60,7 +60,7 @@ - + diff --git a/tests/auto/testlib/selftests/expected_crashes_3.txt b/tests/auto/testlib/selftests/expected_crashes_3.txt index 0e3f60dd1b..c32ea53675 100644 --- a/tests/auto/testlib/selftests/expected_crashes_3.txt +++ b/tests/auto/testlib/selftests/expected_crashes_3.txt @@ -4,6 +4,5 @@ PASS : tst_Crashes::initTestCase() QFATAL : tst_Crashes::crash() Received signal 11 Function time: ms Total time: ms FAIL! : tst_Crashes::crash() Received a fatal error. - Loc: [Unknown file(0)] Totals: 1 passed, 1 failed, 0 skipped, 0 blacklisted ********* Finished testing of tst_Crashes ********* diff --git a/tests/auto/testlib/selftests/expected_crashes_4.txt b/tests/auto/testlib/selftests/expected_crashes_4.txt index e0e4d27b0a..90ae91b8ba 100644 --- a/tests/auto/testlib/selftests/expected_crashes_4.txt +++ b/tests/auto/testlib/selftests/expected_crashes_4.txt @@ -4,4 +4,3 @@ PASS : tst_Crashes::initTestCase() QFATAL : tst_Crashes::crash() Received signal 11 Function time: ms Total time: ms FAIL! : tst_Crashes::crash() Received a fatal error. - Loc: [Unknown file(0)] diff --git a/tests/auto/testlib/selftests/expected_expectfail.lightxml b/tests/auto/testlib/selftests/expected_expectfail.lightxml index ad3b54d668..7c91656b89 100644 --- a/tests/auto/testlib/selftests/expected_expectfail.lightxml +++ b/tests/auto/testlib/selftests/expected_expectfail.lightxml @@ -116,11 +116,11 @@ - + - + diff --git a/tests/auto/testlib/selftests/expected_expectfail.tap b/tests/auto/testlib/selftests/expected_expectfail.tap index 02ce53d878..2ad422b7f9 100644 --- a/tests/auto/testlib/selftests/expected_expectfail.tap +++ b/tests/auto/testlib/selftests/expected_expectfail.tap @@ -79,16 +79,10 @@ not ok 16 - xfailOnAnyRow(second row) # TODO This test should xfail not ok 17 - xfailWithoutVerify(first row) --- # QEXPECT_FAIL was called without any subsequent verification statements - at: tst_ExpectFail::xfailWithoutVerify() (Unknown File:0) - file: Unknown File - line: 0 ... not ok 18 - xfailWithoutVerify(second row) --- # QEXPECT_FAIL was called without any subsequent verification statements - at: tst_ExpectFail::xfailWithoutVerify() (Unknown File:0) - file: Unknown File - line: 0 ... ok 19 - xpass() # TODO 'true' returned TRUE unexpectedly. () ok 20 - xpassDataDrivenWithQVerify(XPass) # TODO 'true' returned TRUE unexpectedly. () diff --git a/tests/auto/testlib/selftests/expected_expectfail.teamcity b/tests/auto/testlib/selftests/expected_expectfail.teamcity index 8de1e3b408..cac2c34491 100644 --- a/tests/auto/testlib/selftests/expected_expectfail.teamcity +++ b/tests/auto/testlib/selftests/expected_expectfail.teamcity @@ -42,10 +42,10 @@ ##teamcity[testStdOut name='xfailOnAnyRow(second row)' out='XFAIL |[Loc: qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(0)|]: This test should xfail' flowId='tst_ExpectFail'] ##teamcity[testFinished name='xfailOnAnyRow(second row)' flowId='tst_ExpectFail'] ##teamcity[testStarted name='xfailWithoutVerify(first row)' flowId='tst_ExpectFail'] -##teamcity[testFailed name='xfailWithoutVerify(first row)' message='Failure! |[Loc: Unknown File(0)|]' details='QEXPECT_FAIL was called without any subsequent verification statements' flowId='tst_ExpectFail'] +##teamcity[testFailed name='xfailWithoutVerify(first row)' message='Failure!' details='QEXPECT_FAIL was called without any subsequent verification statements' flowId='tst_ExpectFail'] ##teamcity[testFinished name='xfailWithoutVerify(first row)' flowId='tst_ExpectFail'] ##teamcity[testStarted name='xfailWithoutVerify(second row)' flowId='tst_ExpectFail'] -##teamcity[testFailed name='xfailWithoutVerify(second row)' message='Failure! |[Loc: Unknown File(0)|]' details='QEXPECT_FAIL was called without any subsequent verification statements' flowId='tst_ExpectFail'] +##teamcity[testFailed name='xfailWithoutVerify(second row)' message='Failure!' details='QEXPECT_FAIL was called without any subsequent verification statements' flowId='tst_ExpectFail'] ##teamcity[testFinished name='xfailWithoutVerify(second row)' flowId='tst_ExpectFail'] ##teamcity[testStarted name='xpass()' flowId='tst_ExpectFail'] ##teamcity[testFailed name='xpass()' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(0)|]' details='|'true|' returned TRUE unexpectedly. ()' flowId='tst_ExpectFail'] diff --git a/tests/auto/testlib/selftests/expected_expectfail.txt b/tests/auto/testlib/selftests/expected_expectfail.txt index fed3c451c2..75d41e5733 100644 --- a/tests/auto/testlib/selftests/expected_expectfail.txt +++ b/tests/auto/testlib/selftests/expected_expectfail.txt @@ -41,9 +41,7 @@ XFAIL : tst_ExpectFail::xfailOnAnyRow(second row) This test should xfail Loc: [qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(0)] PASS : tst_ExpectFail::xfailOnAnyRow(second row) FAIL! : tst_ExpectFail::xfailWithoutVerify(first row) QEXPECT_FAIL was called without any subsequent verification statements - Loc: [Unknown File(0)] FAIL! : tst_ExpectFail::xfailWithoutVerify(second row) QEXPECT_FAIL was called without any subsequent verification statements - Loc: [Unknown File(0)] XPASS : tst_ExpectFail::xpass() 'true' returned TRUE unexpectedly. () Loc: [qtbase/tests/auto/testlib/selftests/expectfail/tst_expectfail.cpp(0)] XPASS : tst_ExpectFail::xpassDataDrivenWithQVerify(XPass) 'true' returned TRUE unexpectedly. () diff --git a/tests/auto/testlib/selftests/expected_expectfail.xml b/tests/auto/testlib/selftests/expected_expectfail.xml index 48c53804cc..ccfd942c92 100644 --- a/tests/auto/testlib/selftests/expected_expectfail.xml +++ b/tests/auto/testlib/selftests/expected_expectfail.xml @@ -118,11 +118,11 @@ - + - + diff --git a/tests/auto/testlib/selftests/expected_faildatatype.lightxml b/tests/auto/testlib/selftests/expected_faildatatype.lightxml index 24992b78af..e5a843d952 100644 --- a/tests/auto/testlib/selftests/expected_faildatatype.lightxml +++ b/tests/auto/testlib/selftests/expected_faildatatype.lightxml @@ -14,7 +14,7 @@ - + diff --git a/tests/auto/testlib/selftests/expected_faildatatype.tap b/tests/auto/testlib/selftests/expected_faildatatype.tap index 684cea4126..4db7f717b5 100644 --- a/tests/auto/testlib/selftests/expected_faildatatype.tap +++ b/tests/auto/testlib/selftests/expected_faildatatype.tap @@ -6,8 +6,8 @@ ok 1 - initTestCase() not ok 2 - value() --- # Received a fatal error. - at: tst_FailDataType::value() (Unknown file:0) - file: Unknown file + at: tst_FailDataType::value() (qtbase/src/testlib/qtestdata.cpp:0) + file: qtbase/src/testlib/qtestdata.cpp line: 0 ... 1..2 diff --git a/tests/auto/testlib/selftests/expected_faildatatype.teamcity b/tests/auto/testlib/selftests/expected_faildatatype.teamcity index 82731ae09e..907c728805 100644 --- a/tests/auto/testlib/selftests/expected_faildatatype.teamcity +++ b/tests/auto/testlib/selftests/expected_faildatatype.teamcity @@ -2,7 +2,7 @@ ##teamcity[testStarted name='initTestCase()' flowId='tst_FailDataType'] ##teamcity[testFinished name='initTestCase()' flowId='tst_FailDataType'] ##teamcity[testStarted name='value()' flowId='tst_FailDataType'] -##teamcity[testFailed name='value()' message='Failure! |[Loc: Unknown file(0)|]' details='Received a fatal error.' flowId='tst_FailDataType'] +##teamcity[testFailed name='value()' message='Failure! |[Loc: qtbase/src/testlib/qtestdata.cpp(0)|]' details='Received a fatal error.' flowId='tst_FailDataType'] ##teamcity[testStdOut name='value()' out='QDEBUG: expected data of type |'QString|', got |'bool|' for element 0 of data with tag |'bool-as-string|'|nQFATAL: ASSERT: "false" in file qtbase/src/testlib/qtestdata.cpp, line 0' flowId='tst_FailDataType'] ##teamcity[testFinished name='value()' flowId='tst_FailDataType'] ##teamcity[testSuiteFinished name='tst_FailDataType' flowId='tst_FailDataType'] diff --git a/tests/auto/testlib/selftests/expected_faildatatype.txt b/tests/auto/testlib/selftests/expected_faildatatype.txt index 4cfe3b7654..cdc40a4cb4 100644 --- a/tests/auto/testlib/selftests/expected_faildatatype.txt +++ b/tests/auto/testlib/selftests/expected_faildatatype.txt @@ -4,6 +4,6 @@ PASS : tst_FailDataType::initTestCase() QDEBUG : tst_FailDataType::value() expected data of type 'QString', got 'bool' for element 0 of data with tag 'bool-as-string' QFATAL : tst_FailDataType::value() ASSERT: "false" in file qtbase/src/testlib/qtestdata.cpp, line 0 FAIL! : tst_FailDataType::value() Received a fatal error. - Loc: [Unknown file(0)] + Loc: [qtbase/src/testlib/qtestdata.cpp(0)] Totals: 1 passed, 1 failed, 0 skipped, 0 blacklisted, 0ms ********* Finished testing of tst_FailDataType ********* diff --git a/tests/auto/testlib/selftests/expected_faildatatype.xml b/tests/auto/testlib/selftests/expected_faildatatype.xml index 8812bfab71..59a43738de 100644 --- a/tests/auto/testlib/selftests/expected_faildatatype.xml +++ b/tests/auto/testlib/selftests/expected_faildatatype.xml @@ -16,7 +16,7 @@ - + diff --git a/tests/auto/testlib/selftests/expected_failfetchtype.lightxml b/tests/auto/testlib/selftests/expected_failfetchtype.lightxml index f7c84a1876..5d7d722802 100644 --- a/tests/auto/testlib/selftests/expected_failfetchtype.lightxml +++ b/tests/auto/testlib/selftests/expected_failfetchtype.lightxml @@ -12,7 +12,7 @@ - + diff --git a/tests/auto/testlib/selftests/expected_failfetchtype.tap b/tests/auto/testlib/selftests/expected_failfetchtype.tap index 94c3b6e1b2..3e23f3a54f 100644 --- a/tests/auto/testlib/selftests/expected_failfetchtype.tap +++ b/tests/auto/testlib/selftests/expected_failfetchtype.tap @@ -5,9 +5,6 @@ ok 1 - initTestCase() not ok 2 - fetch(bool) --- # Received a fatal error. - at: tst_FailFetchType::fetch() (Unknown file:0) - file: Unknown file - line: 0 ... 1..2 # tests 2 diff --git a/tests/auto/testlib/selftests/expected_failfetchtype.teamcity b/tests/auto/testlib/selftests/expected_failfetchtype.teamcity index 91cf0c6ae8..e79c399b7c 100644 --- a/tests/auto/testlib/selftests/expected_failfetchtype.teamcity +++ b/tests/auto/testlib/selftests/expected_failfetchtype.teamcity @@ -2,7 +2,7 @@ ##teamcity[testStarted name='initTestCase()' flowId='tst_FailFetchType'] ##teamcity[testFinished name='initTestCase()' flowId='tst_FailFetchType'] ##teamcity[testStarted name='fetch(bool)' flowId='tst_FailFetchType'] -##teamcity[testFailed name='fetch(bool)' message='Failure! |[Loc: Unknown file(0)|]' details='Received a fatal error.' flowId='tst_FailFetchType'] +##teamcity[testFailed name='fetch(bool)' message='Failure!' details='Received a fatal error.' flowId='tst_FailFetchType'] ##teamcity[testStdOut name='fetch(bool)' out='QFATAL: Requested type |'QString|' does not match available type |'bool|'.' flowId='tst_FailFetchType'] ##teamcity[testFinished name='fetch(bool)' flowId='tst_FailFetchType'] ##teamcity[testSuiteFinished name='tst_FailFetchType' flowId='tst_FailFetchType'] diff --git a/tests/auto/testlib/selftests/expected_failfetchtype.txt b/tests/auto/testlib/selftests/expected_failfetchtype.txt index d12cf0dc7d..21b6322159 100644 --- a/tests/auto/testlib/selftests/expected_failfetchtype.txt +++ b/tests/auto/testlib/selftests/expected_failfetchtype.txt @@ -3,6 +3,5 @@ Config: Using QtTest library PASS : tst_FailFetchType::initTestCase() QFATAL : tst_FailFetchType::fetch(bool) Requested type 'QString' does not match available type 'bool'. FAIL! : tst_FailFetchType::fetch(bool) Received a fatal error. - Loc: [Unknown file(0)] Totals: 1 passed, 1 failed, 0 skipped, 0 blacklisted, 0ms ********* Finished testing of tst_FailFetchType ********* diff --git a/tests/auto/testlib/selftests/expected_failfetchtype.xml b/tests/auto/testlib/selftests/expected_failfetchtype.xml index a349baa710..034ac789ca 100644 --- a/tests/auto/testlib/selftests/expected_failfetchtype.xml +++ b/tests/auto/testlib/selftests/expected_failfetchtype.xml @@ -14,7 +14,7 @@ - + diff --git a/tests/auto/testlib/selftests/expected_fetchbogus.lightxml b/tests/auto/testlib/selftests/expected_fetchbogus.lightxml index b586fa9c29..a7c601169d 100644 --- a/tests/auto/testlib/selftests/expected_fetchbogus.lightxml +++ b/tests/auto/testlib/selftests/expected_fetchbogus.lightxml @@ -12,7 +12,7 @@ - + diff --git a/tests/auto/testlib/selftests/expected_fetchbogus.tap b/tests/auto/testlib/selftests/expected_fetchbogus.tap index c6761b2301..895e247423 100644 --- a/tests/auto/testlib/selftests/expected_fetchbogus.tap +++ b/tests/auto/testlib/selftests/expected_fetchbogus.tap @@ -5,9 +5,6 @@ ok 1 - initTestCase() not ok 2 - fetchBogus(foo) --- # Received a fatal error. - at: tst_FetchBogus::fetchBogus() (Unknown file:0) - file: Unknown file - line: 0 ... 1..2 # tests 2 diff --git a/tests/auto/testlib/selftests/expected_fetchbogus.teamcity b/tests/auto/testlib/selftests/expected_fetchbogus.teamcity index 6fa9c833fb..d868f19147 100644 --- a/tests/auto/testlib/selftests/expected_fetchbogus.teamcity +++ b/tests/auto/testlib/selftests/expected_fetchbogus.teamcity @@ -2,7 +2,7 @@ ##teamcity[testStarted name='initTestCase()' flowId='tst_FetchBogus'] ##teamcity[testFinished name='initTestCase()' flowId='tst_FetchBogus'] ##teamcity[testStarted name='fetchBogus(foo)' flowId='tst_FetchBogus'] -##teamcity[testFailed name='fetchBogus(foo)' message='Failure! |[Loc: Unknown file(0)|]' details='Received a fatal error.' flowId='tst_FetchBogus'] +##teamcity[testFailed name='fetchBogus(foo)' message='Failure!' details='Received a fatal error.' flowId='tst_FetchBogus'] ##teamcity[testStdOut name='fetchBogus(foo)' out='QFATAL: QFETCH: Requested testdata |'bubu|' not available, check your _data function.' flowId='tst_FetchBogus'] ##teamcity[testFinished name='fetchBogus(foo)' flowId='tst_FetchBogus'] ##teamcity[testSuiteFinished name='tst_FetchBogus' flowId='tst_FetchBogus'] diff --git a/tests/auto/testlib/selftests/expected_fetchbogus.txt b/tests/auto/testlib/selftests/expected_fetchbogus.txt index 94c7cca223..239c9888d8 100644 --- a/tests/auto/testlib/selftests/expected_fetchbogus.txt +++ b/tests/auto/testlib/selftests/expected_fetchbogus.txt @@ -3,6 +3,5 @@ Config: Using QtTest library PASS : tst_FetchBogus::initTestCase() QFATAL : tst_FetchBogus::fetchBogus(foo) QFETCH: Requested testdata 'bubu' not available, check your _data function. FAIL! : tst_FetchBogus::fetchBogus(foo) Received a fatal error. - Loc: [Unknown file(0)] Totals: 1 passed, 1 failed, 0 skipped, 0 blacklisted, 0ms ********* Finished testing of tst_FetchBogus ********* diff --git a/tests/auto/testlib/selftests/expected_fetchbogus.xml b/tests/auto/testlib/selftests/expected_fetchbogus.xml index 38ffa2fa7a..c0bec35dd5 100644 --- a/tests/auto/testlib/selftests/expected_fetchbogus.xml +++ b/tests/auto/testlib/selftests/expected_fetchbogus.xml @@ -14,7 +14,7 @@ - + diff --git a/tests/auto/testlib/selftests/expected_silent.lightxml b/tests/auto/testlib/selftests/expected_silent.lightxml index 29b582cb4b..ad07180bd6 100644 --- a/tests/auto/testlib/selftests/expected_silent.lightxml +++ b/tests/auto/testlib/selftests/expected_silent.lightxml @@ -58,7 +58,7 @@ - + diff --git a/tests/auto/testlib/selftests/expected_silent.tap b/tests/auto/testlib/selftests/expected_silent.tap index 74a0c46e68..5970f4a058 100644 --- a/tests/auto/testlib/selftests/expected_silent.tap +++ b/tests/auto/testlib/selftests/expected_silent.tap @@ -32,8 +32,8 @@ ok 6 - xpass() # TODO 'true' returned TRUE unexpectedly. (This test should XPASS not ok 7 - messages() --- # Received a fatal error. - at: tst_Silent::messages() (Unknown file:0) - file: Unknown file + at: tst_Silent::messages() (qtbase/tests/auto/testlib/selftests/silent/tst_silent.cpp:0) + file: qtbase/tests/auto/testlib/selftests/silent/tst_silent.cpp line: 0 ... 1..7 diff --git a/tests/auto/testlib/selftests/expected_silent.teamcity b/tests/auto/testlib/selftests/expected_silent.teamcity index 327d667fee..a8b90b296a 100644 --- a/tests/auto/testlib/selftests/expected_silent.teamcity +++ b/tests/auto/testlib/selftests/expected_silent.teamcity @@ -6,7 +6,7 @@ ##teamcity[testFailed name='xpass()' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/silent/tst_silent.cpp(0)|]' details='|'true|' returned TRUE unexpectedly. (This test should XPASS)' flowId='tst_Silent'] ##teamcity[testFinished name='xpass()' flowId='tst_Silent'] ##teamcity[testStarted name='messages()' flowId='tst_Silent'] -##teamcity[testFailed name='messages()' message='Failure! |[Loc: Unknown file(0)|]' details='Received a fatal error.' flowId='tst_Silent'] +##teamcity[testFailed name='messages()' message='Failure! |[Loc: qtbase/tests/auto/testlib/selftests/silent/tst_silent.cpp(0)|]' details='Received a fatal error.' flowId='tst_Silent'] ##teamcity[testStdOut name='messages()' out='QFATAL: This is a fatal error message that should still appear in silent test output' flowId='tst_Silent'] ##teamcity[testFinished name='messages()' flowId='tst_Silent'] ##teamcity[testSuiteFinished name='tst_Silent' flowId='tst_Silent'] diff --git a/tests/auto/testlib/selftests/expected_silent.txt b/tests/auto/testlib/selftests/expected_silent.txt index b70a97dbac..efa1c985dc 100644 --- a/tests/auto/testlib/selftests/expected_silent.txt +++ b/tests/auto/testlib/selftests/expected_silent.txt @@ -5,5 +5,5 @@ XPASS : tst_Silent::xpass() 'true' returned TRUE unexpectedly. (This test shoul Loc: [qtbase/tests/auto/testlib/selftests/silent/tst_silent.cpp(0)] QFATAL : tst_Silent::messages() This is a fatal error message that should still appear in silent test output FAIL! : tst_Silent::messages() Received a fatal error. - Loc: [Unknown file(0)] + Loc: [qtbase/tests/auto/testlib/selftests/silent/tst_silent.cpp(0)] Totals: 3 passed, 3 failed, 1 skipped, 0 blacklisted, 0ms diff --git a/tests/auto/testlib/selftests/expected_silent.xml b/tests/auto/testlib/selftests/expected_silent.xml index 6d2fae9fab..6c3ffc3e62 100644 --- a/tests/auto/testlib/selftests/expected_silent.xml +++ b/tests/auto/testlib/selftests/expected_silent.xml @@ -60,7 +60,7 @@ - + diff --git a/tests/auto/testlib/selftests/expected_warnings.lightxml b/tests/auto/testlib/selftests/expected_warnings.lightxml index 5e77f9ce10..9d5a106500 100644 --- a/tests/auto/testlib/selftests/expected_warnings.lightxml +++ b/tests/auto/testlib/selftests/expected_warnings.lightxml @@ -48,7 +48,7 @@ - + @@ -57,7 +57,7 @@ - + @@ -71,7 +71,7 @@ - + @@ -83,7 +83,7 @@ - + diff --git a/tests/auto/testlib/selftests/expected_warnings.tap b/tests/auto/testlib/selftests/expected_warnings.tap index 56507cdb46..0e357cb770 100644 --- a/tests/auto/testlib/selftests/expected_warnings.tap +++ b/tests/auto/testlib/selftests/expected_warnings.tap @@ -17,35 +17,23 @@ ok 2 - testWarnings() not ok 3 - testMissingWarnings() --- # Not all expected messages were received - at: tst_Warnings::testMissingWarnings() (Unknown File:0) - file: Unknown File - line: 0 ... # Did not receive any message matching: "Warning\s\d" not ok 4 - testMissingWarningsRegularExpression() --- # Not all expected messages were received - at: tst_Warnings::testMissingWarningsRegularExpression() (Unknown File:0) - file: Unknown File - line: 0 ... # Did not receive message: "Warning0" # Did not receive message: "Warning1" not ok 5 - testMissingWarningsWithData(first row) --- # Not all expected messages were received - at: tst_Warnings::testMissingWarningsWithData() (Unknown File:0) - file: Unknown File - line: 0 ... # Did not receive message: "Warning0" # Did not receive message: "Warning1" not ok 6 - testMissingWarningsWithData(second row) --- # Not all expected messages were received - at: tst_Warnings::testMissingWarningsWithData() (Unknown File:0) - file: Unknown File - line: 0 ... ok 7 - cleanupTestCase() 1..7 diff --git a/tests/auto/testlib/selftests/expected_warnings.teamcity b/tests/auto/testlib/selftests/expected_warnings.teamcity index b3ce604380..5811beae4c 100644 --- a/tests/auto/testlib/selftests/expected_warnings.teamcity +++ b/tests/auto/testlib/selftests/expected_warnings.teamcity @@ -5,19 +5,19 @@ ##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! |[Loc: Unknown File(0)|]' details='Not all expected messages were received' 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! |[Loc: Unknown File(0)|]' details='Not all expected messages were received' 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! |[Loc: Unknown File(0)|]' details='Not all expected messages were received' 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! |[Loc: Unknown File(0)|]' details='Not all expected messages were received' 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'] diff --git a/tests/auto/testlib/selftests/expected_warnings.txt b/tests/auto/testlib/selftests/expected_warnings.txt index 21a03c3d5e..0a65213b79 100644 --- a/tests/auto/testlib/selftests/expected_warnings.txt +++ b/tests/auto/testlib/selftests/expected_warnings.txt @@ -15,18 +15,14 @@ PASS : tst_Warnings::testWarnings() INFO : tst_Warnings::testMissingWarnings() Did not receive message: "Warning0" INFO : tst_Warnings::testMissingWarnings() Did not receive message: "Warning1" FAIL! : tst_Warnings::testMissingWarnings() Not all expected messages were received - Loc: [Unknown File(0)] INFO : tst_Warnings::testMissingWarningsRegularExpression() Did not receive any message matching: "Warning\s\d" FAIL! : tst_Warnings::testMissingWarningsRegularExpression() Not all expected messages were received - Loc: [Unknown File(0)] INFO : tst_Warnings::testMissingWarningsWithData(first row) Did not receive message: "Warning0" INFO : tst_Warnings::testMissingWarningsWithData(first row) Did not receive message: "Warning1" FAIL! : tst_Warnings::testMissingWarningsWithData(first row) Not all expected messages were received - Loc: [Unknown File(0)] INFO : tst_Warnings::testMissingWarningsWithData(second row) Did not receive message: "Warning0" INFO : tst_Warnings::testMissingWarningsWithData(second row) Did not receive message: "Warning1" FAIL! : tst_Warnings::testMissingWarningsWithData(second row) Not all expected messages were received - Loc: [Unknown File(0)] PASS : tst_Warnings::cleanupTestCase() Totals: 3 passed, 4 failed, 0 skipped, 0 blacklisted, 0ms ********* Finished testing of tst_Warnings ********* diff --git a/tests/auto/testlib/selftests/expected_warnings.xml b/tests/auto/testlib/selftests/expected_warnings.xml index c4d0b2d0ea..1b17dbbf5d 100644 --- a/tests/auto/testlib/selftests/expected_warnings.xml +++ b/tests/auto/testlib/selftests/expected_warnings.xml @@ -50,7 +50,7 @@ - + @@ -59,7 +59,7 @@ - + @@ -73,7 +73,7 @@ - + @@ -85,7 +85,7 @@ - + diff --git a/tests/auto/testlib/selftests/expected_watchdog.lightxml b/tests/auto/testlib/selftests/expected_watchdog.lightxml index 1070324f2a..235f7a431e 100644 --- a/tests/auto/testlib/selftests/expected_watchdog.lightxml +++ b/tests/auto/testlib/selftests/expected_watchdog.lightxml @@ -11,7 +11,7 @@ - + diff --git a/tests/auto/testlib/selftests/expected_watchdog.tap b/tests/auto/testlib/selftests/expected_watchdog.tap index 3d4890b67e..9021c65bf4 100644 --- a/tests/auto/testlib/selftests/expected_watchdog.tap +++ b/tests/auto/testlib/selftests/expected_watchdog.tap @@ -5,9 +5,6 @@ ok 1 - initTestCase() not ok 2 - delay() --- # Received a fatal error. - at: tst_Watchdog::delay() (Unknown file:0) - file: Unknown file - line: 0 ... 1..2 # tests 2 diff --git a/tests/auto/testlib/selftests/expected_watchdog.teamcity b/tests/auto/testlib/selftests/expected_watchdog.teamcity index 0d77bf70d5..7d9a7857c3 100644 --- a/tests/auto/testlib/selftests/expected_watchdog.teamcity +++ b/tests/auto/testlib/selftests/expected_watchdog.teamcity @@ -2,7 +2,7 @@ ##teamcity[testStarted name='initTestCase()' flowId='tst_Watchdog'] ##teamcity[testFinished name='initTestCase()' flowId='tst_Watchdog'] ##teamcity[testStarted name='delay()' flowId='tst_Watchdog'] -##teamcity[testFailed name='delay()' message='Failure! |[Loc: Unknown file(0)|]' details='Received a fatal error.' flowId='tst_Watchdog'] +##teamcity[testFailed name='delay()' message='Failure!' details='Received a fatal error.' flowId='tst_Watchdog'] ##teamcity[testStdOut name='delay()' out='QFATAL: Test function timed out' flowId='tst_Watchdog'] ##teamcity[testFinished name='delay()' flowId='tst_Watchdog'] ##teamcity[testSuiteFinished name='tst_Watchdog' flowId='tst_Watchdog'] diff --git a/tests/auto/testlib/selftests/expected_watchdog.txt b/tests/auto/testlib/selftests/expected_watchdog.txt index 4c9cde4ea2..de92ca5928 100644 --- a/tests/auto/testlib/selftests/expected_watchdog.txt +++ b/tests/auto/testlib/selftests/expected_watchdog.txt @@ -3,6 +3,5 @@ Config: Using QtTest library PASS : tst_Watchdog::initTestCase() QFATAL : tst_Watchdog::delay() Test function timed out FAIL! : tst_Watchdog::delay() Received a fatal error. - Loc: [Unknown file(0)] Totals: 1 passed, 1 failed, 0 skipped, 0 blacklisted, 0ms ********* Finished testing of tst_Watchdog ********* diff --git a/tests/auto/testlib/selftests/expected_watchdog.xml b/tests/auto/testlib/selftests/expected_watchdog.xml index f1642fba79..6d702131a5 100644 --- a/tests/auto/testlib/selftests/expected_watchdog.xml +++ b/tests/auto/testlib/selftests/expected_watchdog.xml @@ -13,7 +13,7 @@ - +