From e76d27d3ed2475169166a8666a3d90a82444fdbf Mon Sep 17 00:00:00 2001 From: Tatiana Borisova Date: Fri, 21 Jan 2022 16:25:55 +0200 Subject: [PATCH] Exclude tst_selftests when feature process is disabled MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - It should not be built for systems without process feature. Task-number: QTBUG-99123 Pick-to: 6.2 6.3 Change-Id: I71caa59c2168435894c7d1afcc8226e44178439f Reviewed-by: Edward Welbourne Reviewed-by: Tor Arne Vestbø --- tests/auto/testlib/CMakeLists.txt | 2 +- tests/auto/testlib/selftests/tst_selftests.cpp | 8 +------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/tests/auto/testlib/CMakeLists.txt b/tests/auto/testlib/CMakeLists.txt index ad895108e70..1d089359c01 100644 --- a/tests/auto/testlib/CMakeLists.txt +++ b/tests/auto/testlib/CMakeLists.txt @@ -4,7 +4,7 @@ # add_subdirectory(outformat) # special case missing project add_subdirectory(qsignalspy) # QTBUG-88507 # special case -if(NOT ANDROID) +if(QT_FEATURE_process AND NOT ANDROID) add_subdirectory(selftests) endif() if(TARGET Qt::Widgets) diff --git a/tests/auto/testlib/selftests/tst_selftests.cpp b/tests/auto/testlib/selftests/tst_selftests.cpp index 8aad22dec82..b706b419058 100644 --- a/tests/auto/testlib/selftests/tst_selftests.cpp +++ b/tests/auto/testlib/selftests/tst_selftests.cpp @@ -29,7 +29,7 @@ #include -#if QT_CONFIG(process) +QT_REQUIRE_CONFIG(process); #if QT_CONFIG(temporaryfile) # define USE_DIFF @@ -1216,15 +1216,10 @@ SCENARIO("Test output of the loggers is as expected") } } -#endif // QT_CONFIG(process) - // ----------------------- Entrypoint ----------------------- int main(int argc, char **argv) { -#if !QT_CONFIG(process) - return 0; -#else std::vector args(argv, argv + argc); static auto kRebaseArgument = "--rebase"; @@ -1272,6 +1267,5 @@ int main(int argc, char **argv) } return result; -#endif }