From 7684814b8b01bb8b1326be380d2d7f45f775d24a Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Wed, 7 Feb 2024 15:11:04 +0100 Subject: [PATCH] Coin: Set COIN_CROSS_PLATFORM_VERSION_TEST environment variable We have certain platforms where we build on one OS version (the latest) and then test on an older version. macOS is an example of such a platform. Set the COIN_CROSS_PLATFORM_VERSION_TEST environment variable to true for such platforms. They usually have a dependency on the main OS version and are marked with the TestOnly feature. This is useful information that can be used by CMake build tests in order to skip those that do not account for the difference in OS versions. Change-Id: I6eeeac98abe6beb00ce431e17589f8e093ed23e4 Reviewed-by: Toni Saario Reviewed-by: Qt CI Bot --- .../cmake_run_ctest_enforce_exit_code.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/coin/instructions/cmake_run_ctest_enforce_exit_code.yaml b/coin/instructions/cmake_run_ctest_enforce_exit_code.yaml index 4d5d25a2407..a7039b5015e 100644 --- a/coin/instructions/cmake_run_ctest_enforce_exit_code.yaml +++ b/coin/instructions/cmake_run_ctest_enforce_exit_code.yaml @@ -88,6 +88,22 @@ instructions: - !include "{{qt/qtbase}}/coin_module_test_android_start_emulator.yaml" + - type: EnvironmentVariable + variableName: COIN_CROSS_PLATFORM_VERSION_TEST + variableValue: "TRUE" + enable_if: + condition: and + conditions: + - condition: property + property: platformDependency + not_equals_value: null + - condition: property + property: platformDependency.target.osVersion + not_equals_property: target.osVersion + - condition: property + property: features + contains_value: TestOnly + - type: ExecuteCommand command: "{{.Env.TESTS_ENV_PREFIX}} ctest {{.Env.CTEST_ARGS}}" executeCommandArgumentSplitingBehavior: SplitAfterVariableSubstitution