]> dgit.raspbian.org Git - nextcloud-desktop.git/commitdiff
For tests we do not need a xserver running.
authorHefee <hefee@netzguerilla.net>
Tue, 10 May 2016 23:17:16 +0000 (01:17 +0200)
committerHefee <hefee@netzguerilla.net>
Thu, 12 May 2016 09:34:21 +0000 (11:34 +0200)
Use for tests QTEST_GUILESS_MAIN and QTEST_APPLESS_MAIN.

18 files changed:
test/owncloud_add_test.cmake
test/testchecksumvalidator.cpp
test/testconcaturl.cpp
test/testcsyncsqlite.cpp
test/testexcludedfiles.cpp
test/testfilesystem.cpp
test/testfolder.cpp
test/testfolderman.cpp
test/testfolderwatcher.cpp
test/testinotifywatcher.cpp
test/testnetrcparser.cpp
test/testowncloudpropagator.cpp
test/testownsql.cpp
test/testsyncfileitem.cpp
test/testsyncjournaldb.cpp
test/testupdater.cpp
test/testutility.cpp
test/testxmlparse.cpp

index f9e5986c6f4f1d17b2aa279205da5b20ed8e208e..8406c2dfe8665e8f15107dc5f733936fc0ca904d 100644 (file)
@@ -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
index 8338c0059650fd6891ef64cf187c24b1caa4befa..a0fc934c9f531bbea5027e260a9d66b9bfc3c7bf 100644 (file)
@@ -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"
index b38d52643150f470056cfb7c69307b3345f7ee03..558344999e14b7bd9f85b56a919d1ff865cd0683 100644 (file)
@@ -100,5 +100,5 @@ private slots:
 
 };
 
-QTEST_MAIN(TestConcatUrl)
+QTEST_APPLESS_MAIN(TestConcatUrl)
 #include "testconcaturl.moc"
index 490f286fb2576b11330e05522d2c7d40dbd26ea6..9d526afeef1f90bab5c17d824872a736e2191470 100644 (file)
@@ -85,5 +85,5 @@ private slots:
 
 };
 
-QTEST_MAIN(TestCSyncSqlite)
+QTEST_APPLESS_MAIN(TestCSyncSqlite)
 #include "testcsyncsqlite.moc"
index 21683f99193e527a67afee642d1aa2577db501ea..978e375dd1624654d5577fb92915ea25e4b6700c 100644 (file)
@@ -46,5 +46,5 @@ private slots:
     }
 };
 
-QTEST_MAIN(TestExcludedFiles)
+QTEST_APPLESS_MAIN(TestExcludedFiles)
 #include "testexcludedfiles.moc"
index 85983bc5aa0b86a3b014fdfe84cdb4aecc95414e..03ef8733205bbafe2e6c0387eb1cec105d8060d8 100644 (file)
@@ -87,5 +87,5 @@ private slots:
 
 };
 
-QTEST_MAIN(TestFileSystem)
+QTEST_APPLESS_MAIN(TestFileSystem)
 #include "testfilesystem.moc"
index 2ed4870c780bafcfb260337a4581587a15069108..e8775ac06f1522b7e49cf42b28db159221f74463 100644 (file)
@@ -41,5 +41,5 @@ private slots:
 
 };
 
-QTEST_MAIN(TestFolder)
+QTEST_APPLESS_MAIN(TestFolder)
 #include "testfolder.moc"
index 47e115da00bf49a5330e11e94cbe7feedf59ee24..7b1c3cc5bbb263cc81aca3cf65e398eefe504d77 100644 (file)
@@ -118,5 +118,5 @@ private slots:
     }
 };
 
-QTEST_MAIN(TestFolderMan)
+QTEST_APPLESS_MAIN(TestFolderMan)
 #include "testfolderman.moc"
index 9ce4eb7d0bc9608e50c7bca931aba42f1ca66f69..e2b8eb42391ac33aa716217adc3795ff32b681af 100644 (file)
@@ -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"
index c1100aa6ee7a46b7f9e0d21b511505ba5c01a865..799b09da96234c22da87874ad24f950fe1265f60 100644 (file)
@@ -69,5 +69,5 @@ private slots:
     }
 };
 
-QTEST_MAIN(TestInotifyWatcher)
+QTEST_APPLESS_MAIN(TestInotifyWatcher)
 #include "testinotifywatcher.moc"
index ae3222736a48ed4ce42693c3f2028172a37c0d73..1c8724e664f10f6ff8bb7c6b334b5926e5ab1083 100644 (file)
@@ -72,5 +72,5 @@ private slots:
     }
 };
 
-QTEST_MAIN(TestNetrcParser)
+QTEST_APPLESS_MAIN(TestNetrcParser)
 #include "testnetrcparser.moc"
index 55c0c5b7a1a3251f9ecda390a4247e23f6b28bed..cd8f431a976dd37e7288580978139e6d4045353f 100644 (file)
@@ -78,5 +78,5 @@ private slots:
     }
 };
 
-QTEST_MAIN(TestOwncloudPropagator)
+QTEST_APPLESS_MAIN(TestOwncloudPropagator)
 #include "testowncloudpropagator.moc"
index a45f09999fe096d2d3762b791a32a1a4a40f716f..a9265459d328fe2189e8aafb719269601bd0c059 100644 (file)
@@ -149,5 +149,5 @@ private:
     SqlDatabase _db;
 };
 
-QTEST_MAIN(TestOwnSql)
+QTEST_APPLESS_MAIN(TestOwnSql)
 #include "testownsql.moc"
index e2cc12bc1adf7f560758599b46391a3b01847207..8b4732f7074dc4c359e40dc8069011ea993ddce7 100644 (file)
@@ -65,5 +65,5 @@ private slots:
     }
 };
 
-QTEST_MAIN(TestSyncFileItem)
+QTEST_APPLESS_MAIN(TestSyncFileItem)
 #include "testsyncfileitem.moc"
index 9bfce3b54bffc9b4f6c943f3bd0b50de73c053d4..3550750a6f245f983b614c621e28e6e94185bd65 100644 (file)
@@ -171,5 +171,5 @@ private:
     SyncJournalDb _db;
 };
 
-QTEST_MAIN(TestSyncJournalDB)
+QTEST_APPLESS_MAIN(TestSyncJournalDB)
 #include "testsyncjournaldb.moc"
index deb3821c92121477ea63da6c564b330b710544a1..e8b27bf3c8553bbfffddaa037c608220f7fe4882 100644 (file)
@@ -30,5 +30,5 @@ private slots:
 
 };
 
-QTEST_MAIN(TestUpdater)
+QTEST_APPLESS_MAIN(TestUpdater)
 #include "testupdater.moc"
index b8f8c1ac9665ad3954b0c01820af4831a4bad165..c00c952b16a2284ab7d8b2bc973989aa12a6e278 100644 (file)
@@ -160,5 +160,5 @@ private slots:
     }
 };
 
-QTEST_MAIN(TestUtility)
+QTEST_APPLESS_MAIN(TestUtility)
 #include "testutility.moc"
index a5b66aab2a478046496a6511db514a0faef631b6..5e49f7ee8d526c98a5b87604ff889f9796beadf4 100644 (file)
@@ -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"