diff options
author | Thune Tran <thune.a.tran@boeing.com> | 2025-06-26 20:57:21 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-07-01 08:49:37 +0100 |
commit | 041ba867db947c9336c47747c621d2a1719d5c4c (patch) | |
tree | ae5fa9e709e159b239bafaa17f5ece9d5a8c929a /meta/lib/oeqa/buildtools-docs/cases/build.py | |
parent | ece7bb5490c8c8cc8db6529cad5f512e591d2ecb (diff) | |
download | poky-041ba867db947c9336c47747c621d2a1719d5c4c.tar.gz |
oeqa/sdk: Simplify test specification and discovery
Simplify how tests are specified and discovered for different SDK configurations
to allow per-layer customization.
* Introduce `TESTSDK_CASE_DIRS` variable to specify test directory types,
replacing the need to modify the default_cases class member
* Discover tests from configured layers using a common discovery pattern
(`<LAYER_DIR>/lib/oeqa/<dirname>/cases`) where `<dirname>` is specified in `TESTSDK_CASE_DIRS`
* The buildtools directories were renamed to follow the common discovery pattern
(`<LAYER_DIR>/lib/oeqa/<dirname>/cases`) for consistency across all SDK configurations.
meta/lib/oeqa/
├── sdk/cases/ # Standard SDK: dirname="sdk"
├── buildtools/cases/ # Buildtools: dirname="buildtools"
└── buildtools-docs/cases/ # Buildtools-docs: dirname="buildtools-docs"
meta-mingw/lib/oeqa/
└── sdkmingw/cases/ # MinGW: dirname="sdkmingw"
meta-foo/lib/oeqa/
└── sdk/cases/ # Standard SDK: dirname="sdk"
Tested by:
1. Adding new tests using the default discovery pattern `<LAYER_DIR>/lib/oeqa/sdk/cases` and
verifying they are discovered and executed.
2. Verifying existing SDK configuration tests work (requires -c populate_sdk first):
* Standard SDK: `bitbake core-image-minimal -c testsdk`
* Buildtools tarball: `bitbake buildtools-tarball -c testsdk`
* Buildtools docs tarball: `bitbake buildtools-docs-tarball -c testsdk`
* Mingw SDK: (SDKMACHINE = "x86_64-mingw32") `bitbake core-image-minimal -c testsdk`
(From OE-Core rev: bde94c128c0b4e7e1ebea40f582b4dd6dcc965ff)
Signed-off-by: Thune Tran <thune.a.tran@boeing.com>
Signed-off-by: Chuck Wolber <chuck.wolber@boeing.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/buildtools-docs/cases/build.py')
-rw-r--r-- | meta/lib/oeqa/buildtools-docs/cases/build.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/meta/lib/oeqa/buildtools-docs/cases/build.py b/meta/lib/oeqa/buildtools-docs/cases/build.py new file mode 100644 index 0000000000..6e3ee94292 --- /dev/null +++ b/meta/lib/oeqa/buildtools-docs/cases/build.py | |||
@@ -0,0 +1,19 @@ | |||
1 | # | ||
2 | # Copyright OpenEmbedded Contributors | ||
3 | # | ||
4 | # SPDX-License-Identifier: MIT | ||
5 | # | ||
6 | |||
7 | import tempfile | ||
8 | from oeqa.sdk.case import OESDKTestCase | ||
9 | from oeqa.utils.subprocesstweak import errors_have_output | ||
10 | errors_have_output() | ||
11 | |||
12 | class BuildTests(OESDKTestCase): | ||
13 | """ | ||
14 | Verify that our docs can build using our docs tools tarball. | ||
15 | """ | ||
16 | def test_docs_build(self): | ||
17 | with tempfile.TemporaryDirectory(prefix='docs-tarball-build-', dir=self.tc.sdk_dir) as testdir: | ||
18 | self._run('git clone git://git.yoctoproject.org/yocto-docs %s' % testdir) | ||
19 | self._run('cd %s/documentation && make html' % testdir) | ||