aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt9
-rw-r--r--debian/control12
-rwxr-xr-xdebian/rules15
-rw-r--r--tests/client/CMakeLists.txt2
-rw-r--r--tests/client/actiongrouptest.cpp2
-rw-r--r--tests/client/convertertest.cpp2
-rw-r--r--tests/client/menuchangestest.cpp2
-rw-r--r--tests/client/modeltest.cpp2
-rw-r--r--tests/client/qmltest.cpp4
-rw-r--r--tests/client/servicetest.cpp2
10 files changed, 33 insertions, 19 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f90507e..2730975 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -35,8 +35,13 @@ add_subdirectory(libqmenumodel)
if(NOT DBUS_RUNNER)
message(STATUS "dbus-test-runner not found tests disabled.")
else()
- enable_testing()
- add_subdirectory(tests)
+ if(CMAKE_SYSTEM_PROCESSOR STREQUAL "armv7l")
+ message(STATUS "Current version of qemu crashes during the tests. We will skip it for now.")
+ else()
+ message(STATUS "Enable tests for: ${CMAKE_SYSTEM_PROCESSOR}")
+ enable_testing()
+ add_subdirectory(tests)
+ endif()
endif()
# Doc
diff --git a/debian/control b/debian/control
index 0e5d4c1..4a85338 100644
--- a/debian/control
+++ b/debian/control
@@ -2,13 +2,19 @@ Source: qmenumodel
Section: libs
Priority: optional
Maintainer: Renato Araujo Oliveira Filho <renato@canonical.com>
-Build-Depends: debhelper (>= 8.0.0),
- cdbs,
+Build-Depends: debhelper (>= 9.0.0),
cmake (>= 2.8.9),
libglib2.0-dev,
qtbase (>= 5.0),
qtdeclarative (>= 5.0),
-Standards-Version: 3.9.2
+ python3,
+ python3-dbus,
+ python3-gi,
+ gir1.2-glib-2.0,
+ dbus-test-runner,
+ libgles2-mesa-dev,
+ libgl-dev,
+Standards-Version: 3.9.3
Package: libqmenumodel0
Section: libs
diff --git a/debian/rules b/debian/rules
index 7e8093d..2364c9f 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,10 +1,15 @@
#!/usr/bin/make -f
# -*- makefile -*-
-DEB_CMAKE_EXTRA_FLAGS = -DCMAKE_PREFIX_PATH=/opt/qt5/lib/cmake
-DEB_DH_MAKESHLIBS_ARGS_qmenumodel-qml = -Xlibqmenumodel-qml.so
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
-include /usr/share/cdbs/1/rules/debhelper.mk
-include /usr/share/cdbs/1/rules/utils.mk
-include /usr/share/cdbs/1/class/cmake.mk
+override_dh_auto_configure:
+ PATH=/opt/qt5/bin:${PATH} dh_auto_configure
+
+override_dh_makeshlibs:
+ dh_makeshlibs -Xlibqmenumodel-qml.so
+
+%:
+ dh $@ --parallel
diff --git a/tests/client/CMakeLists.txt b/tests/client/CMakeLists.txt
index e9f95fd..d946fad 100644
--- a/tests/client/CMakeLists.txt
+++ b/tests/client/CMakeLists.txt
@@ -15,7 +15,7 @@ macro(declare_test testname)
--ignore-return)
set_tests_properties(${testname} PROPERTIES
TIMEOUT ${CTEST_TESTING_TIMEOUT}
- ENVIRONMENT "PYTHONPATH=${TEST_PYTHONPATH}")
+ ENVIRONMENT "PYTHONPATH=${TEST_PYTHONPATH};QT_QPA_PLATFORM=minimal")
endmacro(declare_test testname)
diff --git a/tests/client/actiongrouptest.cpp b/tests/client/actiongrouptest.cpp
index 5f1bf60..6598d2e 100644
--- a/tests/client/actiongrouptest.cpp
+++ b/tests/client/actiongrouptest.cpp
@@ -24,7 +24,7 @@
#include <QObject>
#include <QSignalSpy>
-#include <QtTestGui>
+#include <QtTest>
#include <QDebug>
class ActionGroupTest : public QObject
diff --git a/tests/client/convertertest.cpp b/tests/client/convertertest.cpp
index 633ecf1..5301653 100644
--- a/tests/client/convertertest.cpp
+++ b/tests/client/convertertest.cpp
@@ -24,7 +24,7 @@ extern "C" {
#include "converter.h"
#include <QObject>
-#include <QtTestGui>
+#include <QtTest>
#include <QDebug>
class ConverterTest : public QObject
diff --git a/tests/client/menuchangestest.cpp b/tests/client/menuchangestest.cpp
index 6ef5879..2e4ef6e 100644
--- a/tests/client/menuchangestest.cpp
+++ b/tests/client/menuchangestest.cpp
@@ -22,7 +22,7 @@
#include <QObject>
#include <QSignalSpy>
-#include <QtTestGui>
+#include <QtTest>
#include <QDebug>
class MenuChangesTest : public QObject
diff --git a/tests/client/modeltest.cpp b/tests/client/modeltest.cpp
index 2cb64b0..c6b2f0e 100644
--- a/tests/client/modeltest.cpp
+++ b/tests/client/modeltest.cpp
@@ -22,7 +22,7 @@
#include <QObject>
#include <QSignalSpy>
-#include <QtTestGui>
+#include <QtTest>
#include <QDebug>
class ModelTest : public QObject
diff --git a/tests/client/qmltest.cpp b/tests/client/qmltest.cpp
index ce77f6f..1f1e494 100644
--- a/tests/client/qmltest.cpp
+++ b/tests/client/qmltest.cpp
@@ -27,7 +27,7 @@ extern "C" {
#include <QObject>
#include <QSignalSpy>
-#include <QtTestGui>
+#include <QtTest>
#include <QDebug>
#include <QQmlContext>
@@ -77,7 +77,6 @@ private Q_SLOTS:
view->engine()->rootContext()->setContextProperty("globalBusName", MENU_SERVICE_NAME);
view->engine()->rootContext()->setContextProperty("globalObjectPath", MENU_OBJECT_PATH);
view->setSource(QUrl::fromLocalFile(LOADMODEL_QML));
- view->show();
QTest::qWait(500);
view->engine()->rootContext()->setContextProperty("resetModel", true);
QTest::qWait(500);
@@ -99,7 +98,6 @@ private Q_SLOTS:
view->engine()->rootContext()->setContextProperty("globalBusName", MENU_SERVICE_NAME);
view->engine()->rootContext()->setContextProperty("globalObjectPath", MENU_OBJECT_PATH);
view->setSource(QUrl::fromLocalFile(LOADMODEL2_QML));
- view->show();
QTest::qWait(500);
m_script.unpublishMenu();
diff --git a/tests/client/servicetest.cpp b/tests/client/servicetest.cpp
index 4d238c4..f61f5a1 100644
--- a/tests/client/servicetest.cpp
+++ b/tests/client/servicetest.cpp
@@ -22,7 +22,7 @@
#include <QObject>
#include <QSignalSpy>
-#include <QtTestGui>
+#include <QtTest>
#include <QDebug>
class ServiceTest : public QObject