зеркало из https://github.com/nextcloud/desktop.git
For tests we do not need a xserver running.
Use for tests QTEST_GUILESS_MAIN and QTEST_APPLESS_MAIN.
This commit is contained in:
Родитель
0f9c32452c
Коммит
edb3759684
|
@ -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
|
||||
|
|
|
@ -150,5 +150,10 @@ using namespace OCC;
|
|||
}
|
||||
};
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
|
||||
QTEST_MAIN(TestChecksumValidator)
|
||||
#else
|
||||
QTEST_GUILESS_MAIN(TestChecksumValidator)
|
||||
#endif
|
||||
|
||||
#include "testchecksumvalidator.moc"
|
||||
|
|
|
@ -100,5 +100,5 @@ private slots:
|
|||
|
||||
};
|
||||
|
||||
QTEST_MAIN(TestConcatUrl)
|
||||
QTEST_APPLESS_MAIN(TestConcatUrl)
|
||||
#include "testconcaturl.moc"
|
||||
|
|
|
@ -85,5 +85,5 @@ private slots:
|
|||
|
||||
};
|
||||
|
||||
QTEST_MAIN(TestCSyncSqlite)
|
||||
QTEST_APPLESS_MAIN(TestCSyncSqlite)
|
||||
#include "testcsyncsqlite.moc"
|
||||
|
|
|
@ -46,5 +46,5 @@ private slots:
|
|||
}
|
||||
};
|
||||
|
||||
QTEST_MAIN(TestExcludedFiles)
|
||||
QTEST_APPLESS_MAIN(TestExcludedFiles)
|
||||
#include "testexcludedfiles.moc"
|
||||
|
|
|
@ -87,5 +87,5 @@ private slots:
|
|||
|
||||
};
|
||||
|
||||
QTEST_MAIN(TestFileSystem)
|
||||
QTEST_APPLESS_MAIN(TestFileSystem)
|
||||
#include "testfilesystem.moc"
|
||||
|
|
|
@ -41,5 +41,5 @@ private slots:
|
|||
|
||||
};
|
||||
|
||||
QTEST_MAIN(TestFolder)
|
||||
QTEST_APPLESS_MAIN(TestFolder)
|
||||
#include "testfolder.moc"
|
||||
|
|
|
@ -118,5 +118,5 @@ private slots:
|
|||
}
|
||||
};
|
||||
|
||||
QTEST_MAIN(TestFolderMan)
|
||||
QTEST_APPLESS_MAIN(TestFolderMan)
|
||||
#include "testfolderman.moc"
|
||||
|
|
|
@ -170,5 +170,10 @@ private slots:
|
|||
}
|
||||
};
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
|
||||
QTEST_MAIN(TestFolderWatcher)
|
||||
#else
|
||||
QTEST_GUILESS_MAIN(TestFolderWatcher)
|
||||
#endif
|
||||
|
||||
#include "testfolderwatcher.moc"
|
||||
|
|
|
@ -69,5 +69,5 @@ private slots:
|
|||
}
|
||||
};
|
||||
|
||||
QTEST_MAIN(TestInotifyWatcher)
|
||||
QTEST_APPLESS_MAIN(TestInotifyWatcher)
|
||||
#include "testinotifywatcher.moc"
|
||||
|
|
|
@ -72,5 +72,5 @@ private slots:
|
|||
}
|
||||
};
|
||||
|
||||
QTEST_MAIN(TestNetrcParser)
|
||||
QTEST_APPLESS_MAIN(TestNetrcParser)
|
||||
#include "testnetrcparser.moc"
|
||||
|
|
|
@ -78,5 +78,5 @@ private slots:
|
|||
}
|
||||
};
|
||||
|
||||
QTEST_MAIN(TestOwncloudPropagator)
|
||||
QTEST_APPLESS_MAIN(TestOwncloudPropagator)
|
||||
#include "testowncloudpropagator.moc"
|
||||
|
|
|
@ -149,5 +149,5 @@ private:
|
|||
SqlDatabase _db;
|
||||
};
|
||||
|
||||
QTEST_MAIN(TestOwnSql)
|
||||
QTEST_APPLESS_MAIN(TestOwnSql)
|
||||
#include "testownsql.moc"
|
||||
|
|
|
@ -65,5 +65,5 @@ private slots:
|
|||
}
|
||||
};
|
||||
|
||||
QTEST_MAIN(TestSyncFileItem)
|
||||
QTEST_APPLESS_MAIN(TestSyncFileItem)
|
||||
#include "testsyncfileitem.moc"
|
||||
|
|
|
@ -171,5 +171,5 @@ private:
|
|||
SyncJournalDb _db;
|
||||
};
|
||||
|
||||
QTEST_MAIN(TestSyncJournalDB)
|
||||
QTEST_APPLESS_MAIN(TestSyncJournalDB)
|
||||
#include "testsyncjournaldb.moc"
|
||||
|
|
|
@ -30,5 +30,5 @@ private slots:
|
|||
|
||||
};
|
||||
|
||||
QTEST_MAIN(TestUpdater)
|
||||
QTEST_APPLESS_MAIN(TestUpdater)
|
||||
#include "testupdater.moc"
|
||||
|
|
|
@ -160,5 +160,5 @@ private slots:
|
|||
}
|
||||
};
|
||||
|
||||
QTEST_MAIN(TestUtility)
|
||||
QTEST_APPLESS_MAIN(TestUtility)
|
||||
#include "testutility.moc"
|
||||
|
|
|
@ -441,5 +441,10 @@ private slots:
|
|||
|
||||
};
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
|
||||
QTEST_MAIN(TestXmlParse)
|
||||
#else
|
||||
QTEST_GUILESS_MAIN(TestXmlParse)
|
||||
#endif
|
||||
|
||||
#include "testxmlparse.moc"
|
||||
|
|
Загрузка…
Ссылка в новой задаче