From 0e6c4224f00999d4089d7c2ac462bb5a60a14adc Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Mon, 15 Mar 2021 17:03:38 +0100 Subject: CMake: Build minimal subset of tests in desktop static builds Add new configure option -make minimal-static-tests and CMake option QT_BUILD_MINIMAL_STATIC_TESTS. In conjunction with QT_BUILD_TESTS it will enable building a minimal subset of tests when targeting a static desktop Qt build. In qtbase the minimal subset includes all the auto tests of testlib, tools, corelib and cmake. In particular this will also do cmake build tests and qmake build tests (tst_qmake) Adjust CI instructions to enable building a minimal subset of static tests when a platform configuration is tagged with the MinimalStaticTests feature. Fix and skip a few tests that were failing. Pick-to: 6.1 Task-number: QTBUG-87580 Task-number: QTBUG-91869 Change-Id: I1fc311b8d5e743ccf05047fb9a7fdb813a645206 Reviewed-by: Joerg Bornemann --- .../instructions/cmake_build_and_upload_test_artifacts.yaml | 13 +++++++++---- .../cmake_regular_test_instructions_enforced.yaml | 4 ---- 2 files changed, 9 insertions(+), 8 deletions(-) (limited to 'coin') diff --git a/coin/instructions/cmake_build_and_upload_test_artifacts.yaml b/coin/instructions/cmake_build_and_upload_test_artifacts.yaml index 84077980b8..4b3e3d46bf 100644 --- a/coin/instructions/cmake_build_and_upload_test_artifacts.yaml +++ b/coin/instructions/cmake_build_and_upload_test_artifacts.yaml @@ -23,6 +23,15 @@ instructions: env_var: COIN_CMAKE_ARGS equals_value: null + # Inform CMake to build just a minimal set of tests for static Qt builds. + - type: AppendToEnvironmentVariable + variableName: COIN_CMAKE_ARGS + variableValue: " -DQT_BUILD_MINIMAL_STATIC_TESTS=ON" + enable_if: + condition: property + property: features + contains_value: "MinimalStaticTests" + - !include "{{qt/qtbase}}/call_cmake_for_standalone_tests.yaml" - type: ExecuteCommand command: "{{.Env.TESTS_ENV_PREFIX}} cmake --build . --parallel -v" @@ -35,7 +44,3 @@ instructions: archiveDirectory: "{{.BuildDir}}" maxTimeInSeconds: 1200 maxTimeBetweenOutput: 1200 -disable_if: - condition: property - property: configureArgs - contains_value: "-DBUILD_SHARED_LIBS=OFF" diff --git a/coin/instructions/cmake_regular_test_instructions_enforced.yaml b/coin/instructions/cmake_regular_test_instructions_enforced.yaml index b7308a8f47..197b925c2a 100644 --- a/coin/instructions/cmake_regular_test_instructions_enforced.yaml +++ b/coin/instructions/cmake_regular_test_instructions_enforced.yaml @@ -2,7 +2,3 @@ type: Group instructions: - !include "{{qt/qtbase}}/cmake_regular_test_instructions_common.yaml" - !include "{{qt/qtbase}}/cmake_run_ctest_enforce_exit_code.yaml" -disable_if: - condition: property - property: configureArgs - contains_value: "-DBUILD_SHARED_LIBS=OFF" -- cgit v1.2.3