diff options
author | David Redondo <kde@david-redondo.de> | 2022-01-28 10:58:14 +0100 |
---|---|---|
committer | David Redondo <kde@david-redondo.de> | 2022-02-01 14:06:35 +0100 |
commit | 4d31ec78f80d6add09dc80404470cfae7f2b13c7 (patch) | |
tree | 1660347401a2a59e8d364a7e90f71a44288f0adf /autotests/CMakeLists.txt | |
parent | 724966b63f48b8b8fa8891f82924328f3f73fad0 (diff) | |
download | kconfig-4d31ec78f80d6add09dc80404470cfae7f2b13c7.tar.gz kconfig-4d31ec78f80d6add09dc80404470cfae7f2b13c7.tar.bz2 |
Don't use saveShortcut for setting up tests
It will trigger side effects like triggering the dbus signal
which depending on the timing may be delivered only in the next
test case causing an unexpected change signal emission.
Diffstat (limited to 'autotests/CMakeLists.txt')
-rw-r--r-- | autotests/CMakeLists.txt | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/autotests/CMakeLists.txt b/autotests/CMakeLists.txt index 725d789f..95a1200a 100644 --- a/autotests/CMakeLists.txt +++ b/autotests/CMakeLists.txt @@ -57,11 +57,21 @@ ecm_add_tests( kconfigloadertest.cpp kconfigskeletontest.cpp kstandardshortcuttest.cpp - kstandardshortcutwatchertest.cpp NAME_PREFIX kconfiggui- LINK_LIBRARIES KF5::ConfigGui Qt${QT_MAJOR_VERSION}::Test ) +ecm_add_test( + kstandardshortcutwatchertest.cpp + # add sources instead of linking so we can use the unexported initialize() + ../src/gui/kstandardshortcut.cpp + ../src/gui/kstandardshortcutwatcher.cpp + LINK_LIBRARIES KF5::ConfigCore Qt${QT_MAJOR_VERSION}::Gui Qt${QT_MAJOR_VERSION}::Test + TEST_NAME kstandardshortcutwatchertest + NAME_PREFIX kconfiggui- +) +target_include_directories(kstandardshortcutwatchertest PRIVATE "$<TARGET_PROPERTY:KF5ConfigGui,INTERFACE_INCLUDE_DIRECTORIES>") + # These tests do a global cleanup of ~/.qttest, so they can't run in parallel set_tests_properties(kconfigcore-kconfigtest PROPERTIES RUN_SERIAL TRUE) set_tests_properties(kconfigcore-kconfignokdehometest PROPERTIES RUN_SERIAL TRUE) |