summaryrefslogtreecommitdiff
path: root/tests/auto/qnmeasatelliteinfosource/generic_simulation/tst_nmeasatelliteinfosource_generic_sim.cpp
diff options
context:
space:
mode:
authorIvan Solovev <ivan.solovev@qt.io>2021-10-21 17:27:08 +0200
committerIvan Solovev <ivan.solovev@qt.io>2021-11-02 09:46:33 +0200
commit6db775f6d9d72cf8ee9d66333b8424e74be1e352 (patch)
tree0a293756b61619a91970d9368a0449b7bf922728 /tests/auto/qnmeasatelliteinfosource/generic_simulation/tst_nmeasatelliteinfosource_generic_sim.cpp
parent5a1f44c3d41febca8480c077bd4c34e5a3332cdc (diff)
downloadqtlocation-6.2.2.tar.gz
Remove QtPositioning module from qtlocation.git6.2.46.2.36.2.26.2
Turns out that our CI does not support repos without any tests. This is treated like an error and leads to integration failure. This patch fixes it by disabling tests in coin/module_config.yaml. This config should be fixed when QtLocation tests are enabled Task-number: QTBUG-97084 Change-Id: Ib06e865fe2836806bbbee34345f06b471dd48660 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alex Blasche <alexander.blasche@qt.io> (cherry picked from commit 23f32792ad53e23bbafbff6d7667f0bb0f69fc53)
Diffstat (limited to 'tests/auto/qnmeasatelliteinfosource/generic_simulation/tst_nmeasatelliteinfosource_generic_sim.cpp')
-rw-r--r--tests/auto/qnmeasatelliteinfosource/generic_simulation/tst_nmeasatelliteinfosource_generic_sim.cpp95
1 files changed, 0 insertions, 95 deletions
diff --git a/tests/auto/qnmeasatelliteinfosource/generic_simulation/tst_nmeasatelliteinfosource_generic_sim.cpp b/tests/auto/qnmeasatelliteinfosource/generic_simulation/tst_nmeasatelliteinfosource_generic_sim.cpp
deleted file mode 100644
index 3b80bf05..00000000
--- a/tests/auto/qnmeasatelliteinfosource/generic_simulation/tst_nmeasatelliteinfosource_generic_sim.cpp
+++ /dev/null
@@ -1,95 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2021 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 <QTest>
-#include <QtPositioning/QNmeaSatelliteInfoSource>
-#include "../../qgeosatelliteinfosource/testqgeosatelliteinfosource_p.h"
-#include "../../utils/qlocationtestutils_p.h"
-
-class UnlimitedNmeaStream : public QIODevice
-{
- Q_OBJECT
-
-public:
- UnlimitedNmeaStream(QObject *parent) : QIODevice(parent) {}
-
-protected:
- qint64 readData(char *data, qint64 maxSize) override
- {
- if (maxSize == 0)
- return 0;
- QByteArray bytes;
- if (genSatInView) {
- increaseSatId();
- bytes = QLocationTestUtils::createGsvVariableSentence(satId).toLatin1();
- } else {
- bytes = QLocationTestUtils::createGsaVariableSentence(satId).toLatin1();
- }
- genSatInView = !genSatInView;
- qint64 sz = qMin(qint64(bytes.size()), maxSize);
- memcpy(data, bytes.constData(), sz);
- return sz;
- }
-
- qint64 writeData(const char *, qint64) override
- {
- return -1;
- }
-
- qint64 bytesAvailable() const override
- {
- return 1024 + QIODevice::bytesAvailable();
- }
-
-private:
- void increaseSatId()
- {
- if (++satId == 0)
- satId = 1;
- }
-
- quint8 satId = 0;
- bool genSatInView = true;
-};
-
-class tst_QNmeaSatelliteInfoSource_Generic_Simulation : public TestQGeoSatelliteInfoSource
-{
- Q_OBJECT
-protected:
- QGeoSatelliteInfoSource *createTestSource() override
- {
- QNmeaSatelliteInfoSource *source =
- new QNmeaSatelliteInfoSource(QNmeaSatelliteInfoSource::UpdateMode::SimulationMode);
- source->setDevice(new UnlimitedNmeaStream(source));
- return source;
- }
-};
-
-#include "tst_nmeasatelliteinfosource_generic_sim.moc"
-
-QTEST_GUILESS_MAIN(tst_QNmeaSatelliteInfoSource_Generic_Simulation)