summaryrefslogtreecommitdiffstats
path: root/tests/auto/testlib
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2020-03-11 01:00:56 +0100
committerSona Kurazyan <sona.kurazyan@qt.io>2020-03-11 15:34:21 +0100
commit865afac25036d58b18794384e37d42931b2164c5 (patch)
treee18d31138f1a8b9200764fd3648e58b9dd6b124f /tests/auto/testlib
parent01bacdf7abb071198d843acdfb22ce1701766be8 (diff)
parent52de905d0ec6159d3a1e7ad63fed018b5c6973d2 (diff)
Merge remote-tracking branch 'origin/5.15' into dev
Diffstat (limited to 'tests/auto/testlib')
-rw-r--r--tests/auto/testlib/selftests/expected_pass.junitxml14
-rw-r--r--tests/auto/testlib/selftests/expected_pass.lightxml26
-rw-r--r--tests/auto/testlib/selftests/expected_pass.tap11
-rw-r--r--tests/auto/testlib/selftests/expected_pass.teamcity12
-rw-r--r--tests/auto/testlib/selftests/expected_pass.txt9
-rw-r--r--tests/auto/testlib/selftests/expected_pass.xml29
-rw-r--r--tests/auto/testlib/selftests/pass/pass.pro9
-rw-r--r--tests/auto/testlib/selftests/pass/tst_pass.cpp56
-rw-r--r--tests/auto/testlib/selftests/selftests.pri1
-rw-r--r--tests/auto/testlib/selftests/tst_selftests.cpp5
10 files changed, 170 insertions, 2 deletions
diff --git a/tests/auto/testlib/selftests/expected_pass.junitxml b/tests/auto/testlib/selftests/expected_pass.junitxml
new file mode 100644
index 0000000000..b148593bd0
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_pass.junitxml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<testsuite errors="0" failures="0" tests="5" name="tst_Pass">
+ <properties>
+ <property value="@INSERT_QT_VERSION_HERE@" name="QTestVersion"/>
+ <property value="@INSERT_QT_VERSION_HERE@" name="QtVersion"/>
+ <property value="" name="QtBuild"/>
+ </properties>
+ <testcase result="pass" name="initTestCase"/>
+ <testcase result="pass" name="testNumber1"/>
+ <testcase result="pass" name="testNumber2"/>
+ <testcase result="pass" name="testNumber3"/>
+ <testcase result="pass" name="cleanupTestCase"/>
+ <system-err/>
+</testsuite>
diff --git a/tests/auto/testlib/selftests/expected_pass.lightxml b/tests/auto/testlib/selftests/expected_pass.lightxml
new file mode 100644
index 0000000000..4d344e93cf
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_pass.lightxml
@@ -0,0 +1,26 @@
+<Environment>
+ <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion>
+ <QtBuild/>
+ <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion>
+</Environment>
+<TestFunction name="initTestCase">
+<Incident type="pass" file="" line="0" />
+ <Duration msecs="0"/>
+</TestFunction>
+<TestFunction name="testNumber1">
+<Incident type="pass" file="" line="0" />
+ <Duration msecs="0"/>
+</TestFunction>
+<TestFunction name="testNumber2">
+<Incident type="pass" file="" line="0" />
+ <Duration msecs="0"/>
+</TestFunction>
+<TestFunction name="testNumber3">
+<Incident type="pass" file="" line="0" />
+ <Duration msecs="0"/>
+</TestFunction>
+<TestFunction name="cleanupTestCase">
+<Incident type="pass" file="" line="0" />
+ <Duration msecs="0"/>
+</TestFunction>
+<Duration msecs="0"/>
diff --git a/tests/auto/testlib/selftests/expected_pass.tap b/tests/auto/testlib/selftests/expected_pass.tap
new file mode 100644
index 0000000000..a01755dc25
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_pass.tap
@@ -0,0 +1,11 @@
+TAP version 13
+# tst_Pass
+ok 1 - initTestCase()
+ok 2 - testNumber1()
+ok 3 - testNumber2()
+ok 4 - testNumber3()
+ok 5 - cleanupTestCase()
+1..5
+# tests 5
+# pass 5
+# fail 0
diff --git a/tests/auto/testlib/selftests/expected_pass.teamcity b/tests/auto/testlib/selftests/expected_pass.teamcity
new file mode 100644
index 0000000000..11dc666fb7
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_pass.teamcity
@@ -0,0 +1,12 @@
+##teamcity[testSuiteStarted name='tst_Pass' flowId='tst_Pass']
+##teamcity[testStarted name='initTestCase()' flowId='tst_Pass']
+##teamcity[testFinished name='initTestCase()' flowId='tst_Pass']
+##teamcity[testStarted name='testNumber1()' flowId='tst_Pass']
+##teamcity[testFinished name='testNumber1()' flowId='tst_Pass']
+##teamcity[testStarted name='testNumber2()' flowId='tst_Pass']
+##teamcity[testFinished name='testNumber2()' flowId='tst_Pass']
+##teamcity[testStarted name='testNumber3()' flowId='tst_Pass']
+##teamcity[testFinished name='testNumber3()' flowId='tst_Pass']
+##teamcity[testStarted name='cleanupTestCase()' flowId='tst_Pass']
+##teamcity[testFinished name='cleanupTestCase()' flowId='tst_Pass']
+##teamcity[testSuiteFinished name='tst_Pass' flowId='tst_Pass']
diff --git a/tests/auto/testlib/selftests/expected_pass.txt b/tests/auto/testlib/selftests/expected_pass.txt
new file mode 100644
index 0000000000..0d7265f970
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_pass.txt
@@ -0,0 +1,9 @@
+********* Start testing of tst_Pass *********
+Config: Using QtTest library
+PASS : tst_Pass::initTestCase()
+PASS : tst_Pass::testNumber1()
+PASS : tst_Pass::testNumber2()
+PASS : tst_Pass::testNumber3()
+PASS : tst_Pass::cleanupTestCase()
+Totals: 5 passed, 0 failed, 0 skipped, 0 blacklisted, 0ms
+********* Finished testing of tst_Pass *********
diff --git a/tests/auto/testlib/selftests/expected_pass.xml b/tests/auto/testlib/selftests/expected_pass.xml
new file mode 100644
index 0000000000..b221cb5411
--- /dev/null
+++ b/tests/auto/testlib/selftests/expected_pass.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<TestCase name="tst_Pass">
+<Environment>
+ <QtVersion>@INSERT_QT_VERSION_HERE@</QtVersion>
+ <QtBuild/>
+ <QTestVersion>@INSERT_QT_VERSION_HERE@</QTestVersion>
+</Environment>
+<TestFunction name="initTestCase">
+<Incident type="pass" file="" line="0" />
+ <Duration msecs="0"/>
+</TestFunction>
+<TestFunction name="testNumber1">
+<Incident type="pass" file="" line="0" />
+ <Duration msecs="0"/>
+</TestFunction>
+<TestFunction name="testNumber2">
+<Incident type="pass" file="" line="0" />
+ <Duration msecs="0"/>
+</TestFunction>
+<TestFunction name="testNumber3">
+<Incident type="pass" file="" line="0" />
+ <Duration msecs="0"/>
+</TestFunction>
+<TestFunction name="cleanupTestCase">
+<Incident type="pass" file="" line="0" />
+ <Duration msecs="0"/>
+</TestFunction>
+<Duration msecs="0"/>
+</TestCase>
diff --git a/tests/auto/testlib/selftests/pass/pass.pro b/tests/auto/testlib/selftests/pass/pass.pro
new file mode 100644
index 0000000000..dd00a1c744
--- /dev/null
+++ b/tests/auto/testlib/selftests/pass/pass.pro
@@ -0,0 +1,9 @@
+SOURCES += tst_pass.cpp
+QT = core testlib
+
+macos:CONFIG -= app_bundle
+CONFIG -= debug_and_release_target
+
+TARGET = pass
+
+include($$QT_SOURCE_TREE/src/testlib/selfcover.pri)
diff --git a/tests/auto/testlib/selftests/pass/tst_pass.cpp b/tests/auto/testlib/selftests/pass/tst_pass.cpp
new file mode 100644
index 0000000000..6fa5f6a209
--- /dev/null
+++ b/tests/auto/testlib/selftests/pass/tst_pass.cpp
@@ -0,0 +1,56 @@
+/****************************************************************************
+**
+** Copyright (C) 2020 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtCore/QCoreApplication>
+#include <QtTest/QtTest>
+
+class tst_Pass: public QObject
+{
+ Q_OBJECT
+
+private slots:
+ void testNumber1() const;
+ void testNumber2() const;
+ void testNumber3() const;
+};
+
+void tst_Pass::testNumber1() const
+{
+}
+
+void tst_Pass::testNumber2() const
+{
+}
+
+void tst_Pass::testNumber3() const
+{
+}
+
+QTEST_MAIN(tst_Pass)
+
+#include "tst_pass.moc"
diff --git a/tests/auto/testlib/selftests/selftests.pri b/tests/auto/testlib/selftests/selftests.pri
index 2cad0b7e17..b124b21981 100644
--- a/tests/auto/testlib/selftests/selftests.pri
+++ b/tests/auto/testlib/selftests/selftests.pri
@@ -31,6 +31,7 @@ SUBPROGRAMS = \
longstring \
maxwarnings \
multiexec \
+ pass \
pairdiagnostics \
printdatatags \
printdatatagswithglobaltags \
diff --git a/tests/auto/testlib/selftests/tst_selftests.cpp b/tests/auto/testlib/selftests/tst_selftests.cpp
index be64752ceb..cab6589984 100644
--- a/tests/auto/testlib/selftests/tst_selftests.cpp
+++ b/tests/auto/testlib/selftests/tst_selftests.cpp
@@ -422,9 +422,9 @@ void tst_Selftests::initTestCase()
{
QVERIFY2(tempDir.isValid(), qPrintable(tempDir.errorString()));
//Detect the location of the sub programs
- QString subProgram = QLatin1String("float/float");
+ QString subProgram = QLatin1String("pass/pass");
#if defined(Q_OS_WIN)
- subProgram = QLatin1String("float/float.exe");
+ subProgram = QLatin1String("pass/pass.exe");
#endif
QString testdataDir = QFINDTESTDATA(subProgram);
if (testdataDir.lastIndexOf(subProgram) > 0)
@@ -487,6 +487,7 @@ void tst_Selftests::runSubTest_data()
<< "longstring"
<< "maxwarnings"
<< "multiexec"
+ << "pass"
<< "pairdiagnostics"
<< "printdatatags"
<< "printdatatagswithglobaltags"