From 46b483ace0248bec349e3c2e87736f717510d400 Mon Sep 17 00:00:00 2001 From: Ahmad Samir Date: Thu, 16 Feb 2023 14:44:30 +0200 Subject: [PATCH] Make sure helper executables used by unittests are built E.g. tst_qprocess_and_guieventloop uses write-read-write. This is useful e.g. when not building all of qtbase, but only a specific unittest while hacking code. Change-Id: Id97c6c09c180ba35554d75877a434cb258a6243d Reviewed-by: Thiago Macieira Reviewed-by: Alexandru Croitor --- tests/auto/dbus/qdbusabstractinterface/CMakeLists.txt | 4 ++-- tests/auto/dbus/qdbusmarshall/CMakeLists.txt | 3 ++- tests/auto/other/qprocess_and_guieventloop/CMakeLists.txt | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/auto/dbus/qdbusabstractinterface/CMakeLists.txt b/tests/auto/dbus/qdbusabstractinterface/CMakeLists.txt index e074d0832c..a4bb826984 100644 --- a/tests/auto/dbus/qdbusabstractinterface/CMakeLists.txt +++ b/tests/auto/dbus/qdbusabstractinterface/CMakeLists.txt @@ -1,8 +1,6 @@ # Copyright (C) 2022 The Qt Company Ltd. # SPDX-License-Identifier: BSD-3-Clause -add_subdirectory(qpinger) - qt_internal_add_test(tst_qdbusabstractinterface SOURCES interface.cpp @@ -21,3 +19,5 @@ qt_internal_extend_target(tst_qdbusabstractinterface -i interface.h ) +add_subdirectory(qpinger) +add_dependencies(tst_qdbusabstractinterface qpinger) diff --git a/tests/auto/dbus/qdbusmarshall/CMakeLists.txt b/tests/auto/dbus/qdbusmarshall/CMakeLists.txt index 275a296a04..45b2bd8136 100644 --- a/tests/auto/dbus/qdbusmarshall/CMakeLists.txt +++ b/tests/auto/dbus/qdbusmarshall/CMakeLists.txt @@ -4,5 +4,6 @@ if(NOT QT_FEATURE_private_tests) return() endif() -add_subdirectory(qpong) add_subdirectory(qdbusmarshall) +add_subdirectory(qpong) +add_dependencies(tst_qdbusmarshall qpong) diff --git a/tests/auto/other/qprocess_and_guieventloop/CMakeLists.txt b/tests/auto/other/qprocess_and_guieventloop/CMakeLists.txt index dfaaa9edfb..aa899958e4 100644 --- a/tests/auto/other/qprocess_and_guieventloop/CMakeLists.txt +++ b/tests/auto/other/qprocess_and_guieventloop/CMakeLists.txt @@ -12,3 +12,4 @@ qt_internal_add_test(tst_qprocess_and_guieventloop Qt::Gui ) add_subdirectory(write-read-write) +add_dependencies(tst_qprocess_and_guieventloop write-read-write)