From 3da46b5fc2ea04be85c458f9eac88dbe1f091757 Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Tue, 22 Oct 2024 16:34:43 +0200 Subject: [PATCH] coin: De-duplicate test docs instructions Add a new coin_test_docs_common.yaml file that contains the common instructions for configuring a documentation warning build. Pick-to: 6.8 Task-number: QTBUG-128730 Change-Id: Ifc86570f3c98e64364f3c2c2bb71f45eaaee0c19 Reviewed-by: Toni Saario --- coin/instructions/coin_module_test_docs.yaml | 35 ++------------ coin/instructions/coin_qtbase_test_docs.yaml | 35 ++------------ coin/instructions/coin_test_docs_common.yaml | 48 ++++++++++++++++++++ 3 files changed, 58 insertions(+), 60 deletions(-) create mode 100644 coin/instructions/coin_test_docs_common.yaml diff --git a/coin/instructions/coin_module_test_docs.yaml b/coin/instructions/coin_module_test_docs.yaml index 942bdbb2b03..cc96ec1087e 100644 --- a/coin/instructions/coin_module_test_docs.yaml +++ b/coin/instructions/coin_module_test_docs.yaml @@ -1,38 +1,13 @@ type: Group instructions: - type: EnvironmentVariable - variableName: QDOC_NOLINKERRORS - variableValue: 1 + variableName: COIN_TEST_DOCS_CALL_QTBASE_CONFIGURE + variableValue: "0" - type: EnvironmentVariable - variableName: QDOC_ENABLE_WARNINGLIMIT - variableValue: 1 - - type: SetBuildDirectory - directory: "{{.SourceDir}}" - - type: ChangeDirectory - directory: "{{.BuildDir}}" - - type: ExecuteCommand - command: "cp -rfs /opt/qt-doctools/. {{.InstallDir}}" - userMessageOnFailure: > - Failed to create links to provisioned binaries. + variableName: COIN_TEST_DOCS_CONFIGURE_EXTRA_CMAKE_ARGS + variableValue: "{{.Env.COIN_DOC_CMAKE_ARGS}}" - - !include "{{qt/qtbase}}/prepare_building_env.yaml" - - - type: EnvironmentVariable - variableName: COIN_CMAKE_ARGS - variableValue: "-DQT_BUILD_TESTS=OFF {{.Env.COIN_DOC_CMAKE_ARGS}}" - - type: EnvironmentVariable - variableName: CONFIGURE_ENV_PREFIX - variableValue: "{{.Env.ENV_PREFIX}}" - - - !include "{{qt/qtbase}}/call_configure_module.yaml" - - - type: ExecuteCommand - command: "{{.Env.ENV_PREFIX}} cmake --build . --target generate_docs -v" - ignoreExitCode: false - maxTimeInSeconds: 1800 - maxTimeBetweenOutput: 900 - userMessageOnFailure: > - Documentation check failed, see the log for details. + - !include "{{qt/qtbase}}/coin_test_docs_common.yaml" enable_if: condition: and conditions: diff --git a/coin/instructions/coin_qtbase_test_docs.yaml b/coin/instructions/coin_qtbase_test_docs.yaml index 2c46001cc3f..698defd0470 100644 --- a/coin/instructions/coin_qtbase_test_docs.yaml +++ b/coin/instructions/coin_qtbase_test_docs.yaml @@ -1,39 +1,14 @@ type: Group instructions: - type: EnvironmentVariable - variableName: QDOC_NOLINKERRORS - variableValue: 1 + variableName: COIN_TEST_DOCS_CALL_QTBASE_CONFIGURE + variableValue: "1" - type: EnvironmentVariable - variableName: QDOC_ENABLE_WARNINGLIMIT - variableValue: 1 - - type: SetBuildDirectory - directory: "{{.SourceDir}}" - - type: ChangeDirectory - directory: "{{.BuildDir}}" - - type: ExecuteCommand - command: "cp -rfs /opt/qt-doctools/. {{.InstallDir}}" - userMessageOnFailure: > - Failed to create links to provisioned binaries. - - - !include "{{qt/qtbase}}/prepare_building_env.yaml" - - - type: EnvironmentVariable - variableName: COIN_CMAKE_ARGS + variableName: COIN_TEST_DOCS_CONFIGURE_EXTRA_CMAKE_ARGS # Use unix separators even on Windows, to avoid escaping issues in the configure script. - variableValue: "-DQT_BUILD_TESTS=OFF -DCMAKE_INSTALL_PREFIX:PATH={{unixPathSeparators .InstallDir}}" - - type: EnvironmentVariable - variableName: CONFIGURE_ENV_PREFIX - variableValue: "{{.Env.ENV_PREFIX}}" + variableValue: "-DCMAKE_INSTALL_PREFIX:PATH={{unixPathSeparators .InstallDir}}" - - !include "{{qt/qtbase}}/call_configure_qtbase.yaml" - - - type: ExecuteCommand - command: "{{.Env.ENV_PREFIX}} cmake --build . --target generate_docs -v" - ignoreExitCode: false - maxTimeInSeconds: 1800 - maxTimeBetweenOutput: 900 - userMessageOnFailure: > - Documentation check failed, see the log for details. + - !include "{{qt/qtbase}}/coin_test_docs_common.yaml" enable_if: condition: and conditions: diff --git a/coin/instructions/coin_test_docs_common.yaml b/coin/instructions/coin_test_docs_common.yaml new file mode 100644 index 00000000000..f3b7b5b2da8 --- /dev/null +++ b/coin/instructions/coin_test_docs_common.yaml @@ -0,0 +1,48 @@ +type: Group +instructions: + - type: EnvironmentVariable + variableName: QDOC_NOLINKERRORS + variableValue: 1 + - type: EnvironmentVariable + variableName: QDOC_ENABLE_WARNINGLIMIT + variableValue: 1 + - type: SetBuildDirectory + directory: "{{.SourceDir}}" + - type: ChangeDirectory + directory: "{{.BuildDir}}" + - type: ExecuteCommand + command: "cp -rfs /opt/qt-doctools/. {{.InstallDir}}" + userMessageOnFailure: > + Failed to create links to provisioned binaries. + + - !include "{{qt/qtbase}}/prepare_building_env.yaml" + + - type: EnvironmentVariable + variableName: COIN_CMAKE_ARGS + variableValue: "-DQT_BUILD_TESTS=OFF {{.Env.COIN_TEST_DOCS_CONFIGURE_EXTRA_CMAKE_ARGS}}" + - type: EnvironmentVariable + variableName: CONFIGURE_ENV_PREFIX + variableValue: "{{.Env.ENV_PREFIX}}" + + - type: Group + instructions: + - !include "{{qt/qtbase}}/call_configure_qtbase.yaml" + enable_if: + condition: runtime + env_var: COIN_TEST_DOCS_CALL_QTBASE_CONFIGURE + equals_value: "1" + - type: Group + instructions: + - !include "{{qt/qtbase}}/call_configure_module.yaml" + enable_if: + condition: runtime + env_var: COIN_TEST_DOCS_CALL_QTBASE_CONFIGURE + not_equals_value: "1" + + - type: ExecuteCommand + command: "{{.Env.ENV_PREFIX}} cmake --build . --target generate_docs -v" + ignoreExitCode: false + maxTimeInSeconds: 1800 + maxTimeBetweenOutput: 900 + userMessageOnFailure: > + Documentation check failed, see the log for details.