summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTatiana Borisova <tatiana.borisova@qt.io>2022-01-21 16:25:55 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-01-28 01:06:13 +0000
commit90476e9bde932cc55f343683623cbfe8d138c638 (patch)
tree3974b7a11ab90dc43f2a071cf8c9c04cb27b92da
parent92d6f74cfd857e52be354460430047cfd5f9aac0 (diff)
Exclude tst_selftests when feature process is disabled
- It should not be built for systems without process feature. Task-number: QTBUG-99123 Change-Id: I71caa59c2168435894c7d1afcc8226e44178439f Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit e76d27d3ed2475169166a8666a3d90a82444fdbf) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--tests/auto/testlib/CMakeLists.txt2
-rw-r--r--tests/auto/testlib/selftests/tst_selftests.cpp8
2 files changed, 2 insertions, 8 deletions
diff --git a/tests/auto/testlib/CMakeLists.txt b/tests/auto/testlib/CMakeLists.txt
index ad895108e7..1d089359c0 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 2ef3f921dc..78b8e6ac3a 100644
--- a/tests/auto/testlib/selftests/tst_selftests.cpp
+++ b/tests/auto/testlib/selftests/tst_selftests.cpp
@@ -29,7 +29,7 @@
#include <QtCore/QCoreApplication>
-#if QT_CONFIG(process)
+QT_REQUIRE_CONFIG(process);
#if QT_CONFIG(temporaryfile)
# define USE_DIFF
@@ -1217,15 +1217,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<const char*> args(argv, argv + argc);
static auto kRebaseArgument = "--rebase";
@@ -1273,6 +1268,5 @@ int main(int argc, char **argv)
}
return result;
-#endif
}