summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/sdk/buildtools-cases
Commit message (Collapse)AuthorAgeFilesLines
* oeqa/sdk: Simplify test specification and discoveryThune Tran7 days5-111/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* oeqa: replace deprecated assertEqualsAdrian Freihofer2024-02-081-1/+1
| | | | | | | | | | | assertEquals is deprecated since Python 2.7: https://docs.python.org/2/library/unittest.html#deprecated-aliases It throws errors at least on Python 3.12. Replace it by assertEqual. (From OE-Core rev: 68286d0b70cf09a0d2950b48945c9192fb8c8769) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib: Add copyright statements to files without oneRichard Purdie2022-08-124-0/+8
| | | | | | | | | Where there isn't a copyright statement, add one to make it explicit. Also add license identifiers as MIT if there isn't one. (From OE-Core rev: bb731d1f3d2a1d50ec0aed864dbca54cf795b040) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/buildtools: Switch to our webserver instead of example.comRichard Purdie2022-02-121-2/+2
| | | | | | | | | Similarly to the sanity connectivity check, switch away from example.com for the buildtools tests. (From OE-Core rev: ed10f3c2b4c678069fe1cee73f79f6e388c7777e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa: Update cleanup code to wait for hashserv exitRichard Purdie2021-10-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We sometimes see exceptions from code seeing the hashserv DB files being removed at directory cleanup time. Add a check to ensure the hashserv has written the data base journal (and hence likely exited) before cleaning up. This will hopefully avoid errors like: Traceback (most recent call last): File "[...]/meta/lib/oeqa/sdk/buildtools-cases/build.py", line 30, in test_libc delay = delay - 1 File "/usr/lib/python3.6/tempfile.py", line 948, in __exit__ self.cleanup() File "/usr/lib/python3.6/tempfile.py", line 952, in cleanup _rmtree(self.name) File "/usr/lib/python3.6/shutil.py", line 486, in rmtree _rmtree_safe_fd(fd, path, onerror) File "/usr/lib/python3.6/shutil.py", line 424, in _rmtree_safe_fd _rmtree_safe_fd(dirfd, fullname, onerror) File "/usr/lib/python3.6/shutil.py", line 444, in _rmtree_safe_fd onerror(os.unlink, fullname, sys.exc_info()) File "/usr/lib/python3.6/shutil.py", line 442, in _rmtree_safe_fd os.unlink(name, dir_fd=topfd) FileNotFoundError: [Errno 2] No such file or directory: 'hashserv.db-wal' (From OE-Core rev: 0b07d9add687d78495176cda0f3011c10ffa4d4b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/buildtools-cases: Allow bitbake time to shutdownRichard Purdie2021-09-011-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | bitbake may still be shutting down when the UI exits. Wait for the lock to disappear before trying to delete the directory to avoid errors. Traceback (most recent call last): File "/home/pokybuild/yocto-worker/buildtools/build/meta/lib/oeqa/sdk/buildtools-cases/build.py", line 23, in test_libc self._run('. %s/oe-init-build-env %s && bitbake virtual/libc' % (corebase, testdir)) File "/usr/lib64/python3.7/tempfile.py", line 807, in __exit__ self.cleanup() File "/usr/lib64/python3.7/tempfile.py", line 811, in cleanup _shutil.rmtree(self.name) File "/usr/lib64/python3.7/shutil.py", line 494, in rmtree _rmtree_safe_fd(fd, path, onerror) File "/usr/lib64/python3.7/shutil.py", line 452, in _rmtree_safe_fd onerror(os.unlink, fullname, sys.exc_info()) File "/usr/lib64/python3.7/shutil.py", line 450, in _rmtree_safe_fd os.unlink(entry.name, dir_fd=topfd) FileNotFoundError: [Errno 2] No such file or directory: 'bitbake.sock' (From OE-Core rev: 94df60cc97058444188ec8372c2d9849e74b76c6) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/sdk: add HTTPS test for buildtoolsRoss Burton2021-08-181-0/+20
| | | | | | | | | | Verify that HTTPS connections work in both wget and Python, as this depends on variables correctly pointing to the certificate chain. (From OE-Core rev: 5c2b1fb09e786ec392979d21dc7884ca23cd84f0) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/sdk: add relocation test for buildtoolsRoss Burton2021-08-181-0/+29
| | | | | | | | | | | | The buildtools-extended tarball includes GCC, which relies on being relocated correctly to work. Add a test case that verifies that the loader paths have all been relocated, as otherwise there are hard-to-debug errors at build time. (From OE-Core rev: fe1f675ea156722a3709b13cd751479c9528134d) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/sdk: add some buildtools testsRoss Burton2021-08-123-0/+47
These two tests are designed to exercise the buildtools-tarball. SanityTests simply verifies that inside the SDK, some commands are used from the SDK. BuildTests creates a new OE build directory and builds virtual/libc to verify that a basic build works correctly. DL_DIR is reused to avoid needless downloading, but sstate is not shared to ensure a build does happen. (From OE-Core rev: 6157d6ffa32d6df383c29d4b6de07feb9d619913) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>