From d60007744bbc1cd90dcf97461a5b2fb237a82d17 Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Tue, 20 Sep 2011 10:39:58 +1000 Subject: Remove waitwithoutgui testlib selftest This test is not useful for finding bugs in qtestlib's logging code, because it bypasses the qtestlib loggers and doesn't play nice with tst_selftest. Neither is this test very useful for finding bugs in QTest::qWait(), as the test only proves the qWait() terminates, not that it waits accurately, or even that it waits at all. Change-Id: Ia5dd7cbaf3a6fbb4e94e54ed155263580e495694 Reviewed-on: http://codereview.qt-project.org/5173 Reviewed-by: Qt Sanity Bot Reviewed-by: Rohan McGovern --- .../selftests/expected_waitwithoutgui.lightxml | 0 .../testlib/selftests/expected_waitwithoutgui.txt | 2 - .../testlib/selftests/expected_waitwithoutgui.xml | 0 .../selftests/expected_waitwithoutgui.xunitxml | 0 tests/auto/testlib/selftests/selftests.pro | 2 +- tests/auto/testlib/selftests/selftests.qrc | 4 -- tests/auto/testlib/selftests/tst_selftests.cpp | 4 -- .../waitwithoutgui/tst_waitwithoutgui.cpp | 62 ---------------------- .../selftests/waitwithoutgui/waitwithoutgui.pro | 13 ----- 9 files changed, 1 insertion(+), 86 deletions(-) delete mode 100644 tests/auto/testlib/selftests/expected_waitwithoutgui.lightxml delete mode 100644 tests/auto/testlib/selftests/expected_waitwithoutgui.txt delete mode 100644 tests/auto/testlib/selftests/expected_waitwithoutgui.xml delete mode 100644 tests/auto/testlib/selftests/expected_waitwithoutgui.xunitxml delete mode 100644 tests/auto/testlib/selftests/waitwithoutgui/tst_waitwithoutgui.cpp delete mode 100644 tests/auto/testlib/selftests/waitwithoutgui/waitwithoutgui.pro diff --git a/tests/auto/testlib/selftests/expected_waitwithoutgui.lightxml b/tests/auto/testlib/selftests/expected_waitwithoutgui.lightxml deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/auto/testlib/selftests/expected_waitwithoutgui.txt b/tests/auto/testlib/selftests/expected_waitwithoutgui.txt deleted file mode 100644 index a1691071a0..0000000000 --- a/tests/auto/testlib/selftests/expected_waitwithoutgui.txt +++ /dev/null @@ -1,2 +0,0 @@ -We just output something such that there's a baseline to compare against. -Finished waiting! diff --git a/tests/auto/testlib/selftests/expected_waitwithoutgui.xml b/tests/auto/testlib/selftests/expected_waitwithoutgui.xml deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/auto/testlib/selftests/expected_waitwithoutgui.xunitxml b/tests/auto/testlib/selftests/expected_waitwithoutgui.xunitxml deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/auto/testlib/selftests/selftests.pro b/tests/auto/testlib/selftests/selftests.pro index 2f1c327e34..27a6d5d3f4 100644 --- a/tests/auto/testlib/selftests/selftests.pro +++ b/tests/auto/testlib/selftests/selftests.pro @@ -2,7 +2,7 @@ TEMPLATE = subdirs SUBDIRS = subtest test warnings maxwarnings cmptest globaldata skipglobal skip \ strcmp expectfail sleep fetchbogus crashes multiexec failinit failinitdata \ - skipinit skipinitdata datetime singleskip assert waitwithoutgui differentexec \ + skipinit skipinitdata datetime singleskip assert differentexec \ exceptionthrow qexecstringlist datatable commandlinedata\ benchlibwalltime benchlibcallgrind benchlibeventcounter benchlibtickcounter \ benchliboptions xunit badxml longstring diff --git a/tests/auto/testlib/selftests/selftests.qrc b/tests/auto/testlib/selftests/selftests.qrc index f82722b0e2..77b4d213c0 100644 --- a/tests/auto/testlib/selftests/selftests.qrc +++ b/tests/auto/testlib/selftests/selftests.qrc @@ -122,10 +122,6 @@ expected_subtest.txt expected_subtest.xml expected_subtest.xunitxml - expected_waitwithoutgui.lightxml - expected_waitwithoutgui.txt - expected_waitwithoutgui.xml - expected_waitwithoutgui.xunitxml expected_warnings.lightxml expected_warnings.txt expected_warnings.xml diff --git a/tests/auto/testlib/selftests/tst_selftests.cpp b/tests/auto/testlib/selftests/tst_selftests.cpp index fcf1b05c58..9c9d281478 100644 --- a/tests/auto/testlib/selftests/tst_selftests.cpp +++ b/tests/auto/testlib/selftests/tst_selftests.cpp @@ -210,7 +210,6 @@ void tst_Selftests::runSubTest_data() << "assert" #endif - << "waitwithoutgui" << "differentexec" #ifndef QT_NO_EXCEPTIONS // The machine that run the intel autotests will popup a dialog @@ -282,9 +281,6 @@ void tst_Selftests::runSubTest_data() if (subtest == "benchliboptions") { continue; } - if (subtest == "waitwithoutgui") { - continue; - } // `crashes' will not output valid XML on platforms without a crash handler if (subtest == "crashes") { continue; diff --git a/tests/auto/testlib/selftests/waitwithoutgui/tst_waitwithoutgui.cpp b/tests/auto/testlib/selftests/waitwithoutgui/tst_waitwithoutgui.cpp deleted file mode 100644 index 9c0bb862b3..0000000000 --- a/tests/auto/testlib/selftests/waitwithoutgui/tst_waitwithoutgui.cpp +++ /dev/null @@ -1,62 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the test suite of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - - -#include -#include -#include - -int main(int argc, char **argv) -{ - QCoreApplication app(argc, argv); - - QTextStream out(stdout); - - out << "We just output something such that there's a baseline to compare against." << endl; - - /* Simply call qWait(). */ - QTest::qWait(100); - - out << "Finished waiting!" << endl; - - return 0; -} - diff --git a/tests/auto/testlib/selftests/waitwithoutgui/waitwithoutgui.pro b/tests/auto/testlib/selftests/waitwithoutgui/waitwithoutgui.pro deleted file mode 100644 index 6c28390da9..0000000000 --- a/tests/auto/testlib/selftests/waitwithoutgui/waitwithoutgui.pro +++ /dev/null @@ -1,13 +0,0 @@ -load(qttest_p4) - -# this is not a real testcase ('make check' should not run it) -CONFIG -= testcase - -QT -= gui -SOURCES += tst_waitwithoutgui.cpp - -mac:CONFIG -= app_bundle -CONFIG -= debug_and_release_target - - -TARGET = waitwithoutgui -- cgit v1.2.3