From d7ae33e913f04471d24f01baacb13b04e7eeb4f0 Mon Sep 17 00:00:00 2001 From: Renato Araujo Oliveira Filho Date: Wed, 31 Oct 2012 09:30:37 +0100 Subject: Updated debian package to use debhelper instead of cdbs. --- debian/control | 6 +++--- debian/rules | 12 +++++++----- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/debian/control b/debian/control index 0e5d4c1..2e18ada 100644 --- a/debian/control +++ b/debian/control @@ -2,13 +2,13 @@ Source: qmenumodel Section: libs Priority: optional Maintainer: Renato Araujo Oliveira Filho -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 (>= 3.2), +Standards-Version: 3.9.3 Package: libqmenumodel0 Section: libs diff --git a/debian/rules b/debian/rules index 7e8093d..1ba4415 100755 --- a/debian/rules +++ b/debian/rules @@ -1,10 +1,12 @@ #!/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 + +%: + dh $@ --parallel -- cgit v1.2.3 From 7ee5b380e6b4d25d971fe6fd4acc9a6e3dce74fc Mon Sep 17 00:00:00 2001 From: Renato Araujo Oliveira Filho Date: Wed, 31 Oct 2012 10:21:00 +0100 Subject: Fixed control file to accept any python3 version. --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/control b/debian/control index 2e18ada..58073ce 100644 --- a/debian/control +++ b/debian/control @@ -7,7 +7,7 @@ Build-Depends: debhelper (>= 9.0.0), libglib2.0-dev, qtbase (>= 5.0), qtdeclarative (>= 5.0), - python3 (>= 3.2), + python3, Standards-Version: 3.9.3 Package: libqmenumodel0 -- cgit v1.2.3 From bed4cab5b4b9e1c49968f88ca0f02252ee44c1ec Mon Sep 17 00:00:00 2001 From: Renato Araujo Oliveira Filho Date: Wed, 31 Oct 2012 10:23:54 +0100 Subject: Updated rules to avoid warnings during the package build. --- debian/rules | 3 +++ 1 file changed, 3 insertions(+) diff --git a/debian/rules b/debian/rules index 1ba4415..2364c9f 100755 --- a/debian/rules +++ b/debian/rules @@ -7,6 +7,9 @@ override_dh_auto_configure: PATH=/opt/qt5/bin:${PATH} dh_auto_configure +override_dh_makeshlibs: + dh_makeshlibs -Xlibqmenumodel-qml.so + %: dh $@ --parallel -- cgit v1.2.3 From 89f52ae80a061cd40d5b927e292401a501359e77 Mon Sep 17 00:00:00 2001 From: Renato Araujo Oliveira Filho Date: Wed, 31 Oct 2012 11:09:33 +0100 Subject: Added 'dbus-test-runner' ad build dependency. --- debian/control | 1 + 1 file changed, 1 insertion(+) diff --git a/debian/control b/debian/control index 58073ce..ab992cf 100644 --- a/debian/control +++ b/debian/control @@ -8,6 +8,7 @@ Build-Depends: debhelper (>= 9.0.0), qtbase (>= 5.0), qtdeclarative (>= 5.0), python3, + dbus-test-runner, Standards-Version: 3.9.3 Package: libqmenumodel0 -- cgit v1.2.3 From 485cab89ad4e09e9b9ed53c4610529343a55ecf0 Mon Sep 17 00:00:00 2001 From: Renato Araujo Oliveira Filho Date: Wed, 31 Oct 2012 11:10:59 +0100 Subject: Removed show widgets functions to avoid problems in the auto builder. --- tests/client/qmltest.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/client/qmltest.cpp b/tests/client/qmltest.cpp index 4e6f288..9854694 100644 --- a/tests/client/qmltest.cpp +++ b/tests/client/qmltest.cpp @@ -78,7 +78,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); @@ -100,7 +99,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(); -- cgit v1.2.3 From 07087af0ce285afa96565e851f3e65f20620fae5 Mon Sep 17 00:00:00 2001 From: Renato Araujo Oliveira Filho Date: Wed, 31 Oct 2012 11:51:50 +0100 Subject: Added missing opengl dependency. Necessary for examples. --- debian/control | 2 ++ 1 file changed, 2 insertions(+) diff --git a/debian/control b/debian/control index ab992cf..2a2e8d9 100644 --- a/debian/control +++ b/debian/control @@ -9,6 +9,8 @@ Build-Depends: debhelper (>= 9.0.0), qtdeclarative (>= 5.0), python3, dbus-test-runner, + libgles2-mesa-dev, + libgl-dev, Standards-Version: 3.9.3 Package: libqmenumodel0 -- cgit v1.2.3 From 49797fd4b489c31989d1e8a24e2b3bfa90b45825 Mon Sep 17 00:00:00 2001 From: Renato Araujo Oliveira Filho Date: Wed, 31 Oct 2012 13:09:44 +0100 Subject: Added xvfb option on cmake to enable run tests without X running. --- CMakeLists.txt | 10 ++++++++++ debian/control | 1 + debian/rules | 2 +- tests/client/CMakeLists.txt | 1 + 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 261335a..d22194c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,6 +32,16 @@ endif() add_subdirectory(libqmenumodel) # Tests Tools +set(XVFB_EXEC "") +option(USE_XVFB "Uses xvfb-run with the unit tests to avoid QtWidgets tests fails without X." FALSE) +if(USE_XVFB) + find_program(XVFB_RUN NAMES xvfb-run) + if (NOT ${XVFB_RUN} MATCHES "XVFB_RUN-NOTFOUND") + set(XVFB_EXEC ${XVFB_RUN} -a) + message(STATUS "Using xvfb-run to perform QtWidget tests.") + endif() +endif() + if(NOT DBUS_RUNNER) message(STATUS "dbus-test-runner not found tests disabled.") else() diff --git a/debian/control b/debian/control index 2a2e8d9..e4e9d1c 100644 --- a/debian/control +++ b/debian/control @@ -11,6 +11,7 @@ Build-Depends: debhelper (>= 9.0.0), dbus-test-runner, libgles2-mesa-dev, libgl-dev, + xvfb, Standards-Version: 3.9.3 Package: libqmenumodel0 diff --git a/debian/rules b/debian/rules index 2364c9f..366a447 100755 --- a/debian/rules +++ b/debian/rules @@ -5,7 +5,7 @@ #export DH_VERBOSE=1 override_dh_auto_configure: - PATH=/opt/qt5/bin:${PATH} dh_auto_configure + PATH=/opt/qt5/bin:${PATH} dh_auto_configure -- -DUSE_XVFB=On override_dh_makeshlibs: dh_makeshlibs -Xlibqmenumodel-qml.so diff --git a/tests/client/CMakeLists.txt b/tests/client/CMakeLists.txt index 9bce370..9209cc8 100644 --- a/tests/client/CMakeLists.txt +++ b/tests/client/CMakeLists.txt @@ -9,6 +9,7 @@ macro(declare_test testname) ) add_test(${testname} + ${XVFB_EXEC} ${DBUS_RUNNER} --task ${CMAKE_CURRENT_BINARY_DIR}/${testname} --task-name Client --task ${CMAKE_CURRENT_SOURCE_DIR}/script_${testname}.py --task-name Server -- cgit v1.2.3 From b4e04e384a61d508eb6209c8b3de7e778956ffad Mon Sep 17 00:00:00 2001 From: Renato Araujo Oliveira Filho Date: Wed, 31 Oct 2012 13:48:03 +0100 Subject: Removed QtTestGui include from tests. --- tests/client/actiongrouptest.cpp | 2 +- tests/client/convertertest.cpp | 2 +- tests/client/menuchangestest.cpp | 2 +- tests/client/modeltest.cpp | 2 +- tests/client/qmltest.cpp | 2 +- tests/client/servicetest.cpp | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/client/actiongrouptest.cpp b/tests/client/actiongrouptest.cpp index 116bd44..96d6916 100644 --- a/tests/client/actiongrouptest.cpp +++ b/tests/client/actiongrouptest.cpp @@ -24,7 +24,7 @@ #include #include -#include +#include #include 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 -#include +#include #include class ConverterTest : public QObject diff --git a/tests/client/menuchangestest.cpp b/tests/client/menuchangestest.cpp index 2015582..ee7cf62 100644 --- a/tests/client/menuchangestest.cpp +++ b/tests/client/menuchangestest.cpp @@ -22,7 +22,7 @@ #include #include -#include +#include #include class MenuChangesTest : public QObject diff --git a/tests/client/modeltest.cpp b/tests/client/modeltest.cpp index 93677db..02ce8ca 100644 --- a/tests/client/modeltest.cpp +++ b/tests/client/modeltest.cpp @@ -22,7 +22,7 @@ #include #include -#include +#include #include class ModelTest : public QObject diff --git a/tests/client/qmltest.cpp b/tests/client/qmltest.cpp index 9854694..2dfc356 100644 --- a/tests/client/qmltest.cpp +++ b/tests/client/qmltest.cpp @@ -27,7 +27,7 @@ extern "C" { #include #include -#include +#include #include #include diff --git a/tests/client/servicetest.cpp b/tests/client/servicetest.cpp index a8b0c2a..262eacf 100644 --- a/tests/client/servicetest.cpp +++ b/tests/client/servicetest.cpp @@ -22,7 +22,7 @@ #include #include -#include +#include #include class ServiceTest : public QObject -- cgit v1.2.3 From 7f4ba1a247c5032fd200ca9aad0d939ce6c0e9a5 Mon Sep 17 00:00:00 2001 From: Renato Araujo Oliveira Filho Date: Wed, 31 Oct 2012 13:48:39 +0100 Subject: Reverted use of xvfb for tests. (Does not work with opengl) --- CMakeLists.txt | 10 ---------- tests/client/CMakeLists.txt | 1 - 2 files changed, 11 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d22194c..261335a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,16 +32,6 @@ endif() add_subdirectory(libqmenumodel) # Tests Tools -set(XVFB_EXEC "") -option(USE_XVFB "Uses xvfb-run with the unit tests to avoid QtWidgets tests fails without X." FALSE) -if(USE_XVFB) - find_program(XVFB_RUN NAMES xvfb-run) - if (NOT ${XVFB_RUN} MATCHES "XVFB_RUN-NOTFOUND") - set(XVFB_EXEC ${XVFB_RUN} -a) - message(STATUS "Using xvfb-run to perform QtWidget tests.") - endif() -endif() - if(NOT DBUS_RUNNER) message(STATUS "dbus-test-runner not found tests disabled.") else() diff --git a/tests/client/CMakeLists.txt b/tests/client/CMakeLists.txt index 9209cc8..9bce370 100644 --- a/tests/client/CMakeLists.txt +++ b/tests/client/CMakeLists.txt @@ -9,7 +9,6 @@ macro(declare_test testname) ) add_test(${testname} - ${XVFB_EXEC} ${DBUS_RUNNER} --task ${CMAKE_CURRENT_BINARY_DIR}/${testname} --task-name Client --task ${CMAKE_CURRENT_SOURCE_DIR}/script_${testname}.py --task-name Server -- cgit v1.2.3 From 4aee0f151e49148a6a51e996f42ec748ab58bbdb Mon Sep 17 00:00:00 2001 From: Renato Araujo Oliveira Filho Date: Wed, 31 Oct 2012 15:32:38 +0100 Subject: Revert last commit. --- CMakeLists.txt | 10 ++++++++++ tests/client/CMakeLists.txt | 1 + 2 files changed, 11 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 261335a..d22194c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,6 +32,16 @@ endif() add_subdirectory(libqmenumodel) # Tests Tools +set(XVFB_EXEC "") +option(USE_XVFB "Uses xvfb-run with the unit tests to avoid QtWidgets tests fails without X." FALSE) +if(USE_XVFB) + find_program(XVFB_RUN NAMES xvfb-run) + if (NOT ${XVFB_RUN} MATCHES "XVFB_RUN-NOTFOUND") + set(XVFB_EXEC ${XVFB_RUN} -a) + message(STATUS "Using xvfb-run to perform QtWidget tests.") + endif() +endif() + if(NOT DBUS_RUNNER) message(STATUS "dbus-test-runner not found tests disabled.") else() diff --git a/tests/client/CMakeLists.txt b/tests/client/CMakeLists.txt index 9bce370..9209cc8 100644 --- a/tests/client/CMakeLists.txt +++ b/tests/client/CMakeLists.txt @@ -9,6 +9,7 @@ macro(declare_test testname) ) add_test(${testname} + ${XVFB_EXEC} ${DBUS_RUNNER} --task ${CMAKE_CURRENT_BINARY_DIR}/${testname} --task-name Client --task ${CMAKE_CURRENT_SOURCE_DIR}/script_${testname}.py --task-name Server -- cgit v1.2.3 From abd20beb045675f8a8e434e3de8e659d599e21f0 Mon Sep 17 00:00:00 2001 From: Renato Araujo Oliveira Filho Date: Wed, 31 Oct 2012 16:04:16 +0100 Subject: Added missing python dependencies. --- debian/control | 3 +++ 1 file changed, 3 insertions(+) diff --git a/debian/control b/debian/control index e4e9d1c..9488dd7 100644 --- a/debian/control +++ b/debian/control @@ -8,6 +8,9 @@ Build-Depends: debhelper (>= 9.0.0), qtbase (>= 5.0), qtdeclarative (>= 5.0), python3, + python-dbus, + python-gi, + gir1.2-glib-2.0, dbus-test-runner, libgles2-mesa-dev, libgl-dev, -- cgit v1.2.3 From bf5a53e949ffe0ebcf8578a0fc9062f63527dbc9 Mon Sep 17 00:00:00 2001 From: Renato Araujo Oliveira Filho Date: Wed, 31 Oct 2012 16:36:28 +0100 Subject: Updated dependency list to use python3 packages. --- debian/control | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/control b/debian/control index 9488dd7..298defd 100644 --- a/debian/control +++ b/debian/control @@ -8,8 +8,8 @@ Build-Depends: debhelper (>= 9.0.0), qtbase (>= 5.0), qtdeclarative (>= 5.0), python3, - python-dbus, - python-gi, + python3-dbus, + python3-gi, gir1.2-glib-2.0, dbus-test-runner, libgles2-mesa-dev, -- cgit v1.2.3 From 84325968c39d35b1c3833394fef390c0bf58ca67 Mon Sep 17 00:00:00 2001 From: Renato Araujo Oliveira Filho Date: Thu, 1 Nov 2012 16:02:37 +0100 Subject: Uses "QT_QPA_PLATFORM=minimal" to run qt tests. --- CMakeLists.txt | 10 ---------- debian/rules | 2 +- tests/client/CMakeLists.txt | 3 +-- 3 files changed, 2 insertions(+), 13 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d22194c..261335a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,16 +32,6 @@ endif() add_subdirectory(libqmenumodel) # Tests Tools -set(XVFB_EXEC "") -option(USE_XVFB "Uses xvfb-run with the unit tests to avoid QtWidgets tests fails without X." FALSE) -if(USE_XVFB) - find_program(XVFB_RUN NAMES xvfb-run) - if (NOT ${XVFB_RUN} MATCHES "XVFB_RUN-NOTFOUND") - set(XVFB_EXEC ${XVFB_RUN} -a) - message(STATUS "Using xvfb-run to perform QtWidget tests.") - endif() -endif() - if(NOT DBUS_RUNNER) message(STATUS "dbus-test-runner not found tests disabled.") else() diff --git a/debian/rules b/debian/rules index 366a447..2364c9f 100755 --- a/debian/rules +++ b/debian/rules @@ -5,7 +5,7 @@ #export DH_VERBOSE=1 override_dh_auto_configure: - PATH=/opt/qt5/bin:${PATH} dh_auto_configure -- -DUSE_XVFB=On + PATH=/opt/qt5/bin:${PATH} dh_auto_configure override_dh_makeshlibs: dh_makeshlibs -Xlibqmenumodel-qml.so diff --git a/tests/client/CMakeLists.txt b/tests/client/CMakeLists.txt index 9209cc8..725289e 100644 --- a/tests/client/CMakeLists.txt +++ b/tests/client/CMakeLists.txt @@ -9,14 +9,13 @@ macro(declare_test testname) ) add_test(${testname} - ${XVFB_EXEC} ${DBUS_RUNNER} --task ${CMAKE_CURRENT_BINARY_DIR}/${testname} --task-name Client --task ${CMAKE_CURRENT_SOURCE_DIR}/script_${testname}.py --task-name Server --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) -- cgit v1.2.3 From a086f905c9ded6f1738cd8ad657820c510a78fb6 Mon Sep 17 00:00:00 2001 From: Renato Araujo Oliveira Filho Date: Tue, 6 Nov 2012 09:25:10 -0300 Subject: Removed 'xvfb' from the dependency list. --- debian/control | 1 - 1 file changed, 1 deletion(-) diff --git a/debian/control b/debian/control index 298defd..4a85338 100644 --- a/debian/control +++ b/debian/control @@ -14,7 +14,6 @@ Build-Depends: debhelper (>= 9.0.0), dbus-test-runner, libgles2-mesa-dev, libgl-dev, - xvfb, Standards-Version: 3.9.3 Package: libqmenumodel0 -- cgit v1.2.3 From dd3e64c85d197858f5fb8838668386d623d25ef6 Mon Sep 17 00:00:00 2001 From: Renato Araujo Oliveira Filho Date: Tue, 6 Nov 2012 11:21:48 -0300 Subject: Skip tests on qemu to avoid crashes. --- CMakeLists.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 261335a..eca9ed0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,8 +35,12 @@ 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 EQUAL "armv7l") + message(STATUS "Current version of qemu crashes during the tests. We will skip it for now.") + else() + enable_testing() + add_subdirectory(tests) + endif() endif() # Doc -- cgit v1.2.3 From 21a895254bc08f111b5173f8b6b85f8271935020 Mon Sep 17 00:00:00 2001 From: Renato Araujo Oliveira Filho Date: Tue, 6 Nov 2012 12:57:58 -0300 Subject: Fixed string comparation on cmake files. --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index eca9ed0..3cd501b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,9 +35,10 @@ add_subdirectory(libqmenumodel) if(NOT DBUS_RUNNER) message(STATUS "dbus-test-runner not found tests disabled.") else() - if(CMAKE_SYSTEM_PROCESSOR EQUAL "armv7l") + 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() -- cgit v1.2.3