[Pkg-owncloud-commits] [owncloud-client] 08/78: For tests we do not need a xserver running.

Sandro Knauß hefee-guest at moszumanska.debian.org
Fri Jun 24 16:29:36 UTC 2016


This is an automated email from the git hooks/post-receive script.

hefee-guest pushed a commit to branch master
in repository owncloud-client.

commit edb37596847d59b6e5d470571a8cc197c474f36a
Author: Hefee <hefee at netzguerilla.net>
Date:   Wed May 11 01:17:16 2016 +0200

    For tests we do not need a xserver running.
    
    Use for tests QTEST_GUILESS_MAIN and QTEST_APPLESS_MAIN.
---
 test/owncloud_add_test.cmake    | 2 +-
 test/testchecksumvalidator.cpp  | 7 ++++++-
 test/testconcaturl.cpp          | 2 +-
 test/testcsyncsqlite.cpp        | 2 +-
 test/testexcludedfiles.cpp      | 2 +-
 test/testfilesystem.cpp         | 2 +-
 test/testfolder.cpp             | 2 +-
 test/testfolderman.cpp          | 2 +-
 test/testfolderwatcher.cpp      | 7 ++++++-
 test/testinotifywatcher.cpp     | 2 +-
 test/testnetrcparser.cpp        | 2 +-
 test/testowncloudpropagator.cpp | 2 +-
 test/testownsql.cpp             | 2 +-
 test/testsyncfileitem.cpp       | 2 +-
 test/testsyncjournaldb.cpp      | 2 +-
 test/testupdater.cpp            | 2 +-
 test/testutility.cpp            | 2 +-
 test/testxmlparse.cpp           | 7 ++++++-
 18 files changed, 33 insertions(+), 18 deletions(-)

diff --git a/test/owncloud_add_test.cmake b/test/owncloud_add_test.cmake
index f9e5986..8406c2d 100644
--- a/test/owncloud_add_test.cmake
+++ b/test/owncloud_add_test.cmake
@@ -11,7 +11,7 @@ macro(owncloud_add_test test_class additional_cpp)
     string(TOLOWER "${OWNCLOUD_TEST_CLASS}" OWNCLOUD_TEST_CLASS_LOWERCASE)
 
     add_executable(${OWNCLOUD_TEST_CLASS}Test test${OWNCLOUD_TEST_CLASS_LOWERCASE}.cpp ${additional_cpp})
-    qt5_use_modules(${OWNCLOUD_TEST_CLASS}Test Test Sql Xml Network Gui Widgets)
+    qt5_use_modules(${OWNCLOUD_TEST_CLASS}Test Test Sql Xml Network)
 
     target_link_libraries(${OWNCLOUD_TEST_CLASS}Test
         updater
diff --git a/test/testchecksumvalidator.cpp b/test/testchecksumvalidator.cpp
index 8338c00..a0fc934 100644
--- a/test/testchecksumvalidator.cpp
+++ b/test/testchecksumvalidator.cpp
@@ -150,5 +150,10 @@ using namespace OCC;
     }
 };
 
-QTEST_MAIN(TestChecksumValidator)
+#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
+    QTEST_MAIN(TestChecksumValidator)
+#else
+    QTEST_GUILESS_MAIN(TestChecksumValidator)
+#endif
+
 #include "testchecksumvalidator.moc"
diff --git a/test/testconcaturl.cpp b/test/testconcaturl.cpp
index b38d526..5583449 100644
--- a/test/testconcaturl.cpp
+++ b/test/testconcaturl.cpp
@@ -100,5 +100,5 @@ private slots:
 
 };
 
-QTEST_MAIN(TestConcatUrl)
+QTEST_APPLESS_MAIN(TestConcatUrl)
 #include "testconcaturl.moc"
diff --git a/test/testcsyncsqlite.cpp b/test/testcsyncsqlite.cpp
index 490f286..9d526af 100644
--- a/test/testcsyncsqlite.cpp
+++ b/test/testcsyncsqlite.cpp
@@ -85,5 +85,5 @@ private slots:
 
 };
 
-QTEST_MAIN(TestCSyncSqlite)
+QTEST_APPLESS_MAIN(TestCSyncSqlite)
 #include "testcsyncsqlite.moc"
diff --git a/test/testexcludedfiles.cpp b/test/testexcludedfiles.cpp
index 21683f9..978e375 100644
--- a/test/testexcludedfiles.cpp
+++ b/test/testexcludedfiles.cpp
@@ -46,5 +46,5 @@ private slots:
     }
 };
 
-QTEST_MAIN(TestExcludedFiles)
+QTEST_APPLESS_MAIN(TestExcludedFiles)
 #include "testexcludedfiles.moc"
diff --git a/test/testfilesystem.cpp b/test/testfilesystem.cpp
index 85983bc..03ef873 100644
--- a/test/testfilesystem.cpp
+++ b/test/testfilesystem.cpp
@@ -87,5 +87,5 @@ private slots:
 
 };
 
-QTEST_MAIN(TestFileSystem)
+QTEST_APPLESS_MAIN(TestFileSystem)
 #include "testfilesystem.moc"
diff --git a/test/testfolder.cpp b/test/testfolder.cpp
index 2ed4870..e8775ac 100644
--- a/test/testfolder.cpp
+++ b/test/testfolder.cpp
@@ -41,5 +41,5 @@ private slots:
 
 };
 
-QTEST_MAIN(TestFolder)
+QTEST_APPLESS_MAIN(TestFolder)
 #include "testfolder.moc"
diff --git a/test/testfolderman.cpp b/test/testfolderman.cpp
index 47e115d..7b1c3cc 100644
--- a/test/testfolderman.cpp
+++ b/test/testfolderman.cpp
@@ -118,5 +118,5 @@ private slots:
     }
 };
 
-QTEST_MAIN(TestFolderMan)
+QTEST_APPLESS_MAIN(TestFolderMan)
 #include "testfolderman.moc"
diff --git a/test/testfolderwatcher.cpp b/test/testfolderwatcher.cpp
index 9ce4eb7..e2b8eb4 100644
--- a/test/testfolderwatcher.cpp
+++ b/test/testfolderwatcher.cpp
@@ -170,5 +170,10 @@ private slots:
     }
 };
 
-QTEST_MAIN(TestFolderWatcher)
+#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
+    QTEST_MAIN(TestFolderWatcher)
+#else
+    QTEST_GUILESS_MAIN(TestFolderWatcher)
+#endif
+
 #include "testfolderwatcher.moc"
diff --git a/test/testinotifywatcher.cpp b/test/testinotifywatcher.cpp
index c1100aa..799b09d 100644
--- a/test/testinotifywatcher.cpp
+++ b/test/testinotifywatcher.cpp
@@ -69,5 +69,5 @@ private slots:
     }
 };
 
-QTEST_MAIN(TestInotifyWatcher)
+QTEST_APPLESS_MAIN(TestInotifyWatcher)
 #include "testinotifywatcher.moc"
diff --git a/test/testnetrcparser.cpp b/test/testnetrcparser.cpp
index ae32227..1c8724e 100644
--- a/test/testnetrcparser.cpp
+++ b/test/testnetrcparser.cpp
@@ -72,5 +72,5 @@ private slots:
     }
 };
 
-QTEST_MAIN(TestNetrcParser)
+QTEST_APPLESS_MAIN(TestNetrcParser)
 #include "testnetrcparser.moc"
diff --git a/test/testowncloudpropagator.cpp b/test/testowncloudpropagator.cpp
index 55c0c5b..cd8f431 100644
--- a/test/testowncloudpropagator.cpp
+++ b/test/testowncloudpropagator.cpp
@@ -78,5 +78,5 @@ private slots:
     }
 };
 
-QTEST_MAIN(TestOwncloudPropagator)
+QTEST_APPLESS_MAIN(TestOwncloudPropagator)
 #include "testowncloudpropagator.moc"
diff --git a/test/testownsql.cpp b/test/testownsql.cpp
index a45f099..a926545 100644
--- a/test/testownsql.cpp
+++ b/test/testownsql.cpp
@@ -149,5 +149,5 @@ private:
     SqlDatabase _db;
 };
 
-QTEST_MAIN(TestOwnSql)
+QTEST_APPLESS_MAIN(TestOwnSql)
 #include "testownsql.moc"
diff --git a/test/testsyncfileitem.cpp b/test/testsyncfileitem.cpp
index e2cc12b..8b4732f 100644
--- a/test/testsyncfileitem.cpp
+++ b/test/testsyncfileitem.cpp
@@ -65,5 +65,5 @@ private slots:
     }
 };
 
-QTEST_MAIN(TestSyncFileItem)
+QTEST_APPLESS_MAIN(TestSyncFileItem)
 #include "testsyncfileitem.moc"
diff --git a/test/testsyncjournaldb.cpp b/test/testsyncjournaldb.cpp
index 9bfce3b..3550750 100644
--- a/test/testsyncjournaldb.cpp
+++ b/test/testsyncjournaldb.cpp
@@ -171,5 +171,5 @@ private:
     SyncJournalDb _db;
 };
 
-QTEST_MAIN(TestSyncJournalDB)
+QTEST_APPLESS_MAIN(TestSyncJournalDB)
 #include "testsyncjournaldb.moc"
diff --git a/test/testupdater.cpp b/test/testupdater.cpp
index deb3821..e8b27bf 100644
--- a/test/testupdater.cpp
+++ b/test/testupdater.cpp
@@ -30,5 +30,5 @@ private slots:
 
 };
 
-QTEST_MAIN(TestUpdater)
+QTEST_APPLESS_MAIN(TestUpdater)
 #include "testupdater.moc"
diff --git a/test/testutility.cpp b/test/testutility.cpp
index b8f8c1a..c00c952 100644
--- a/test/testutility.cpp
+++ b/test/testutility.cpp
@@ -160,5 +160,5 @@ private slots:
     }
 };
 
-QTEST_MAIN(TestUtility)
+QTEST_APPLESS_MAIN(TestUtility)
 #include "testutility.moc"
diff --git a/test/testxmlparse.cpp b/test/testxmlparse.cpp
index a5b66aa..5e49f7e 100644
--- a/test/testxmlparse.cpp
+++ b/test/testxmlparse.cpp
@@ -441,5 +441,10 @@ private slots:
 
 };
 
-QTEST_MAIN(TestXmlParse)
+#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
+    QTEST_MAIN(TestXmlParse)
+#else
+    QTEST_GUILESS_MAIN(TestXmlParse)
+#endif
+
 #include "testxmlparse.moc"

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git



More information about the Pkg-owncloud-commits mailing list