Skip to content

Commit

Permalink
coin: De-duplicate test docs instructions
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
alcroito committed Oct 30, 2024
1 parent f7f02c7 commit 3da46b5
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 60 deletions.
35 changes: 5 additions & 30 deletions coin/instructions/coin_module_test_docs.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
35 changes: 5 additions & 30 deletions coin/instructions/coin_qtbase_test_docs.yaml
Original file line number Diff line number Diff line change
@@ -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}}"

- !include "{{qt/qtbase}}/call_configure_qtbase.yaml"
variableValue: "-DCMAKE_INSTALL_PREFIX:PATH={{unixPathSeparators .InstallDir}}"

- 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:
Expand Down
48 changes: 48 additions & 0 deletions coin/instructions/coin_test_docs_common.yaml
Original file line number Diff line number Diff line change
@@ -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.

0 comments on commit 3da46b5

Please sign in to comment.