mirror of
https://git.yoctoproject.org/poky
synced 2026-06-11 04:19:50 +00:00
buildtools-docs-tarball: Add test for building documentation using sphinx
(From OE-Core rev: 26b224a1bbe27b5d9886be4552147e1d66e34519) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
These test cases are used by build-docs-tarball, and are not used by the testsdk
|
||||
class.
|
||||
@@ -0,0 +1,17 @@
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
import tempfile
|
||||
from oeqa.sdk.case import OESDKTestCase
|
||||
from oeqa.utils.subprocesstweak import errors_have_output
|
||||
errors_have_output()
|
||||
|
||||
class BuildTests(OESDKTestCase):
|
||||
"""
|
||||
Verify that our docs can build using our docs tools tarball.
|
||||
"""
|
||||
def test_docs_build(self):
|
||||
with tempfile.TemporaryDirectory(prefix='docs-tarball-build-', dir=self.tc.sdk_dir) as testdir:
|
||||
self._run('git clone git://git.yoctoproject.org/yocto-docs %s' % testdir)
|
||||
self._run('cd %s/documentation && make html' % testdir)
|
||||
@@ -13,4 +13,6 @@ TOOLCHAIN_HOST_TASK += "\
|
||||
|
||||
TOOLCHAIN_OUTPUTNAME = "${SDK_ARCH}-buildtools-docs-nativesdk-standalone-${DISTRO_VERSION}"
|
||||
|
||||
SDK_TITLE = "Docs Build tools tarball"
|
||||
SDK_TITLE = "Docs Build tools tarball"
|
||||
|
||||
TESTSDK_CASES = "buildtools-docs-cases"
|
||||
|
||||
@@ -99,11 +99,14 @@ TOOLCHAIN_NEED_CONFIGSITE_CACHE = ""
|
||||
# The recipe doesn't need any default deps
|
||||
INHIBIT_DEFAULT_DEPS = "1"
|
||||
|
||||
# Directory in testsdk that contains testcases
|
||||
TESTSDK_CASES = "buildtools-cases"
|
||||
|
||||
python do_testsdk() {
|
||||
import oeqa.sdk.testsdk
|
||||
testsdk = oeqa.sdk.testsdk.TestSDK()
|
||||
|
||||
cases_path = os.path.join(os.path.abspath(os.path.dirname(oeqa.sdk.testsdk.__file__)), "buildtools-cases")
|
||||
cases_path = os.path.join(os.path.abspath(os.path.dirname(oeqa.sdk.testsdk.__file__)), d.getVar("TESTSDK_CASES"))
|
||||
testsdk.context_executor_class.default_cases = cases_path
|
||||
|
||||
testsdk.run(d)
|
||||
|
||||
Reference in New Issue
Block a user