diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-03-16 19:58:57 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-03-18 23:27:28 +0000 |
commit | 20058345e0a2027aea5213f02ad4016b4bda69d1 (patch) | |
tree | 730da7f66d9119d76b2da658d92493cc2f973777 | |
parent | 153208c7e5321295848307ec479a7b69c83894b0 (diff) | |
download | poky-20058345e0a2027aea5213f02ad4016b4bda69d1.tar.gz |
buildtools-docs-tarball: Add test for building documentation using sphinx
(From OE-Core rev: 26b224a1bbe27b5d9886be4552147e1d66e34519)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/lib/oeqa/sdk/buildtools-docs-cases/README | 2 | ||||
-rw-r--r-- | meta/lib/oeqa/sdk/buildtools-docs-cases/build.py | 17 | ||||
-rw-r--r-- | meta/recipes-core/meta/buildtools-docs-tarball.bb | 4 | ||||
-rw-r--r-- | meta/recipes-core/meta/buildtools-tarball.bb | 5 |
4 files changed, 26 insertions, 2 deletions
diff --git a/meta/lib/oeqa/sdk/buildtools-docs-cases/README b/meta/lib/oeqa/sdk/buildtools-docs-cases/README new file mode 100644 index 0000000000..f8edbc7dad --- /dev/null +++ b/meta/lib/oeqa/sdk/buildtools-docs-cases/README | |||
@@ -0,0 +1,2 @@ | |||
1 | These test cases are used by build-docs-tarball, and are not used by the testsdk | ||
2 | class. | ||
diff --git a/meta/lib/oeqa/sdk/buildtools-docs-cases/build.py b/meta/lib/oeqa/sdk/buildtools-docs-cases/build.py new file mode 100644 index 0000000000..5b0eca046f --- /dev/null +++ b/meta/lib/oeqa/sdk/buildtools-docs-cases/build.py | |||
@@ -0,0 +1,17 @@ | |||
1 | # | ||
2 | # SPDX-License-Identifier: MIT | ||
3 | # | ||
4 | |||
5 | import tempfile | ||
6 | from oeqa.sdk.case import OESDKTestCase | ||
7 | from oeqa.utils.subprocesstweak import errors_have_output | ||
8 | errors_have_output() | ||
9 | |||
10 | class BuildTests(OESDKTestCase): | ||
11 | """ | ||
12 | Verify that our docs can build using our docs tools tarball. | ||
13 | """ | ||
14 | def test_docs_build(self): | ||
15 | with tempfile.TemporaryDirectory(prefix='docs-tarball-build-', dir=self.tc.sdk_dir) as testdir: | ||
16 | self._run('git clone git://git.yoctoproject.org/yocto-docs %s' % testdir) | ||
17 | self._run('cd %s/documentation && make html' % testdir) | ||
diff --git a/meta/recipes-core/meta/buildtools-docs-tarball.bb b/meta/recipes-core/meta/buildtools-docs-tarball.bb index 72a256cf04..72648e3b1c 100644 --- a/meta/recipes-core/meta/buildtools-docs-tarball.bb +++ b/meta/recipes-core/meta/buildtools-docs-tarball.bb | |||
@@ -13,4 +13,6 @@ TOOLCHAIN_HOST_TASK += "\ | |||
13 | 13 | ||
14 | TOOLCHAIN_OUTPUTNAME = "${SDK_ARCH}-buildtools-docs-nativesdk-standalone-${DISTRO_VERSION}" | 14 | TOOLCHAIN_OUTPUTNAME = "${SDK_ARCH}-buildtools-docs-nativesdk-standalone-${DISTRO_VERSION}" |
15 | 15 | ||
16 | SDK_TITLE = "Docs Build tools tarball" \ No newline at end of file | 16 | SDK_TITLE = "Docs Build tools tarball" |
17 | |||
18 | TESTSDK_CASES = "buildtools-docs-cases" | ||
diff --git a/meta/recipes-core/meta/buildtools-tarball.bb b/meta/recipes-core/meta/buildtools-tarball.bb index 60f6aac837..fac91cfc3c 100644 --- a/meta/recipes-core/meta/buildtools-tarball.bb +++ b/meta/recipes-core/meta/buildtools-tarball.bb | |||
@@ -99,11 +99,14 @@ TOOLCHAIN_NEED_CONFIGSITE_CACHE = "" | |||
99 | # The recipe doesn't need any default deps | 99 | # The recipe doesn't need any default deps |
100 | INHIBIT_DEFAULT_DEPS = "1" | 100 | INHIBIT_DEFAULT_DEPS = "1" |
101 | 101 | ||
102 | # Directory in testsdk that contains testcases | ||
103 | TESTSDK_CASES = "buildtools-cases" | ||
104 | |||
102 | python do_testsdk() { | 105 | python do_testsdk() { |
103 | import oeqa.sdk.testsdk | 106 | import oeqa.sdk.testsdk |
104 | testsdk = oeqa.sdk.testsdk.TestSDK() | 107 | testsdk = oeqa.sdk.testsdk.TestSDK() |
105 | 108 | ||
106 | cases_path = os.path.join(os.path.abspath(os.path.dirname(oeqa.sdk.testsdk.__file__)), "buildtools-cases") | 109 | cases_path = os.path.join(os.path.abspath(os.path.dirname(oeqa.sdk.testsdk.__file__)), d.getVar("TESTSDK_CASES")) |
107 | testsdk.context_executor_class.default_cases = cases_path | 110 | testsdk.context_executor_class.default_cases = cases_path |
108 | 111 | ||
109 | testsdk.run(d) | 112 | testsdk.run(d) |