summaryrefslogtreecommitdiffstats
path: root/coin
diff options
context:
space:
mode:
authorTopi Reinio <topi.reinio@qt.io>2021-01-27 01:01:49 +0100
committerTopi Reiniƶ <topi.reinio@qt.io>2021-10-18 16:23:13 +0000
commit439f6c9576f33df4495364f2534551c98d9c47d7 (patch)
tree91b60006503711964ccdaf989a12a52fba2fb2f5 /coin
parentbcf3f63d52b849d3989f21228f8fb0ce285c3cb2 (diff)
coin: Add instructions to generate docs during testing
A single configuration provides qdoc and qtattributionsscanner via provisioning. The environment variables instruct QDoc to run in testing mode; it ignores linking warnings (since we don't have .index files for external documentation modules) and terminates with non-zero exit code if documentation warnings exceed the limit set in the documentation config. The provisioned binaries are portable, packaged together with their dependencies. As they are installed under /opt, the instructions create symlinks to the binaries in the install directory before building the 'generate_docs' target. Pick-to: 6.2 Task-number: QTBUG-78069 Fixes: QTBUG-95554 Change-Id: I4a4765250247e2fc6eddd153c36cf8126ddd10ae Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Diffstat (limited to 'coin')
-rw-r--r--coin/instructions/coin_module_test_docs.yaml36
-rw-r--r--coin/instructions/coin_qtbase_test_docs.yaml39
-rw-r--r--coin/module_config.yaml1
3 files changed, 76 insertions, 0 deletions
diff --git a/coin/instructions/coin_module_test_docs.yaml b/coin/instructions/coin_module_test_docs.yaml
new file mode 100644
index 0000000000..f42b6ae08f
--- /dev/null
+++ b/coin/instructions/coin_module_test_docs.yaml
@@ -0,0 +1,36 @@
+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.
+ - type: EnvironmentVariable
+ variableName: COIN_CMAKE_ARGS
+ variableValue: "-DQT_BUILD_TESTS=OFF {{.SourceDir}}"
+ - !include "{{qt/qtbase}}/call_cmake.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.
+enable_if:
+ condition: and
+ conditions:
+ - condition: property
+ property: features
+ contains_value: "TestDocs"
+ - condition: property
+ property: host.os
+ equals_property: target.os
diff --git a/coin/instructions/coin_qtbase_test_docs.yaml b/coin/instructions/coin_qtbase_test_docs.yaml
new file mode 100644
index 0000000000..824d8c5677
--- /dev/null
+++ b/coin/instructions/coin_qtbase_test_docs.yaml
@@ -0,0 +1,39 @@
+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.
+ - type: ExecuteCommand
+ command: "{{.Env.ENV_PREFIX}} cmake {{.Env.CONFIGURE_ARGS}} -DCMAKE_INSTALL_PREFIX:PATH={{.InstallDir}} -DQT_BUILD_TESTS=OFF {{.SourceDir}}"
+ executeCommandArgumentSplitingBehavior: SplitAfterVariableSubstitution
+ maxTimeInSeconds: 6000
+ maxTimeBetweenOutput: 1200
+ userMessageOnFailure: >
+ Failed to call cmake.
+ - 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.
+enable_if:
+ condition: and
+ conditions:
+ - condition: property
+ property: features
+ contains_value: "TestDocs"
+ - condition: property
+ property: host.os
+ equals_property: target.os
diff --git a/coin/module_config.yaml b/coin/module_config.yaml
index 6d7f067ebc..868b37f3dc 100644
--- a/coin/module_config.yaml
+++ b/coin/module_config.yaml
@@ -10,3 +10,4 @@ instructions:
Test:
- !include "{{qt/qtbase}}/coin_module_test_template_v3.yaml"
+ - !include "{{qt/qtbase}}/coin_qtbase_test_docs.yaml"