2018-01-24 16:38:25 +01:00
|
|
|
include(ECMMarkAsTest)
|
|
|
|
|
|
|
|
set(falkon_autotests_SRCS )
|
|
|
|
|
2022-06-16 19:24:50 +02:00
|
|
|
qt_add_resources(falkon_autotests_SRCS autotests.qrc)
|
2018-01-29 00:20:28 +01:00
|
|
|
|
2018-01-24 16:38:25 +01:00
|
|
|
macro(falkon_tests)
|
|
|
|
foreach(_testname ${ARGN})
|
2022-06-16 19:24:50 +02:00
|
|
|
add_executable(${_testname} ${_testname}.cpp ${_testname}.h ${falkon_autotests_SRCS})
|
|
|
|
target_link_libraries(${_testname} Qt::Test FalkonPrivate)
|
2018-01-24 16:38:25 +01:00
|
|
|
add_test(NAME falkon-${_testname} COMMAND ${_testname})
|
|
|
|
ecm_mark_as_test(${_testname})
|
|
|
|
set_tests_properties(falkon-${_testname} PROPERTIES RUN_SERIAL TRUE)
|
|
|
|
endforeach(_testname)
|
|
|
|
endmacro()
|
|
|
|
|
|
|
|
falkon_tests(
|
|
|
|
qztoolstest
|
2018-01-27 09:03:18 +01:00
|
|
|
cookiestest
|
2018-01-24 16:38:25 +01:00
|
|
|
adblocktest
|
|
|
|
updatertest
|
2018-01-27 09:57:47 +01:00
|
|
|
locationbartest
|
2018-01-29 00:20:28 +01:00
|
|
|
webviewtest
|
2018-01-31 10:12:09 +01:00
|
|
|
webtabtest
|
2018-04-11 16:50:18 +02:00
|
|
|
sqldatabasetest
|
2022-08-06 16:53:32 +02:00
|
|
|
sitesettingstest
|
2018-01-24 16:38:25 +01:00
|
|
|
)
|
|
|
|
|
2018-01-30 14:53:18 +01:00
|
|
|
set(falkon_autotests_SRCS ${CMAKE_SOURCE_DIR}/tests/modeltest/modeltest.cpp)
|
|
|
|
include_directories(${CMAKE_SOURCE_DIR}/tests/modeltest)
|
|
|
|
falkon_tests(
|
|
|
|
tabmodeltest
|
|
|
|
)
|
|
|
|
|
2018-01-24 16:38:25 +01:00
|
|
|
set(falkon_autotests_SRCS passwordbackendtest.cpp)
|
2018-03-24 08:12:45 +01:00
|
|
|
include_directories(${OPENSSL_INCLUDE_DIR})
|
2018-01-24 16:38:25 +01:00
|
|
|
falkon_tests(
|
|
|
|
databasepasswordbackendtest
|
|
|
|
databaseencryptedpasswordbackendtest
|
|
|
|
)
|
2019-04-06 18:34:56 +02:00
|
|
|
|
|
|
|
set(falkon_autotests_SRCS
|
|
|
|
qml/qmltestitem.cpp
|
|
|
|
qml/qmltesthelper.cpp
|
|
|
|
)
|
|
|
|
|
|
|
|
macro(falkon_qml_tests)
|
|
|
|
foreach(_testname ${ARGN})
|
|
|
|
add_executable(${_testname} qml/${_testname}.cpp ${falkon_autotests_SRCS})
|
2022-06-16 19:24:50 +02:00
|
|
|
target_link_libraries(${_testname} Qt::Test FalkonPrivate)
|
2019-04-06 18:34:56 +02:00
|
|
|
add_test(NAME falkon-qml-${_testname} COMMAND ${_testname})
|
|
|
|
ecm_mark_as_test(${_testname})
|
|
|
|
set_tests_properties(falkon-qml-${_testname} PROPERTIES RUN_SERIAL TRUE)
|
|
|
|
endforeach(_testname)
|
|
|
|
endmacro()
|
|
|
|
|
|
|
|
falkon_qml_tests(
|
|
|
|
qmlbookmarksapitest
|
|
|
|
qmltopsitesapitest
|
|
|
|
qmlhistoryapitest
|
|
|
|
qmlcookiesapitest
|
|
|
|
qmlclipboardapitest
|
|
|
|
qmltabsapitest
|
|
|
|
qmlwindowsapitest
|
|
|
|
qmluserscriptapitest
|
|
|
|
)
|