Warning, /frameworks/kservice/autotests/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 include(ECMAddTests) 0002 0003 ########### unittests ############### 0004 0005 find_package(Qt6 ${REQUIRED_QT_VERSION} CONFIG REQUIRED Concurrent Test) 0006 0007 macro(KSERVICE_UNIT_TESTS) 0008 foreach(_testname ${ARGN}) 0009 ecm_add_test(${_testname}.cpp TEST_NAME ${_testname} 0010 LINK_LIBRARIES KF6::Service Qt6::Test Qt6::Concurrent KF6::ConfigCore KF6::CoreAddons Qt6::Xml) 0011 target_compile_definitions(${_testname} PRIVATE -DKBUILDSYCOCAEXE=\"$<TARGET_FILE:kbuildsycoca6>\") 0012 endforeach() 0013 endmacro(KSERVICE_UNIT_TESTS) 0014 0015 kservice_unit_tests( 0016 ksycocatest 0017 ksycoca_xdgdirstest 0018 ksycocathreadtest 0019 kservicetest 0020 kapplicationtradertest 0021 ) 0022 0023 # the test plays with the timestamp of ~/.qttest/share/applications, and with the ksycoca file, other tests can collide 0024 set_tests_properties(ksycocatest PROPERTIES RUN_SERIAL TRUE) 0025 # KServiceTest::testAllServices can fail if any service is deleted while the test runs 0026 set_tests_properties(kservicetest PROPERTIES RUN_SERIAL TRUE) 0027 0028 ######### kmimeassociationstest ######## 0029 0030 set(kmimeassociationstest_SRCS kmimeassociationstest.cpp ../src/sycoca/kmimeassociations.cpp) 0031 ecm_qt_declare_logging_category(kmimeassociationstest_SRCS 0032 HEADER sycocadebug.h 0033 IDENTIFIER SYCOCA 0034 CATEGORY_NAME kf.service.sycoca 0035 ) 0036 0037 ecm_add_test(${kmimeassociationstest_SRCS} TEST_NAME kmimeassociationstest 0038 LINK_LIBRARIES KF6::Service Qt6::Test Qt6::Xml KF6::ConfigCore KF6::CoreAddons) 0039