Commit Graph

6742 Commits

Author SHA1 Message Date
Richard Purdie
a72cd0d6d0 bitbake: runqueue: Fix scenetask processing performance issue
Analysis shows that "bitbake core-image-ptest-all" spends a lot of
time in scenequeue_updatecounters and much of it is rebuilding a set
which doens't change. Reorder the code to avoid that performance
glitch.

(Bitbake rev: 923c19b9713e398d8e66e6d4422dfd4c18a03486)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-11-29 22:13:25 +00:00
Richard Purdie
abc603870a bitbake: runqueue: Optimise setscene loop processing
Rather than looping through things we looped through on the previous execution,
start looping where we left off for setscene processing. This gives speed
improvements depending on the kind of build being executed.

(Bitbake rev: 00f4d932e3af0eeb333339cbe942010fc76dee0f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-11-29 22:13:25 +00:00
Richard Purdie
05b02e3d57 bitbake: runqueue: Fix performance of multiconfigs with large overlap
There have been complaints about the performance of large multiconfig builds
for a while. The key missing data point was that the builds needed to have large
overlaps in sstate objects. This can be simulated by building the same things with
just different TMPDIRs. In runqueue/bitbake terms this equates to large numbers of
deferred tasks.

The issue is that the expensive checks in the setscene loop were hit every time
through runqueue's execute function before the check on deferred tasks. This leads
to task execution starvation as that only happens once per iteration.

Move the skip check earlier in the function which speeds things up enormously
and should improve performance of such builds for users.

(Bitbake rev: 9c6c506757f2b3e28c8b20513b45da6b4659c95f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-11-29 22:13:25 +00:00
Pascal Eberhard
b35dc1a99d bitbake: fetch2: fix unpack of a single zstd file
do_unpack generates a 'Bitbake Fetcher Error: UnpackError' when
uncompressing a single 'file.zst', zstd command line returns the error
'unexpected end of file', and the input file 'file.zst' becomes empty.

The command line is 'zstd --decompress --stdout file.zst > file.zst'.
So the issue is that the input and output filenames are the same.

Fix the output filename when using zstd for a single file.

(Bitbake rev: 5881ca0e0d53937cd25a57ff682a3b7577b0b7f8)

Signed-off-by: Pascal Eberhard <pascal.eberhard@se.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-11-29 18:26:14 +00:00
Joshua Watt
29da7370d2 bitbake: Remove custom exception backtrace formatting
Removes the code in bitbake to show custom backtrace formatting for
exceptions. In particular, the bitbake exception code prints function
arguments, which while helpful is a security problem when passwords and
other secrets can be passed as function arguments.

As it turns out, the handling of the custom serialized exception stack
frames was pretty much made obsolete by d7db75020ed ("event/msg: Pass
formatted exceptions"), which changed the events to pass a preformatted
stacktrack list of strings, but the passing of the serialized data was
never removed.

Change all the code to use the python traceback API to format exceptions
instead of the custom code; conveniently traceback.format_exception()
also returns a list of stack trace strings, so it can be used as a drop
in replacement for bb.exception.format_exception()

(Bitbake rev: 2cda75a185aaf8f657f072dac34f8cef9d75f63a)

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-11-28 00:06:24 +00:00
Ross Burton
ef5aaedf2a bitbake: bb/build: add a function to list the tasks in a datastore
There's no easy way to list all of the tasks in a recipe, you can either
look at __BBTASKS (internal variable, shouldn't be used) or iterate all
items in the datastore looking for variables with the 'task' flag set
(which is slow).

Solve this problem by adding a bb.build.listtasks() function that
returns an immutable copy of the __BBTASSK variable.

(Bitbake rev: 185c4b803962b20ba65a7d885dfe1a14e68736ef)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-11-28 00:06:24 +00:00
Richard Purdie
b4bd930fb2 bitbake: fetch/wget: Increase timeout to 100s from 30s
Testing shows the worst case CDN response time can be up to 100s. The wget fetcher
is used for accessing sstate from the CDN so increase our timeouts there to match
our worst case repsonse times.

(Bitbake rev: 7aca591529e115bc277f93811d8c586630acc8c3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-11-21 12:16:28 +00:00
Richard Purdie
f95a645dd4 bitbake: bitbake-worker/cooker: Increase default pipe size
The default pipe size is 64kb on builds, which can be inefficient
for larger log files from workers. Increase the pipe size to 512kb
since build systems have decent amounts of memory and this is a more
efficient way of batching the data.

Tweak the default read sizes to match the pipe size for efficiency.

Since the contstant is only present in python 3.10 onwards, add
some compatibility code.

(Bitbake rev: 69c14e46600ba5ae9703f67704ab2548875ae6d7)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-11-21 12:16:28 +00:00
Richard Purdie
282cc1ea92 bitbake: cooker: Drop support for BB_DANGLINGAPPENDS_WARNONLY
DANGLINGAPPENDS_WARNONLY is a very poorly designed interface and
is commonly abused. The challenge is that once it is set, by any
layer, it applies everywhere.

Some layers rely on this to get notification they need to update
bbappend files and having the behaviour change from inclusion of an
antisocial layer is not good.

In addition, showing warnings as an accepted thing on the console
devalues them and trains the user to ignore them. I want to steer us
away from this mindset.

We could extend the functionality and make it apply only to certain
layers, or only to certain appends but then we've basically re-invented
BBMASK.

Given all the above, we should drop support for BB_DANGLINGAPPENDS_WARNONLY
and direct anyone with issues to BBMASK instead.

https://lists.openembedded.org/g/openembedded-architecture/message/2029

[YOCTO #14870]

(Bitbake rev: fca9c9e3cb6f8e9f99bf51dc5e8a8d83f4c84c69)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-11-21 12:16:28 +00:00
Yoann Congal
30a3ac4a2e bitbake: tinfoil: add new "finalizeData" API
Create a new tinfoil API "finalizeData" which does key expantion and
runs the anonymous functions to allow bitbake-getvar to have the same
output as "bitbake -e".

(Bitbake rev: 63db64ca98564420a378f14c337074ae06da8c63)

Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-11-18 13:41:38 +00:00
Yoann Congal
0317315a97 bitbake: command: fix needconfig for revalidateCaches
Fixes what looked like a type since parseConfiguration.needconfig is
already set just after parseConfiguration() definition.

(Bitbake rev: d371df029ece3b9e600a89d08337c437a8ddbf63)

Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-11-07 22:17:43 +00:00
Richard Purdie
fc027ef55f bitbake: server/process: Decrease idle/main loop frequency
The idle and main loops have socket select calls to know when to execute.
This means we can increase the normal timeout frequency since this is
just a fall back and have some small efficiency gains.

(Bitbake rev: 8d8e17af8619c976819170c9d5d9a686a666c317)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-11-07 13:36:04 +00:00
Richard Purdie
9500cf65a7 bitbake: server/process: Don't send heartbeats when no idle functions
If there are no idle functions present, don't sent heartbeat events. These
are only meant to happen while builds are active.

(Bitbake rev: 9a2d5e63b07c3912838781776c61f0f1ac9640e1)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-11-07 13:36:04 +00:00
Richard Purdie
f8f45ebde4 bitbake: server/process: Merge a function to simplfy code
Keeping this code separate just makes the code harder to understand,
merge them.

(Bitbake rev: e5ac26a0e1779df1da3277bf48899c8f7642f1f8)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-11-07 13:36:04 +00:00
Richard Purdie
79f193ffa0 bitbake: runqueue: Avoid dumpsigs idle loop blocking
We're seeing some failures on hosts where slow "idle" loop iterations are
causing bitbake server timeouts. These seem to happen particularly in the
dump_signatures() function within runqueue.

That isn't entirely surprising since it creates a pool of threads to execute
work an at best can take around 10s to execture and return control backto the
main loop. On a slow system, it is understandable this can take longer,
particularly as these functions are creating large chunks of IO.

Since the work is being done in threads, we can launch them, return to idle
and check on the results periodically as they complete.

This should hopefully address some of the remaining timeout issues we see on
the autobuilder in oe-selftest sstate tests.

(Bitbake rev: e66f1b643b4b77404ba31f2704cda5af9bf00a57)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-11-07 13:36:04 +00:00
Justin Bronder
f700c1b774 bitbake: bb/compress: use lz4 instead of lz4c
lz4c has been considered deprecated by upstream since at least 2018 [1]
and has been disabled by default recently [2].  openSUSE Tumbleweed is
no longer packaging the deprecated version and others will likely
follow.

Luckily, we're not using any legacy-specific options and, going back as
far as Ubuntu 16.04/Fedora 25, both lz4 and lz4cli are installed as part
of the same package

1. https://github.com/lz4/lz4/pull/553
2. https://github.com/lz4/lz4/pull/1479

(Bitbake rev: 907472034b344e4eb73cfd43059a413469f52e1c)

Signed-off-by: Justin Bronder <jsbronder@cold-front.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-11-05 11:17:17 +00:00
Robert Yang
0884c31b1b bitbake: cooker: Sort pn-buildlist
So that we can compare the different pn-buildlist easily.

(Bitbake rev: 529043117a7c62feb45bc891658a412cc8dd7e3f)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-11-05 11:17:17 +00:00
Richard Purdie
59d4ee01ca bitbake: tests/fetch: Use our own mirror of mobile-broadband-provider to decouple from gnome gitlab
GNOME gitlab has occasional downtime which impacts bitbake-selftest
and causes autobuilder failures. Switch to our own mirror for test
purposes to avoid those issues.

(Bitbake rev: 91e268b11ed683bd197026f9b36001f6d54ee05c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-10-29 22:27:45 +00:00
Richard Purdie
2abe7cedbf bitbake: tests/fetch: Use our own mirror of sysprof to decouple from gnome gitlab
GNOME gitlab has occasional downtime which impacts bitbake-selftest
and causes autobuilder failures. Switch to our own mirror for test
purposes to avoid those issues.

(Bitbake rev: 008808755ed6cfeb6c41273e69ce718f0833c26c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-10-28 14:08:33 +00:00
Robert Yang
0a45ba64ad bitbake: git: Clean broken symlink
The file may be a symlink when mirror from local disk, and the symlink will be
broken when the linked file is removed, use os.path.islink() to check and
remove the broken symlink.

(Bitbake rev: d0deb5fe6e7a84b07b49ef685b209729d2fdc780)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-10-28 14:08:33 +00:00
Robert Yang
dd9d183621 bitbake: git: Clean shallow mirror tarball
Fixed:
BB_GIT_SHALLOW = "1"
BB_GENERATE_SHALLOW_TARBALLS = "1"
$ bitbake utfcpp -cfetch && bitbake utfcpp -ccleanall

The downloads/gitsmshallow_github.com.nemtrif.*.tar.gz won't be cleaned without
this fix.

(Bitbake rev: bab7a8970a0237a9d24217685a595e76a1336c07)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-10-28 14:08:33 +00:00
Robert Yang
5bce38fbae bitbake: gitsm: Add clean function
Fixed:
$ bitbake utfcpp -cfetch && bitbake utfcpp -ccleanall

The downloads/git2/github.com.nemtrif.ftest won't be cleaned without this fix.

(Bitbake rev: 79f25fc5c1b8d0e08540f4aa07875309f5325f47)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-10-28 14:08:33 +00:00
Robert Yang
8d9c02ccfc bitbake: gitsm: Remove downloads/tmpdir when failed
The tmpdir such as downloads/tmplp3cnemv won't be removed without this fix.

(Bitbake rev: 2ba8d3214759142afc11f0a88d80eb30a8bcde3a)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-10-28 14:08:33 +00:00
Robert Yang
04c1ee924b bitbake: gitsm: Add call_process_submodules() to remove duplicated code
There are 14 lines can be removed, and can make it easy to maintain.

(Bitbake rev: 0ea2c1ac079d63349407a69172ff80cd9acc7252)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-10-28 14:08:33 +00:00
Richard Purdie
0fac8e96f7 bitbake: toaster/tests/browser/layerdetails: Drop unwanted test skipping/exception handling
We really don't want to be skipping a test like this, drop the exception handling
code as in my testing we thankfully no longer seem to be seeing it. If we do again
we need to fix the underlying issue.

(Bitbake rev: b67547f890dc7f347ec05a97cbfb22d3703998cc)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-10-24 11:24:03 +01:00
Richard Purdie
6ee37562d4 bitbake: toaster/tests/functional/utils: Handle WebDriverException
Fix the exception handling in the cancel builds function.

This involved adding WebDriverException which sometimes occurs but
also correcting the other exception handlers to continue to increment
the timeout to avoid test hangs.

(Bitbake rev: e111a2bd4f7a8a4dc2c63e94e91ac6cacca95af8)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-10-24 11:24:03 +01:00
Richard Purdie
56a8e5283e bitbake: toaster/tests/browser/helper: Add wait for jquery to complete
Most of the tests that click on buttons need the DOM to stablise, including
any running JQuery code before the test can proceed. Add calls to do this
whenever we're about to click on an element.

(Bitbake rev: 0eb206b355248e2a874a62baec30025652f2a5a8)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-10-24 11:24:03 +01:00
Richard Purdie
1f2b8a27ea bitbake: toaster/tests/functional/project_page: Use wait_until_element_clickable before click calls
Switch the clickable() calls to use the new element_clickable() function
which accepts a finder labmda function. This means if the element doesn't
yet exist, the code can rebuild the query and try again once a small
amount of time has elapsed.

There were a ton of timing related races around these element interactions
and this seemed to be the most robust way to address the issues.

The change also makes some of the elements slightly more specific so
the code can work effectively.

(Bitbake rev: 38643aadbb5a960004b886cf7709beaf2fc96652)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-10-24 11:24:03 +01:00
Richard Purdie
7fef43d98a bitbake: toaster/tests/functional/util: Avoid test hangs
If the element never exists, the timeout is never incremented and the test
hangs indefinitely. Fix the exception handling to avoid that and allow
the timeout to happen.

(Bitbake rev: 9eabe923d457bbce65227da4cd71c275c32108e6)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-10-24 11:24:03 +01:00
Richard Purdie
524bbe060e bitbake: toaster/tests/browser: Add various fixes for test failures encountered
Fixes for the browser tests which:
* Add/improve waiting for specific elements
* Waiting for elements to be interactable, not just visible
* Hiding notification windows
* Using more specific asserts to obtain improved error messages

(Bitbake rev: 0c3f9bc2b9516d2af391f2e081280eb7fa62a05e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-10-24 11:24:03 +01:00
Richard Purdie
ed7105cb3f bitbake: toaster/tests/browser/helper: Add wait_until_element_clickable funciton
Add a variant of the clickable function that accepts an element parameter.

(Bitbake rev: a34b2451a0e3baaf3b2fd2eb351847ff6a5ee033)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-10-24 11:24:03 +01:00
Richard Purdie
dd14fac826 bitbake: toaster/tests/browser/helper: Improve wait_until_clickable exception handling
Our own Wait() class allows exception handling which this form of wrapper
does not. Switch the code to use our Wait() class to allow retrying upon
encountering those exceptions (such as an element not being present yet).

The displayed and visible test is what Selenium would be doing internally,
there is no JS reprensetation of clickable directly.

(Bitbake rev: 8266a01b750b3758badeee8fb3a1acfa72c17a93)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-10-24 11:24:03 +01:00
Richard Purdie
7671fdcaf6 bitbake: toaster/tests/functional/utils: Drop unused code from wait_until_build_cancelled
The code modifying the build object requires direct database access
which is potentially problematic. It was being run on a database which
was being reset after changes anyway so the code effectively did nothing.
Remove it as it is unneeded.

(Bitbake rev: 2e3fa624eb3972aef91d877337479eeb0f3dd365)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-10-24 11:24:03 +01:00
Richard Purdie
9c80b40ee5 bitbake: toaster/tests/browser/helpers: Drop remains of polling/sleep calls
Drop the remaining poll parameters from the helpers code along
with the remaining sleep call since the tests no longer depend
on this.

This has the nice benefit of significantly speeding up the toaster
test runs (45 minutes down to 12 minutes overall).

If a parameter is needed, it should be the timeout, not the polling
frequency.

(Bitbake rev: 6de912e4f278ffd694fb2258482081dc3bc61c7a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-10-24 11:24:03 +01:00
Richard Purdie
23483ff489 bitbake: toaster/tests/functiona/project_page_tab_config: Improve waits and drop polling
Drop the poll parameters and make the waits much more specific for
the requirements of the tests. This includes looping waiting for
a list of layer elements as that code was previously particularly
fragile.

(Bitbake rev: cf6b8e8aa5484110a41377ba42b3fdd9d6efd877)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-10-24 11:24:03 +01:00
Richard Purdie
bac01b0756 bitbake: toaster/tests/functiona/project_page_tab_config: Switch to using library create_project function
Switch this test module to use the common project creation code which contains
race fixes. That code requires the database access wrapper be dropped and
we no longer have ordering constraints.

There is one test that does require database access. Move this to a separate class
and allow database access there. Use ordering constraints to allow them to run
after the main code. They depend on the project creation from the other class which
isn't ideal but good enough for now.

(Bitbake rev: fa10ba2a8749415d8f06cfc15c228c6eb7df1bcf)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-10-24 11:24:03 +01:00
Richard Purdie
d0c0c00f6c bitbake: toaster/tests/browser/helpers: Add not visible wait function
In some cases we want to wait until some element is not visible.
Add such a function helper.

(Bitbake rev: cede6519d25112037264550126b109903220b58c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-10-24 11:24:03 +01:00
Richard Purdie
210417d0f4 bitbake: toaster/tests/functiona/project_page: Improve waits and drop polling
These changes:

* Drop the poll parameters
* Add waits where needed or make them more specific
* Add calls to close notification boxes since they can obscure
  other page elements
* In one case wait for a "Loading" message to be replaced

(Bitbake rev: 2bde969486a4761fa0e6f9590c9fa08d385666b1)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-10-24 11:24:03 +01:00
Richard Purdie
fa56ea47b1 bitbake: toaster/tests/functiona/project_page: Drop pointless test covered elsewhere
The project creation test is well covered in another module so just
drop this one as there isn't any extra value added here.

(Bitbake rev: d26414f191c73fb5330d10d97e240150a3fa1ee8)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-10-24 11:24:03 +01:00
Richard Purdie
566c6dca28 bitbake: toaster/tests/functiona/project_page: Switch to using library create_project function
Switch this test module to use the common project creation code which contains
race fixes. That code requires the database access wrapper be dropped and
we no longer have ordering constraints.

There are two tests that do require database access. Move these to a separate class
and allow database access there. Use ordering constraints to allow them to run
after the main code. They depend on the project creation from the other class which
isn't ideal but good enough for now.

(Bitbake rev: e441bfe98ac41d48692ffbaeec90a9c780337fa4)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-10-24 11:24:03 +01:00
Richard Purdie
57bdcaf417 bitbake: toaster/tests/functional/project_config: Fix the wait calls to avoid polling
Drop poll calls within the module, adding wait calls for elements of the
page where testing showed it was needed.

(Bitbake rev: 26746eae31f126ff87e678da66dcc976e412c89b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-10-24 11:24:03 +01:00
Richard Purdie
d17f42ec12 bitbake: toaster/tests/functional/basic: Improve the projects table selection to a common function
The project page selection code is race prone. Create a common function to resolve
the race issue and use it from all the call sites rather than duplicate code.

(Bitbake rev: f2bd615b97a6ff3944fa9c1d89a0ea996a12943d)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-10-24 11:24:03 +01:00
Richard Purdie
4d9ad3bb8e bitbake: toaster/tests/functional/helpers: Drop unneeded poll values and sleep
Drop the remaining poll values and the sleep within the main wait function
as the races this was working around now seem to be resolved with the
preceeding patches.

(Bitbake rev: 91e54cbacc57316a4f2ca766afac81e7f3a54718)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-10-24 11:24:03 +01:00
Richard Purdie
d230085ed9 bitbake: toaster/tests/browser: Drop unneeded poll parameters
In my testing I wasn't able to see issues needing the poll parameter in the
browser tests. Drop those.

(Bitbake rev: 3be5e7c78129abf059476416279718156fc666b5)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-10-24 11:24:03 +01:00
Richard Purdie
d67b698be2 bitbake: toaster/tests/browser: Increase the default wait timeout
Rather than hardcoded poll and sleep values, we want an overall long timeout
and to drop all the other 'sleeping' code.

To facilitate this, increase the overall timeout so we can then start to
remove the other values.

(Bitbake rev: 69a479383f9a8cae6600ce51b12b62be3a15ea38)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-10-24 11:24:03 +01:00
Richard Purdie
fa2ca6f1f9 bitbake: toaster/tests/function/basic: Make element detection more specific
The tests would race and potentially fail as the elements on the
page being waited for were not specific enough.

Add suitable elements to wait for and drop the remainder of the poll
parameters since these are no longer needed since we no longer need
to sleep for things to appear.

(Bitbake rev: 9db2fd8534610ad8db90a7a696fa7b748b497d15)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-10-24 11:24:03 +01:00
Richard Purdie
b04308f670 bitbake: toaster/tests/function/basic: Improve exception handling for error readability
The 'fail' calls are useful for find() failures but not for wrapping existing asserts
where they hide more useful error messages. Rework the code flow to give more readable
error reporting.

(Bitbake rev: 1a7a9af418874d3112aa6f148b30e5a4d3d176f3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-10-24 11:24:03 +01:00
Richard Purdie
f599d2c702 bitbake: toaster/tests/project_config: Reuse common project creation code
Switch this test module to use the common project creation code which contains
race fixes. That code requires the database access wrapper be dropped and
we no longer have ordering constraints.

(Bitbake rev: 653233a1c798d71800b41d3321203a48aa0337d8)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-10-24 11:24:03 +01:00
Richard Purdie
d4288a7785 bitbake: toaster/tests/functional_basic: Reuse common project creation code
Switch this test module to use the common project creation code which contains
race fixes. That code requires the database access wrapper be dropped and
we no longer have ordering constraints.

(Bitbake rev: f015d96e28d89fd0aef76ff127ebde8613125a66)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-10-24 11:24:03 +01:00
Richard Purdie
9ed0df26fb bitbake: toaster/tests/functional: Tweak the project creation function for better reuse
Tweak the function name and return the created project ID.

Allow the release_name test to be skipped with a value of None.

Add an extra wait call to ensure the create project button is ready
before clicking it.

(Bitbake rev: d20c6e3c67298c5db33b220a2e4a554e6f2c4418)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-10-24 11:24:03 +01:00