[SCM] kdeconnect packaging branch, master, updated. debian/0.9g-1-1183-g9d69498

Maximiliano Curia maxy at moszumanska.debian.org
Fri Oct 14 14:29:44 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/kdeconnect.git;a=commitdiff;h=55c6014

The following commit has been merged in the master branch:
commit 55c60146862cc08ee567f369863dde04615fe34c
Author: Aleix Pol <aleixpol at kde.org>
Date:   Sun Jun 5 19:19:31 2016 +0200

    Fix tests
    
    In case we need to discover the device (i.e. we're running the test in a
    clean environment) we need to acquire the discovery mode.
    Only initialize the test after setting the test mode enabled, so the
    loopback is enabled.
---
 tests/pluginloadtest.cpp | 9 +++++++--
 tests/sendfiletest.cpp   | 8 ++++++--
 2 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/tests/pluginloadtest.cpp b/tests/pluginloadtest.cpp
index dfa04ac..cc05fdf 100644
--- a/tests/pluginloadtest.cpp
+++ b/tests/pluginloadtest.cpp
@@ -39,19 +39,24 @@ class PluginLoadTest : public QObject
 {
     Q_OBJECT
     public:
-        PluginLoadTest() : mDaemon(new TestDaemon) {
+        PluginLoadTest() {
             QStandardPaths::setTestModeEnabled(true);
+            mDaemon = new TestDaemon;
         }
 
     private Q_SLOTS:
         void testPlugins() {
             Device* d = nullptr;
+            mDaemon->acquireDiscoveryMode("plugintest");
             foreach(Device* id, mDaemon->devicesList()) {
                 if (id->isReachable()) {
-                    id->requestPair();
+                    if (!id->isTrusted())
+                        id->requestPair();
                     d = id;
+                    break;
                 }
             }
+            mDaemon->releaseDiscoveryMode("plugintest");
 
             if (!d->loadedPlugins().contains("kdeconnect_remotecontrol")) {
                 QSKIP("kdeconnect_remotecontrol is required for this test");
diff --git a/tests/sendfiletest.cpp b/tests/sendfiletest.cpp
index 667c86e..f65e5bf 100644
--- a/tests/sendfiletest.cpp
+++ b/tests/sendfiletest.cpp
@@ -39,19 +39,23 @@ class TestSendFile : public QObject
 {
     Q_OBJECT
     public:
-        TestSendFile() : mDaemon(new TestDaemon) {
+        TestSendFile() {
             QStandardPaths::setTestModeEnabled(true);
+            mDaemon = new TestDaemon;
         }
 
     private Q_SLOTS:
         void testSend() {
+            mDaemon->acquireDiscoveryMode("test");
             Device* d = nullptr;
             foreach(Device* id, mDaemon->devicesList()) {
                 if (id->isReachable()) {
-                    id->requestPair();
+                    if (!id->isTrusted())
+                        id->requestPair();
                     d = id;
                 }
             }
+            mDaemon->releaseDiscoveryMode("test");
             QVERIFY(d);
             QCOMPARE(d->isReachable(), true);
             QCOMPARE(d->isTrusted(), true);

-- 
kdeconnect packaging



More information about the pkg-kde-commits mailing list