Commit Graph

4068 Commits

Author SHA1 Message Date
Alexander Kanavin
3f69d525d8 rust: build the default set of tools
Setting it explicitly replaces rust's default choice which is rustdoc
(needed for example in selftests and otherwise expected to be present
in typical rust installations):

https://github.com/rust-lang/rust/blob/master/config.example.toml#L320

This addresses some of the rust selftest failures but not all. Help
is appreciate to restore the selftest.

Unfortunately, this also breaks rust reproducibility (or rather exposes
that it was never properly fixed, as explained here:
https://lists.openembedded.org/g/openembedded-core/message/199288
)

(From OE-Core rev: 58eaf2ee6c0809bf0a0d3c1d177e62bda7241651)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-05-28 15:09:01 +01:00
Ross Burton
306337e035 oeqa/manual: remove obsolete CROPS and Eclipse manually testing scripts
The Eclipse plugin is very dead, we don't need to carry the manual test
guide for it.

CROPS has its own automated testing, nobody is doing the testing by hand.

(From OE-Core rev: f74a634f199782ce5fa3023d02079c1534bc4aeb)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-05-28 09:38:24 +01:00
Ola x Nilsson
02f6d0793a oeqa/selftest/devtool: add test for modifying recipes using go.bbclass
go.bbclass uses a special do_unpack function that causes the git root
to be different from S.  Verify that it unpacks as expected.

[ YOCTO #15483 ]

(From OE-Core rev: fab0c737b95b8d0c0bbf58336bc308776c956406)

Signed-off-by: Ola x Nilsson <olani@axis.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-05-28 09:38:23 +01:00
Philip Lorenz
e51697ef90 package_manager: Share more common DEB / IPK code
Avoid code duplication by making `extract` a shared method (and
retrieving the package manager specific input via an abstract method).
Additionally, follow Python conventions and prefix class internal
methods with "_" to indicate that they shouldn't be called externally.

(From OE-Core rev: c4b126e216dfe8251ec55074be78188fcc3fcea8)

Signed-off-by: Philip Lorenz <philip.lorenz@bmw.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-05-28 09:38:23 +01:00
Philip Lorenz
f7e9eb03d2 package_manager: Move OpkgDpkgPM into common module
The OpkgDpkgPM class was introduced to share common functionality
between the Opkg and Debian package manager implementations. However,
for unknown reasons , the refactoring done in
5bc67f5502 duplicated the common class
into the deb and ipk modules. Undo this part of the change by moving the
common base class into a newly created module.

The two variants did not diverge a lot (next to the payload name
generalization, the Debian variant missed
17e2eaed03) and as such no regressions
should be expected.

(From OE-Core rev: c7830c5879f6fa68fa9f47ee59b7bf7f2d276c81)

Signed-off-by: Philip Lorenz <philip.lorenz@bmw.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-05-28 09:38:23 +01:00
Philip Lorenz
b2a59134dc ipk: Fix clean up of extracted IPK payload
It turns out that the IPK payload tarball was actually cleaned up in the
concrete package manager implementation (most likely because at some
point Debian and IPK packages used different compression algorithms).

Globbing removes this ambiguity so move the removal of the payload into
the common extract method.

(From OE-Core rev: 1e2b02a54f482159e21902eeb997b21e00e9588e)

Signed-off-by: Philip Lorenz <philip.lorenz@bmw.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-05-28 09:38:23 +01:00
Alexander Kanavin
f4663a02e5 selftest/sstatetests: move exception list for cache objects to the parent class
This is useful not just in cdn/local cache tests, but also in the build bundle test,
and so should be applied by default.

(From OE-Core rev: 37f0ba71868ef1907883ab751c82ba222fbc87da)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-05-28 09:38:23 +01:00
Alexander Kanavin
c149c74605 selftest/sstatetests: separate sstate presence check into its own class
This allows reusing the check function in tests other than CDN/local mirror
ones, such as sstate bundle testing.

(From OE-Core rev: 8a4ab4c063f307b480d98c6aac1e76cde0b9e99e)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-05-28 09:38:23 +01:00
Alexander Kanavin
11762e4dc3 bblayers/makesetup: move check for existence of git remotes to oe-setup-layers plugin
This helps when making a local copy of all the layers: it's fine to
not have any remotes configured in that case.

Also correct the mistake in accessing 'contains_this_file' property:
it may not necessarily exist, and if so, it should default to False.

(From OE-Core rev: 639df31e57b7f3da2d475cbae9a79d45755dede6)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-05-28 09:38:22 +01:00
Alexander Kanavin
8332fd532f bblayers/makesetup: include local repository paths in discovered layer repo data
This can be useful when the caller needs to know where the repos actually
are on local disk (for example to make a local copy of them or obtain
additional information about them).

This field however should be removed from the json output in oe-setup-layers
plugin, as it is host-specific and not part of the schema.

(From OE-Core rev: ee33ebf6140ad13e401c2cccbb106a22043be356)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-05-28 09:38:22 +01:00
Alexander Kanavin
f82c933a4b bblayers/makesetup: raise exceptions when errors happen
Otherwise the calling code can only issue a generic, unhelpful
erorr message, and it's difficult to tell what went wrong
if logger.error output is obscured or redirected.

(From OE-Core rev: 155fe6bda2d715aa616fa8db922dbaa11ebb8080)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-05-28 09:38:22 +01:00
Richard Purdie
d24a7d0fb1 base: Switch UNPACKDIR to a subdir of WORKDIR
Change do_unpack to unpack files to a subdirectory of WORKDIR instead of WORKDIR
itself. There are several good reasons for this but it is mainly about being able
to isolate the output of the unpack task and tell the files apart from other things
which are created in workdir (logs, sysroots, temp dirs and more).

This means that when the do_unpack task reruns, we can clean UNPACKDIR and know
we have a standard point to start builds from.

It also makes code in tools like devtool and recipetool easier.

To reduce the impact to users, if a subdirectory under UNPACKDIR matches
the first subdirectory under WORKDIR of S, that directory is moved into position
inside WORKDIR. This preserves the behaviour of S = "${WORKDIR}/git",
S = "${WORKDIR}/${BPN}" and other commonly used source directory setups.

The directory is moved since sadly many autotools based projects can't cope with
symlinks in their paths.

The patch also updates reproducible and SOURCE_DATE_EPOCH handling to
match the new potential source locations. We can get rid of the horrible
list of hardcoded directories in WORKDIR to ignore from that code.

(From OE-Core rev: b84eec5c4cbf4b39d6712800dd0d2fe5337721cb)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-05-22 22:26:29 +01:00
Ross Burton
d2e7656f4f oeqa/sdk: remove unused imports from test cases
Remove redundant imports.

(From OE-Core rev: b6223259458578d8b967aff11d3263dfed496708)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-05-22 10:21:26 +01:00
Ross Burton
fd2714953d oeqa/sdk: rename test cases
Instead of having a test called eg "assimp", rename it to "cmake" as the
point of the test is to verify that CMake works.  This should make it
clearer what the tests are actually exercising.

(From OE-Core rev: ccf7fdc0e5b6df218b319f972cd5ba142c06c243)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-05-22 10:21:26 +01:00
Richard Purdie
41eb98ac61 oeqa/sdk/assimp: Upgrade and fix for gcc 14
To enable this test to work with gcc 14, pass the option to make
warnings non-fatal. Also upgrade to version 5.4.1 from 5.3.1.

(From OE-Core rev: c3df6287ae26dc9d7f11eb7e26fdbcaefe4dfead)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-05-21 12:08:05 +01:00
Ross Burton
4eac8c0c0e oeqa/sdkext/devtool: replace use of librdfa
librdfa hasn't had a commit for a decade now and as such has problems
with modern compilers (specifically gcc 14.1).  Switch the recipe
creation test to something much simpler that we also control: dbus-wait.

(From OE-Core rev: d801de1f702d8d0def55011b5b6ad39d85f978f1)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-05-21 12:08:04 +01:00
Richard Purdie
a5cea4c0b4 recipes: Ensure S is set to a valid directory
Several recipes have S pointing at a directory that does not exist.
Set S in these cases to somethig valid making the metadata and
recipe behaviour more consistent.

Tweak one of the QA test diff offsets to match the changed recipe.

(From OE-Core rev: 22f1f5849a9a3bf287dbe8933546e52e39ddc86e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-05-21 12:08:04 +01:00
Richard Purdie
6d77296d83 devtool: Drop oe-local-files and simplify
The only real reason for oe-local-files was to support S = WORKDIR. With changes to
drop support for that, it makes sense to simplify devtool and to try and make both
the code and the processes/workflows simpler.

This patch drops support for S = WORKDIR, removes oe-local-files and then updates
the test cases to match this new situation.

At the code level, we assume we can always now track code changes using git and
that things committed into git are handled as patches (as before) but delta against
HEAD is saved as specific file level changes to the recipe.

One test is disabled as it is no longer approproate. It is being keped until we can
make WORKDIR != UNPACKDIR at which point it should be revisited.

(From OE-Core rev: ce8190c519052fed10b5233697b69a75868db45a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-05-21 12:08:04 +01:00
Richard Purdie
71c6db8e65 recipes: Start WORKDIR -> UNPACKDIR transition
Replace references of WORKDIR with UNPACKDIR where it makes sense to do
so in preparation for changing the default value of UNPACKDIR.

(From OE-Core rev: 1f18b9a512800860d5153d89eb82b56388efad6f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-05-21 12:08:04 +01:00
Richard Purdie
d0ea89b312 selftest/cases/runtime_test: Exclude centos-9 from virgl tests
Similarly to centos 8, centos 9 doesn't support the render device we need
for this test.

(From OE-Core rev: c2be3afabf84f287c90b61ae2509728a6634fb8f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-05-17 08:54:22 +01:00
Ross Burton
8a04f529f2 oeqa/selftest/debuginfod: use localpkgfeed to speed server startup
Sometimes the debuginfod selftest fails due to a timeout, because it
spends too long scanning a huge deploy directory that due to what tests
were ran previously can contain 30K packages.

The test only needs a subset of the feed, so use the new localpkgfeed
class to construct a minimal feed before running the test.

[ YOCTO #14937 ]

(From OE-Core rev: 855376f518b28248ccd82ef5b2e89e6a8c970542)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-05-15 16:39:19 +01:00
Ross Burton
6582436a1d lib/oe/package-manager: allow including self in create_packages_dir
This function is typically used to construct a limited feed for image
creation, but there are other cases when you might want a limited feed
and include the current recipe's packages in it.

To ensure that existing behaviour is preserved, add a boolean to control
this behaviour and default it to False.

(From OE-Core rev: aada7fda2b118152d82b1ab295d92b8251afe4ac)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-05-15 16:39:19 +01:00
Trevor Gamblin
cec77d941e patchtest: utils: remove unused functions
Specifically, remove four things:

- get_subject_prefix(): This function is only being used once (in the next
function found in the module), so remove it for easier
comprehension/maintenance.
- exec_cmd: the backend for executing a custom command
- exec_cmds: for running multiple calls to exec_cmd
- CmdException: A custom exception class specifically for exec_cmd

These are only used to execute git commands, but GitPython can be used
to handle all of that more efficiently, so remove them.

(From OE-Core rev: e2fabdd6d53ee30a67992bd966961f423f18a388)

Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-05-13 16:28:35 +01:00
Trevor Gamblin
9c4e350797 patchtest: tests: update bugzilla_entry_format.fail testfile
Update the test file to target a more stable README file.

(From OE-Core rev: 3d0649ea8ca9dde982ee67aa866170ea4297ef4c)

Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-05-13 16:28:35 +01:00
Trevor Gamblin
9132e3904a patchtest: repo: refactor to use GitPython
The repo module currently uses a custom _exec() function in order to run
various git commands as part of the patchtest setup/test process. These
can more efficiently be done with the GitPython module, so use that
instead and reduce the amount of custom code to be maintained for
patchtest in the process. Some specifics replaced using GitPython:

- get branch list
- use repo.active_branch to determine current branch
- use execute() for checkout, merge check, abort, rev-parse, reset

The _exec() function is removed entirely with this change.

(From OE-Core rev: 8ab3a0d7cb68746d7b7e1c7ff8bdf9a84a4d075d)

Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-05-13 16:28:35 +01:00
Trevor Gamblin
e73ea1a868 patchtest: requirements.txt: add GitPython
GitPython provides some simple utilities for retrieving repo
configurations that can replace the manual work that patchtest currently
does. Add it to the requirements so that the source can make use of it.

(From OE-Core rev: dd4e4adfe91333fbd52d1441e2864a570e0dd073)

Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-05-13 16:28:35 +01:00
Philip Lorenz
f0b560e0a5 lib/package_manager/ipk: Do not hardcode payload compression algorithm
The chosen payload compression algorithm can be changed by overriding
`OPKGBUILDCMD`. Ensure that package extraction deals with this by
globbing for "data.tar.*" to select the actual payload tarball.

(From OE-Core rev: 2ad05635a6da403b4fadcc126fe7734067c12c73)

Signed-off-by: Philip Lorenz <philip.lorenz@bmw.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-05-13 15:42:27 +01:00
Richard Purdie
ee432c5172 oeqa/selftest/devtool: Fix for usrmerge in DISTRO_FEATURES
If usrmerge is in DISTRO_FEATURES, assumptions in one of the tests would
fail. Improve the test so it works in both cases.

(From OE-Core rev: afa211746a2aa1993a54cc5a5e1937679341da8e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-05-09 09:48:58 +01:00
Richard Purdie
ead42232e7 oeqa/selftest/recipetool: Fix for usrmerge in DISTRO_FEATURES
If usrmerge is in DISTRO_FEATURES, assumptions in one of the tests would
fail. Improve the test so it works in both cases.

(From OE-Core rev: 68a27d307a7042e242c49cf3d069469f40e09902)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-05-09 09:48:58 +01:00
Richard Purdie
808f700efc classes/lib/scripts: Initial WORKDIR -> UNPACKDIR updates
Work through the initial issues I found where we need to change WORKDIR
to UNPACKDIR.

(From OE-Core rev: 86fec41b1e809d1a2fa2feadc26d29020df53d39)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-05-02 15:15:51 +01:00
Richard Purdie
812dafbec1 base/bitbake.conf: Introduce UNPACKDIR
Having the unpack directory hardcoded to WORKDIR makes it really hard to
make any changes to the unpack process to try and allow for cleanup for example.

As a first step toward unraveling the intertwined location usages, add a
variable, UNPACKDIR which is where the fetcher is asked to unpack fetched
sources. It defaults to the existing value of WORKDIR at this point.

(From OE-Core rev: e022d62ba917790af2121da57646271ef17c03fa)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-05-02 15:15:51 +01:00
Alexandre Truong
268dfbd949 Revert "oeqa/selftest/devtool: fix test_devtool_add_git_style2"
This reverts commit ab6d3e3d64
from poky repository.

The previous reverted commit was a workaround. The fix
"oeqa/selftest/devtool: fix _test_devtool_add_git_url"
tackle the issue. So, the workaround is not needed anymore.

(From OE-Core rev: 731f47ecfd8ad6558aac629806810789c623986b)

Signed-off-by: Alexandre Truong <alexandre.truong@smile.fr>
Reviewed-by: Yoann Congal <yoann.congal@smile.fr>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-04-30 22:20:16 +01:00
Alexandre Truong
3c05286fa1 oeqa/selftest/devtool: fix _test_devtool_add_git_url
This patch is a follow-up to the bug#15466.

As a reminder, the bug was about devtool’s submodule detection
checking for HEAD when a version is being passed.

As Vincent Kriek pointed out:
the --version that is being passed to devtool is only used for
setting the PV value in the recipe. To take into account the tag,
we add --srcrev to the command:
devtool add --srcrev v3.1.0 --version v3.1.0 mbedtls git://git@github.com/ARMmbed/mbedtls.git;protocol=https

Changes to _test_devtool_add_git_url have been made to take
into account the srcrev. srcrev will be passed as an optional
parameter because the test_devtool_add_git_style1
does not need the srcrev contrary to test_devtool_add_git_style2

Fixes [YOCTO #15466]

(From OE-Core rev: a8686f3641e4407dee3d807898ffd620e2732b78)

Signed-off-by: Alexandre Truong <alexandre.truong@smile.fr>
Reported-by: Alexandre Truong <alexandre.truong@smile.fr>
Suggested-by: Vincent Kriek <vincent@coelebs.dev>
Reviewed-by: Yoann Congal <yoann.congal@smile.fr>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-04-30 22:20:16 +01:00
Julien Stephan
aace45f9b8 oeqa/selftest/devtool: add test for updating local files into another layer
We don't have a test to check if we can correctly devtool update-recipe/finish
into another layer. So update the existing test_devtool_update_recipe_local_files
to also check the updates into another layer.

(From OE-Core rev: bd44c895d36e246a25c7a6e40bf9f4089dc7a297)

Signed-off-by: Julien Stephan <jstephan@baylibre.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-04-25 10:10:14 +01:00
Julien Stephan
e9939fe2c6 oeqa: selftest: context: run tests serially if testtools/subunit modules are not found
If testtools and/or subunit modules are not found we get the following backtrace
(example for testtools):

  NOTE: Starting bitbake server...
  Traceback (most recent call last):
    File "<..>/poky/scripts/oe-selftest", line 60, in
  <module>
      ret = main()
    File "<..>/poky/scripts/oe-selftest", line 47, in main
      results = args.func(logger, args)
    File "<..>/poky/meta/lib/oeqa/selftest/context.py",
  line 391, in run
      rc = self._internal_run(logger, args)
    File "<..>/poky/meta/lib/oeqa/selftest/context.py",
  line 377, in _internal_run
      rc = self.tc.runTests(**self.tc_kwargs['run'])
    File "<..>/poky/meta/lib/oeqa/selftest/context.py",
  line 161, in runTests
      return super(OESelftestTestContext, self).runTests(processes, skips)
    File "<..>/poky/meta/lib/oeqa/core/context.py", line
  91, in runTests
      result = self.runner.run(self.prepareSuite(self.suites, processes))
    File "<..>/poky/meta/lib/oeqa/selftest/context.py",
  line 154, in prepareSuite
      from oeqa.core.utils.concurrencytest import ConcurrentTestSuite
    File
  "<..>/poky/meta/lib/oeqa/core/utils/concurrencytest.py",
  line 22, in <module>
      import testtools
  ModuleNotFoundError: No module named 'testtools'

Fix this by adding a custom callback on -j/--num-processes parameter to
check testtools and subunit modules. Fallback to serial testing if
missing. This strategy is already used in sdk/context.py

(From OE-Core rev: 35284404473b2c2d9f69594582868ed66ef3525e)

Signed-off-by: Julien Stephan <jstephan@baylibre.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-04-23 13:40:24 +01:00
Khem Raj
622235b4de oeqa/postactions: Do not use -l option with df
-l option is specific to df provided by coreutils, if df
applet from busybox is used then it does not work and fails
like below

Fixes
   df: invalid option -- 'l'
   BusyBox v1.36.1 () multi-call binary.

   Usage: df [-PkmhT] [-t TYPE] [FILESYSTEM]...
   DEBUG: [Command returned '1' after 0.71 seconds]
   DEBUG: Command: df -hl
   Status: 1 Output:  df: invalid option -- 'l'

it seems worth a compromise to show remote mounted filesystems if any
during ptests and it works with both df implementations

(From OE-Core rev: 75cc1ea4348a2294fdc5ab20530fcff27056ff06)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-04-23 13:40:24 +01:00
Trevor Gamblin
f15ea3ad06 patchtest: test_metadata: fix invalid escape sequences
Clear up the following warnings seen during patchtest runs:

|/workspace/yocto/poky/meta/lib/patchtest/tests/test_metadata.py:21: SyntaxWarning: invalid escape sequence '\+'
|  add_mark = pyparsing.Regex('\+ ')
|/workspace/yocto/poky/meta/lib/patchtest/tests/test_metadata.py:26: SyntaxWarning: invalid escape sequence '\:'
|  git_regex = pyparsing.Regex('^git\:\/\/.*')

(From OE-Core rev: 2d64317835a768898aac592b24fcbdfaf6c8357a)

Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-04-23 13:40:24 +01:00
Jose Quaresma
110ee701b3 sstatesig: fix netrc.NetrcParseError exception
Looks like sometimes the e.filename and the e.lineno is not properly set by the netrc
and this can cause TypeError.

| File "/poky/meta/lib/oe/sstatesig.py", line 342, in init_rundepcheck
|     bb.warn("Error parsing %s:%d: %s" % (e.filename, e.lineno, e.msg))
|             ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| TypeError: %d format: a real number is required, not NoneType

(From OE-Core rev: 486ed69939f1b7572f121960c2dde246032686e7)

Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-04-04 21:50:24 +01:00
Alexandre Truong
ab6d3e3d64 oeqa/selftest/devtool: fix test_devtool_add_git_style2
The problem is the following:
AssertionError: 'gitsm://git@github.com/ARMmbed/mbedtls.git;protocol=https;branch=master' != 'git://git@github.com/ARMmbed/mbedtls.git;protocol=https;branch=master'

Mbedlts made changes to their repository, adding a sub-module, thus the
assert triggers an error with the url:
git://git@github.com/ARMmbed/mbedtls.git;protocol=https;branch=master

456a54da8e
was the upstream change.

To fix the issue, the url has been changed to:
gitsm://git@github.com/ARMmbed/mbedtls.git;protocol=https;branch=master

(From OE-Core rev: 9ac737fbe05c85ec8333b396ce2f89de6654916f)

Signed-off-by: Alexandre Truong <alexandre.truong@smile.fr>
Reviewed-by: Yoann Congal <yoann.congal@smile.fr>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-04-04 21:50:24 +01:00
Baruch Siach
0c9d83138e oeqa/selftest/overlayfs: test read-only rootfs
Use the read-only squashfs filesystem to test the read-only case.

(From OE-Core rev: 1a61da196f014dc34a998d3e46f03abc79ebc84d)

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Vyacheslav Yurkov <uvv.mail@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-04-04 14:05:03 +01:00
Richard Purdie
30d88a2043 oeqa/sstatetests: Fix race issue
Under some load conditions, the result event can come back before the
command complete event. If that happens, the code would hang
indefinitely.

Rework the code to wait for both events and avoid the hang.

(From OE-Core rev: 8cfc94a4404c54bc73eab9f98d9da1f84c2135ad)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-03-31 06:57:01 +01:00
lixiaoyong
66f2f710e6 oe/package: enhance objdump command call with llvm
Replace `${HOST_PREFIX}objdump` with `${OBJDUMP}`.

When utilizing llvm for compiling packages, the invocation of GNU objdump
will consistently occur during package precess. This behavior is unfriendly
to llvm. So prefer `${OBJDUMP}` over `${HOST_PREFIX}objdump`.

(From OE-Core rev: fac4d33041d8feb041e617b9b16689c4d3a522cb)

Signed-off-by: lixiaoyong <lixiaoyong19@huawei.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-03-30 22:25:43 +00:00
Jermain Horsman
9b839a835c bblayers/makesetup.py: Move git utility functions to oe.buildcfg module
This allows other classes to make use of these as well.

Includes a git describe and git toplevel function and functions
to get info for git remotes.

(From OE-Core rev: a04a084b6e513d15cb57ee103c6d6215ce1c75b9)

Signed-off-by: Jermain Horsman <jermain.horsman@nedap.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-03-30 22:25:43 +00:00
Alexander Kanavin
d1622b87f8 selftest/sstatetests: run CDN check twice, ignoring errors the first time
The current CDN isn't able to serve all objects on first request, and it
was suggested to work around that by trying again:
https://bugzilla.yoctoproject.org/show_bug.cgi?id=15335#c16

Once CDN moves to a better location this can probably be reverted.

[YOCTO #15335]

(From OE-Core rev: 0db3466303f56736d2fa9a105435eaaadb385082)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-03-30 22:22:19 +00:00
Joshua Watt
df60c6d3ee sstatesig: Warn on bad .netrc
If there is an error parsing .netrc, warn the user

(From OE-Core rev: 47ea9418dfa31a87bc0014c482be5bfdc9df98e1)

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-03-26 17:10:51 +00:00
Joshua Watt
84cb5d2568 sstatesig: Set hash server credentials from bitbake variables
Allows the hash server credentials to be specified in bitbake variables.
If omitted, the users .netrc will be checked

(From OE-Core rev: ba391d39f2b888706e53028e9df3a37c5baedfc1)

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-03-23 10:18:20 +00:00
Eilís 'pidge' Ní Fhlannagáin
2b5903f511 sstatetests.py: Add testing for correct sstate permissions
This patch adds to run_test_sstate_creation so that it also tests
that sstate directories don't accidentally pickup umask permissions
from the user upon creation.

[RP: Python style tweaking]
(From OE-Core rev: 7d6eb828e97ad3f27d94efdccd920fb2aef36743)

Signed-off-by: Eilís 'pidge' Ní Fhlannagáin <pidge@baylibre.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-03-07 17:27:51 +00:00
Richard Purdie
0bd3234676 oeqa/runtime/login: Fix dbus-wait timeout and loop conditional
The dbus-wait command returns a timeout after 60s but reports "success", detect this.
Unfortunately it does effectively break the test as the signal is nearly never being
correctly detected since it was already sent.

For that reason comment out the code instead too.

Also fix the loop conditional as the logic was incorrect and it was looping
indefinitely when an image match didn't occur.

(From OE-Core rev: 89c930e9e4b38b116edcba59e88621a39f8bda67)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-03-07 17:27:51 +00:00
Eilís 'pidge' Ní Fhlannagáin
f6235fef62 oeqa/runtime/login: Add screenshot sample logic/timeout/dbus-wait
This patch uses dbus-wait to wait for matchbox to be up. Once that
happens, it sets a timeout of 60 seconds and takes a screenshot
and compares it, every 2 seconds. If diff=0 it passes. If the timeout
ends, it fails.

(From OE-Core rev: 287b4f0a8244f7214f6a1aaa84ef16cc528f8326)

Signed-off-by: Eilís 'pidge' Ní Fhlannagáin <pidge@baylibre.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-03-07 17:27:51 +00:00
Eilís 'pidge' Ní Fhlannagáin
59c7b5e706 oeqa/runtime/login: Exclude qemuriscv64
Excluding riscv64 due to mouse rather than a touchscreen which adds a
moving cursor, so the diff ends up > 0. Need to fix the image to use the
touchscreen rather than mouse input.

(From OE-Core rev: 7f7032c7613abd62ce510c98211c75fc7c5e7090)

Signed-off-by: Eilís 'pidge' Ní Fhlannagáin <pidge@baylibre.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-03-07 17:27:51 +00:00