From 0c44dd3a334af285f21f652c9edc6dd4053233d8 Mon Sep 17 00:00:00 2001 From: David Skoland Date: Fri, 6 May 2022 19:02:42 +0200 Subject: [PATCH] Exclude network tests based on feature Both tests in the conditional depend on the qnetworkinterface feature, and will fail to build if qt is configured without the networkinterface feature. Additionally, a missing system header in a test was added. Change-Id: Ife5989ee57675ebe117de2c92a4f96c7125cbab1 Pick-to: 6.3 Reviewed-by: Alexandru Croitor --- tests/auto/network/kernel/CMakeLists.txt | 6 ++++-- tests/auto/network/kernel/qhostaddress/tst_qhostaddress.cpp | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/auto/network/kernel/CMakeLists.txt b/tests/auto/network/kernel/CMakeLists.txt index c7b0d0dfeb..ddc2e15559 100644 --- a/tests/auto/network/kernel/CMakeLists.txt +++ b/tests/auto/network/kernel/CMakeLists.txt @@ -3,9 +3,11 @@ if(NOT INTEGRITY) add_subdirectory(qdnslookup) add_subdirectory(qdnslookup_appless) endif() -add_subdirectory(qnetworkproxyfactory) +if(QT_FEATURE_networkinterface) + add_subdirectory(qnetworkproxyfactory) + add_subdirectory(qnetworkinterface) +endif() add_subdirectory(qnetworkproxy) -add_subdirectory(qnetworkinterface) add_subdirectory(qnetworkdatagram) add_subdirectory(qnetworkaddressentry) add_subdirectory(qhostaddress) diff --git a/tests/auto/network/kernel/qhostaddress/tst_qhostaddress.cpp b/tests/auto/network/kernel/qhostaddress/tst_qhostaddress.cpp index 78f072fb54..bf39cce52f 100644 --- a/tests/auto/network/kernel/qhostaddress/tst_qhostaddress.cpp +++ b/tests/auto/network/kernel/qhostaddress/tst_qhostaddress.cpp @@ -40,7 +40,7 @@ # include #endif -#ifdef Q_OS_ANDROID +#if defined(Q_OS_ANDROID) || defined(Q_OS_WASM) # include #endif