diff options
author | Rohan McGovern <rohan.mcgovern@nokia.com> | 2009-07-14 07:02:35 (GMT) |
---|---|---|
committer | Rohan McGovern <rohan.mcgovern@nokia.com> | 2009-07-15 22:47:56 (GMT) |
commit | 1b5f6836ffeda29925bb7f3a65b68c53341fdc91 (patch) | |
tree | a7e90241b3a06f2918d312fb950c8fcca6493bf3 /tests/auto/selftests/tst_selftests.cpp | |
parent | 4a2471196122a095481f1e0cc6b7b9b2d3027592 (diff) | |
download | Qt-1b5f6836ffeda29925bb7f3a65b68c53341fdc91.zip Qt-1b5f6836ffeda29925bb7f3a65b68c53341fdc91.tar.gz Qt-1b5f6836ffeda29925bb7f3a65b68c53341fdc91.tar.bz2 |
Use Unix signal handlers to properly close the test log when a test is
terminated by a signal.
The new XML testloggers in Qt 4.6 only output a testlog after the test
completes. Therefore, if a test crashes, no testlog will be output at
all. This is a functional regression from Qt 4.5 and earlier where the
testlog would be output up to the point where the crash occurred.
This is a Unix-specific fix for this problem.
This change is also useful for hanging tests; if the test is killed
with SIGTERM it will output the test log up to the current test before
it exits.
Diffstat (limited to 'tests/auto/selftests/tst_selftests.cpp')
-rw-r--r-- | tests/auto/selftests/tst_selftests.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/auto/selftests/tst_selftests.cpp b/tests/auto/selftests/tst_selftests.cpp index ba17ccb..8eb7fe1 100644 --- a/tests/auto/selftests/tst_selftests.cpp +++ b/tests/auto/selftests/tst_selftests.cpp @@ -297,7 +297,9 @@ void tst_Selftests::runSubTest() void tst_Selftests::initTestCase() { - m_checkXMLBlacklist.append("crashes"); // This test crashes +#ifndef Q_OS_UNIX + m_checkXMLBlacklist.append("crashes"); // This test crashes (XML valid on Unix only) +#endif m_checkXMLBlacklist.append("waitwithoutgui"); // This test is not a QTestLib test. /* Output from several tests is broken with the XML output method, |