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(-) (limited to 'tests') 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 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(-) (limited to 'tests') 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(-) (limited to 'tests') 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(-) (limited to 'tests') 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(+) (limited to 'tests') 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 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(-) (limited to 'tests') 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