diff options
| author | OPNA2608 <opna2608@protonmail.com> | 2026-07-07 02:23:39 +0200 |
|---|---|---|
| committer | OPNA2608 <opna2608@protonmail.com> | 2026-07-07 02:23:39 +0200 |
| commit | 1c83e5e5dcaf8e0bfc6c9e24a8e3f088f52dc8ea (patch) | |
| tree | c0b21a8139741d5edfddf6d0ef686e2517bffa63 | |
| parent | bb8cd06e42e6f1fd83e47546992749de333b1f06 (diff) | |
| download | qmenumodel-1c83e5e5dcaf8e0bfc6c9e24a8e3f088f52dc8ea.tar.gz qmenumodel-1c83e5e5dcaf8e0bfc6c9e24a8e3f088f52dc8ea.tar.bz2 qmenumodel-1c83e5e5dcaf8e0bfc6c9e24a8e3f088f52dc8ea.zip | |
tests/client/CMakeLists.txt: Fix inter-task dependencies
Some of the tests rely on org.ayatana.test existing in the test D-Bus session, which gets started by their accompanying Python scripts. Add a --wait-for org.ayatana.test to make sure that the test only starts once the service is present.
This causes some of the tests to fail because they don't have an accompanying Python script, so the interface never appears. Switch those tests to the previously unused declare_simple_test macro, and adjust it slightly so everything works out.
| -rw-r--r-- | tests/client/CMakeLists.txt | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/tests/client/CMakeLists.txt b/tests/client/CMakeLists.txt index 8a0ed49..ed73055 100644 --- a/tests/client/CMakeLists.txt +++ b/tests/client/CMakeLists.txt @@ -21,9 +21,10 @@ macro(declare_test testname) add_test(${testname}
${DBUS_RUNNER}
- --task ${CMAKE_CURRENT_BINARY_DIR}/${testname} ${TEST_ARGS} --task-name Client
--task ${CMAKE_CURRENT_SOURCE_DIR}/script_${testname}.py --task-name Server
- --ignore-return)
+ --ignore-return
+ --task ${CMAKE_CURRENT_BINARY_DIR}/${testname} ${TEST_ARGS} --task-name Client
+ --wait-for org.ayatana.test)
set_tests_properties(${testname} PROPERTIES
TIMEOUT ${CTEST_TESTING_TIMEOUT}
ENVIRONMENT "PYTHONPATH=${TEST_PYTHONPATH};QT_QPA_PLATFORM=minimal")
@@ -45,7 +46,8 @@ macro(declare_simple_test testname) ${CMAKE_CURRENT_BINARY_DIR}/${testname})
set_tests_properties(${testname} PROPERTIES
- TIMEOUT ${CTEST_TESTING_TIMEOUT})
+ TIMEOUT ${CTEST_TESTING_TIMEOUT}
+ ENVIRONMENT "QT_QPA_PLATFORM=minimal")
endmacro(declare_simple_test testname)
include_directories(${src_SOURCE_DIR}
@@ -64,10 +66,10 @@ declare_test(menuchangestest) declare_test(modeltest)
declare_test(actiongrouptest)
declare_test(qmltest)
-declare_test(convertertest)
-declare_test(modelsignalstest)
-declare_test(treetest)
-declare_test(ayatanamenuactiontest)
+declare_simple_test(convertertest)
+declare_simple_test(modelsignalstest)
+declare_simple_test(treetest)
+declare_simple_test(ayatanamenuactiontest)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/qmlfiles.h.in
${CMAKE_CURRENT_BINARY_DIR}/qmlfiles.h)
|
