summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2022-08-15 13:15:30 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-08-18 06:48:33 +0000
commite6eaa053f5e1ed4b916f3cbd2c2c58c8cada98f3 (patch)
treecee70aeee834d671a646ed6a967b2bd05e30dca2 /tests/auto
parent75b3f7ef55303a1e8e14e855af9b27cbfe10fe2b (diff)
CMake: Add simple widgets qmake iOS build test
Build a simple widgets qmake project when targeting iOS in the CI. This ensure we don't introduce basic regressions in the .pri / .prl file generation. Make sure to target the ios simulator, so we don't require any code signing or provisioning profiles. Fixes: QTBUG-96058 Change-Id: I1a5564e838a5ce3cac89a37a5a4ddee74d3400f3 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 9e3e167223d2d16b4b0dac0be72ce212e47665b4) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/cmake/CMakeLists.txt18
-rw-r--r--tests/auto/cmake/test_build_simple_widget_app/test_build_simple_widget_app.pro5
2 files changed, 23 insertions, 0 deletions
diff --git a/tests/auto/cmake/CMakeLists.txt b/tests/auto/cmake/CMakeLists.txt
index 163ade3f59..82702a2c22 100644
--- a/tests/auto/cmake/CMakeLists.txt
+++ b/tests/auto/cmake/CMakeLists.txt
@@ -111,6 +111,24 @@ include("${_Qt6CTestMacros}")
if(NOT NO_WIDGETS)
_qt_internal_test_expect_pass(test_build_simple_widget_app)
+ set(extra_widget_app_options "")
+ if(IOS)
+ list(APPEND extra_widget_app_options
+ QMAKE_OPTIONS CONFIG+=iossimulator
+ )
+ endif()
+ if(CMAKE_HOST_WIN32)
+ # Unset MAKEFLAGS environment variable when invoking build tool, it might
+ # have options incompatible with nmake.
+ list(APPEND extra_widget_app_options
+ BUILD_ENVIRONMENT MAKEFLAGS ""
+ )
+ endif()
+
+ _qt_internal_add_qmake_test(test_build_simple_widget_app
+ TESTNAME test_build_simple_widget_app_qmake
+ ${extra_widget_app_options}
+ )
endif()
# We only support a limited subset of cmake tests when targeting iOS:
diff --git a/tests/auto/cmake/test_build_simple_widget_app/test_build_simple_widget_app.pro b/tests/auto/cmake/test_build_simple_widget_app/test_build_simple_widget_app.pro
new file mode 100644
index 0000000000..30834e2ee2
--- /dev/null
+++ b/tests/auto/cmake/test_build_simple_widget_app/test_build_simple_widget_app.pro
@@ -0,0 +1,5 @@
+TEMPLATE = app
+SOURCES += main.cpp
+QT += widgets
+CONFIG += app_bundle
+TARGET = simple_widget_app