From df055acc81f555011524a79cae3509669bbd0b8b Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Sat, 25 Feb 2012 17:54:00 +0100 Subject: Fix selftests while using QStringBuilder Change-Id: I6dcd830b96023765447c9683fd95209d4312fb1b Reviewed-by: Jason McDonald --- tests/auto/testlib/selftests/tst_selftests.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/auto/testlib/selftests/tst_selftests.cpp') diff --git a/tests/auto/testlib/selftests/tst_selftests.cpp b/tests/auto/testlib/selftests/tst_selftests.cpp index decaa55386..7367d664b2 100644 --- a/tests/auto/testlib/selftests/tst_selftests.cpp +++ b/tests/auto/testlib/selftests/tst_selftests.cpp @@ -155,7 +155,7 @@ static inline QString logFormat(const QString &logger) // Return the log file name, or an empty string if the log goes to stdout. static inline QString logName(const QString &logger) { - return (logger.startsWith("stdout") ? "" : "test_output." + logger); + return (logger.startsWith("stdout") ? "" : QString("test_output." + logger)); } // Load the expected test output for the nominated test (subdir) and logger -- cgit v1.2.3 From cbc777374a26134e87054b2292a800d4b3835d82 Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Mon, 27 Feb 2012 16:31:03 +1000 Subject: testlib: Improve the silent logging mode Previously the silent logging mode suppressed passes, skips and internal testlib info messages, but did not suppress debugging output, making it hard to see the fails in a noisy test. This commit changes silent mode so that it suppresses all output except test failures and fatal errors, making silent mode truly useful for seeing just the important test output. This commit also adds a selftest to verify the behaviour of silent mode. Change-Id: I75420aead03682306210746a87e2a3b608b58fc6 Reviewed-by: Rohan McGovern --- tests/auto/testlib/selftests/tst_selftests.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tests/auto/testlib/selftests/tst_selftests.cpp') diff --git a/tests/auto/testlib/selftests/tst_selftests.cpp b/tests/auto/testlib/selftests/tst_selftests.cpp index 7367d664b2..2b90bdb389 100644 --- a/tests/auto/testlib/selftests/tst_selftests.cpp +++ b/tests/auto/testlib/selftests/tst_selftests.cpp @@ -354,6 +354,7 @@ void tst_Selftests::runSubTest_data() << "printdatatags" << "printdatatagswithglobaltags" << "qexecstringlist" + << "silent" << "singleskip" << "skip" << "skipcleanup" @@ -409,6 +410,9 @@ void tst_Selftests::runSubTest_data() else if (subtest == "printdatatagswithglobaltags") { arguments << "-datatags"; } + else if (subtest == "silent") { + arguments << "-silent"; + } // These tests don't work right unless logging plain text to @@ -434,6 +438,9 @@ void tst_Selftests::runSubTest_data() if (subtest == "printdatatagswithglobaltags") { continue; } + if (subtest == "silent") { + continue; + } // `crashes' will not output valid XML on platforms without a crash handler if (subtest == "crashes") { continue; -- cgit v1.2.3