Commit Graph

7307 Commits

Author SHA1 Message Date
Richard Purdie
c665a2c933 bitbake: ast: Fix EXPORT_FUNCTIONS bug
If you have two classes, both of which set EXPORT_FUNCTIONS for the same funciton
and a standard funciton definition for the function that is exported, the export
function can sometimes overwrite the standard one.

The issue is that the internal flag the code uses isn't ovweritten if the variable
is giving a new value. Fix the issue by using a comment in the code that is injected
so that we know if it is ours or not.

Also add some testing for EXPORT_FUNCTIONS, not perfect but a start.

(Bitbake rev: 66306d5151acb0a26a171c338d8f60eb9eb16c6b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-10 13:55:33 +00:00
Alexander Kanavin
56b1af37dc bitbake: fetch/wget/checkstatus(): include the URL in debugging output about status check failure
Previously the output wasn't useful for finding out what was the actual
URL that failed, particularly in heavily multi-threaded invocations:

DEBUG: checkstatus() urlopen failed: HTTP Error 404: Not Found

With this change, the problem is described specifically:

DEBUG: checkstatus() urlopen failed for http://cdn.jsdelivr.net/yocto/sstate/all/universal/4f/91/sstate:gettext-minimal-native:x86_64-linux:0.22.4:r0:x86_64:11:4f91b650ebd7be601cbd0e3a37a8cc6385a3f4ee616f931969b50709ed8bf044_create_spdx.tar.zst: HTTP Error 404: Not Found

This will help with CDN cache tests in particular. When some object
isn't available, we need to know why: 4xx error, 5xx error, timeout
error or any other issue.

(Bitbake rev: ecd9b92815563509f55264ed6e7498aee797cedd)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-10 13:55:33 +00:00
Alexander Kanavin
4890c6a7ca bitbake: fetch/checkstatus(): do not print the URI twice in FetchError exception
Previously, there was duplicate clutter in the output, particularly if the
URI points to sstate cache items:

bb.fetch2.FetchError: Fetcher failure for URL: {uri}. URL {uri} doesn't work

(Bitbake rev: 61537b8a98b963e4af265e046d41407b32fa5935)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-10 13:55:33 +00:00
Robert Yang
4e2fcdb383 bitbake: bitbake: tests/event: Add test_lineno_in_eventhandler
Add test_lineno_in_eventhandler to test lineno in eventhandler.

(Bitbake rev: 4e5de537bebb68180c5755858c81b095eb9ae2f6)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-10 13:55:33 +00:00
Robert Yang
3f41592920 bitbake: bitbake: event: Inject empty lines to make code match lineno in filename
So that we can get the correct error messages.

* In python 3.10.9, the error message was:
  ERROR: Unable to register event handler 'defaultbase_eventhandler':
    File "/path/to/poky/meta/classes-global/base.bbclass", line 4
      # SPDX-License-Identifier: MIT
             ^^^^^
  SyntaxError: invalid syntax

  This is hard to debug since the error line number 4 is incorrect, but nothing
  is wrong with the code in line 4.

* Now the error message and lineno is correct:
  ERROR: Unable to register event handler 'defaultbase_eventhandler':
    File "/path/to/poky/meta/classes-global/base.bbclass", line 256
      an error line
         ^^^^^
  SyntaxError: invalid syntax

And no impact on parsing time:
* Before:
$ rm -fr cache tmp; time bitbake -p
real    0m27.254s

* Now:
$ rm -fr cache tmp; time bitbake -p
real    0m27.200s

(Bitbake rev: c212933d9c786806852c87f188250a4f0a14c048)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-10 13:55:33 +00:00
Alassane Yattara
36dc42bde7 bitbake: toaster/tests: Bug-fix ToasterTable show_rows testcases
Test if some rows are visible in table instead of compare row to row_to_show,
because sometime full avaiblable content did not display

Failed: https://autobuilder.yoctoproject.org/typhoon/#/builders/161/builds/147/steps/12/logs/stdio

(Bitbake rev: 5b0a48265aafa62259c575707c3afa6dd56f8008)

Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-10 13:55:33 +00:00
Alassane Yattara
0dcf84f830 bitbake: toaster/tests: Bug-fix "element not interactable" in TestLayerDetailsPage::test_edit_layerdetails
Failed: https://autobuilder.yoctoproject.org/typhoon/#/builders/161/builds/143/steps/12/logs/stdio

(Bitbake rev: 187e96eb7393632f28a195f280fa133439bdc0fa)

Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-10 13:55:33 +00:00
Alassane Yattara
c0ade693af bitbake: toaster/tests: bug-fix "#hint-error-project-name" should be visible
Failed: https://autobuilder.yoctoproject.org/typhoon/#/builders/161/builds/142

(Bitbake rev: 0ee5f4e06476b0ec2f5ea8c9f05d299ddda6312b)

Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-10 13:55:33 +00:00
Alassane Yattara
49ccf2f5e0 bitbake: toaster/tests: Setup delay after driver action self.get(url)
Recurring test failures result from insufficient delays in driver actions.

(Bitbake rev: b0de2a61d14fbf30e338751b285b3bab80192275)

Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-10 13:55:33 +00:00
Alassane Yattara
070aa22705 bitbake: toaster/tests: Delay driver first action on create new project page
Wait for element visible on create new project page

(Bitbake rev: 664de3f6d3484b94f5d82ec634b512b825553aa9)

Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-07 22:59:55 +00:00
Alassane Yattara
1cd56989a0 bitbake: toaster/tests: Bug-fix element click intercepted
Fix "element click intercepted" on TestProjectConfigTab::test_project_config_tab_right_section

(Bitbake rev: c8685c762aa1fab687ff3a0943487675ef720755)

Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-07 22:59:55 +00:00
Alassane Yattara
74c234bf0d bitbake: toaster/tests: Bug-fix on TestProjectConfigTab::test_image_recipe_show_rows
Check some rows are visible in table instead of compare table row to
row_to_show, because recipe image table sometime doesn't display full avaiblable
images

(Bitbake rev: 1e2e5927ef7a8adfd3d0a3be1c75b4aa410d9908)

Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-07 22:59:55 +00:00
Richard Purdie
71c0d311ba bitbake: bitbake: Version bump for find_siginfo chanages
Bump the version to 2.7.1 for the find_siginfo changes.

(Bitbake rev: 03995e16bf7186f5368f772f617d563f4d280641)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-05 11:59:08 +00:00
Alexander Kanavin
7d400f94fe bitbake: bitbake/runqueue: prioritize local stamps over sstate signatures in printdiff
Even with the reworked printdiff code, sstate which is heavily used in parallel
can throw races at the tests: if a new matching, but otherwise unrelated
sstate signature appears between writing out local stamps and listing
matching sstate files, then that signature will be deemed 'the latest'
and the actual local stamp will be discarded. This change ensures
the scenario does not happen.

It also makes use of the reworked find_siginfo(), particularly the 'sstate'
entry in returned results.

(Bitbake rev: c8574b796dabb69699c70540dd95a44d8f7388ab)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-05 11:59:08 +00:00
Richard Purdie
859786a83f bitbake: siggen: Ensure version of siggen is verified
Since we need to change the form of the siggen function, we need to add versioning
and some verison checks. This means if a newer bitbake is used with older metadata
we can detect it.

(Bitbake rev: 721556568413508213d22c29985e305a45a8d68a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-05 11:59:08 +00:00
Alexander Kanavin
cc85c8eb9d bitbake: bitbake-diffsigs/runqueue: adapt to reworked find_siginfo()
In particular having 'time' explicitly used as a sorting key should make it
more clear how the entries are being sorted.

(Bitbake rev: 5439aca056c84ab4410aaf24bdb68e896191d8e1)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-05 11:59:08 +00:00
Richard Purdie
a41b54ccbd bitbake: bitbake: Post release version bump to 2.7.0
Bump to a development version post release.

(Bitbake rev: 28364c08f36c778a5cb2e3f20ceb052370ef153c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-05 11:39:33 +00:00
Alexander Kanavin
b0c47ae555 bitbake: bitbake/runqueue: add debugging for find_siginfo() calls
(Bitbake rev: 52f5503e8cf048331134233fb681db6dc736ae38)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-05 11:39:33 +00:00
Alassane Yattara
831b3d5b22 bitbake: toaster/toastergui: Bug-fix verify given layer path only if import/add local layer
(Bitbake rev: 94e88efa9dbefd37f1d48459ade19797b6034b84)

Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-04 23:48:29 +00:00
Alexander Kanavin
3958182710 bitbake: bitbake/codeparser.py: address ast module deprecations in py 3.12
Specifically:
/srv/work/alex/poky/bitbake/lib/bb/codeparser.py:279: DeprecationWarning: ast.Str is deprecated and will be removed in Python 3.14; use ast.Constant instead
  if isinstance(node.args[0], ast.Str):
/srv/work/alex/poky/bitbake/lib/bb/codeparser.py:280: DeprecationWarning: Attribute s is deprecated and will be removed in Python 3.14; use value instead
  value = node.args[0].s

(Bitbake rev: de8ba2770d9a1a94af3d084f9540da7e2fae6022)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-02 14:41:06 +00:00
Alassane Yattara
280917c2e7 bitbake: toaster/tests: Bug-fix "#project-created-notification" should be visible
Added more delay between click on create project but and when notification is displayed

(Bitbake rev: 5382cc0699eebc1e91675a2a147f8fe7dab23c14)

Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-01 23:13:50 +00:00
Alassane Yattara
350300f836 bitbake: toaster/tests: Skip to show more then 100 item in ToasterTable
(Bitbake rev: 860c931381e0694a854fd90775fb18dadb7d76c6)

Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-01 23:13:50 +00:00
Alassane Yattara
3e6d3817da bitbake: toaster/tests: bug-fix An element matching "#lastest_builds" should be on the page
(Bitbake rev: 5bcba4596cd9f4f54c7ae7ebd9322897c2f829cd)

Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-01 23:13:50 +00:00
Alassane Yattara
6a67f24773 bitbake: toaster/tests: bug-fix An element matching "#projectstable" should be visible
(Bitbake rev: 1edb97f741a48481b1b9f26c5cb31acd9059f07f)

Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-01 23:13:50 +00:00
Richard Purdie
fe5d2f0b66 bitbake: lib/bb: Add workaround for libgcc issues with python 3.8 and 3.9
With python 3.8 and 3.9, we see intermittent errors of:

libgcc_s.so.1 must be installed for pthread_cancel to work
Aborted (core dumped)

which seem related to:

https://stackoverflow.com/questions/64797838/libgcc-s-so-1-must-be-installed-for-pthread-cancel-to-work
https://bugs.ams1.psf.io/issue42888

These tend to occur on debian 11 and ubuntu 20.04.

Workaround this by ensuring libgcc is preloaded in all cases.

(Bitbake rev: c6666f6cfafd55e1c980239a7c5ff908f1a69196)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-12-30 11:03:25 +00:00
Joshua Watt
34bafb3cf2 bitbake: contrib/vim: Syntax improvements
Makes a few improvments to the vim Bitbake syntax plugin:
 1) Highlight python expansion expressions "${@...}" in
    inherit/include/require
 2) Highlight variables "${..}" and python expressions "${@...}" in
    addtask/deltask/addhandler
 3) Correctly handle multi-line sequences in addtask/deltask/addhanlder

(Bitbake rev: 39691d5d0f44a266f917a13884707283f83543de)

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-12-23 16:20:25 +00:00
Marta Rybczynska
1720dae4ed bitbake: toastergui: verify that an existing layer path is given
Verify that an existing layer path was given when adding a new
layer.

Manually using the shell for globbing is unnecessary, use the glob
function instead for cleaner code.

(Bitbake rev: fe0881615896de844141393b21a121f7c3fa9d16)

Signed-off-by: Marta Rybczynska <marta.rybczynska@syslinbit.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-12-20 22:08:31 +00:00
Alassane Yattara
98214f1bc2 bitbake: toaster/tests: Bug-fix test_functional_basic, delay driver actions
The errors causing faileds on functional_basic are dû to the delay between actions,
increase between driver actions.

(Bitbake rev: e8f8f6203b63c46249673e80872fea40475f6875)

Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-12-20 12:02:07 +00:00
Joshua Watt
490b94c3b5 bitbake: bitbake-hashserv: Add description of permissions
Adds a text description of the possible permissions in the hash server
help text

(Bitbake rev: 8295ac1b6672c25bee595cff6e000b2af817f904)

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-12-18 09:18:01 +00:00
Richard Purdie
69a4180c88 bitbake: runqueue: Remove tie between rqexe and starts_worker
We've been moving to try and separate several pieces of runqueue. Allow
start_worker to operate separately to rqexe since they don't need to be
tied. This allows rqexe to be available to print_diff for future
improvements.

(Bitbake rev: 834e452243ff2eea6e8e2e7f4935b5233ffb4b00)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-12-17 19:07:21 +00:00
Richard Purdie
e706249f7b bitbake: utils: Fix mkdir with PosixPath
Avoid:
    Exception: AttributeError: 'PosixPath' object has no attribute 'find'

(Bitbake rev: 0b37fe89ba12549109905b6d0e6d07d342162436)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-12-17 19:07:21 +00:00
Marlon Rodriguez Garcia
ff7aba28f7 bitbake: toaster: Added validation to stop import if there is a build in progress
Added validation to prevent simultaneous imports from running because the database fails at runtime.
The option to create a queue was taken into consideration. However, it will require the use of Celery https://pypi.org/project/celery/ or Background Task https://pypi.org/project/django-background-tasks/ which require the use of external services and multiple dependencies.
If required we could explore the alternative in the future.

(Bitbake rev: eb417e27be5717a259f27e98dbd73255b1a42fc9)

Signed-off-by: Marlon Rodriguez Garcia <marlon.rodriguez-garcia@savoirfairelinux.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-12-16 13:06:11 +00:00
Alassane Yattara
a02138ad48 bitbake: toaster/tests: Fixes functional tests warning on autobuilder
tests/functional/test_project_config.py::TestProjectConfig::test_set_download_dir
  /home/pokybuild/yocto-worker/toaster/build/buildtools/sysroots/x86_64-pokysdk-linux/usr/lib/python3.11/unittest/case.py:678: DeprecationWarning: It is deprecated to return a value that is not None from a test case (<bound method TestProjectConfig.test_set_download_dir of <toaster.tests.functional.test_project_config.TestProjectConfig testMethod=test_set_download_dir>>)
    return self.run(*args, **kwds)

tests/functional/test_project_config.py::TestProjectConfig::test_set_sstate_dir
  /home/pokybuild/yocto-worker/toaster/build/buildtools/sysroots/x86_64-pokysdk-linux/usr/lib/python3.11/unittest/case.py:678: DeprecationWarning: It is deprecated to return a value that is not None from a test case (<bound method TestProjectConfig.test_set_sstate_dir of <toaster.tests.functional.test_project_config.TestProjectConfig testMethod=test_set_sstate_dir>>)
    return self.run(*args, **kwds)

(Bitbake rev: 938cba3e80f26589ccbe34483c79e17056346fde)

Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-12-15 14:37:28 +00:00
Alassane Yattara
ad2ffefb14 bitbake: toaster/tests: Update tests/functional/functional_helpers test_functional_basic
- Remove unused import time functional_helpers
- Delay driver actions from test_functional_basic

(Bitbake rev: c7a305f0ff3cd32875e2eb80bc0848f533209745)

Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-12-15 14:37:28 +00:00
Alassane Yattara
adb7efe522 bitbake: toaster/tests: bug-fix element click intercepted in browser/test_layerdetails_page.py
selenium.common.exceptions.ElementClickInterceptedException: Message: element click intercepted

(Bitbake rev: d1936616cafc1aced69c7b5758e44638eb62b5ac)

Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-12-15 14:37:28 +00:00
Alassane Yattara
81a0110ca5 bitbake: toaster/tests: Bug-Fix testcase functional/test_project_page_tab_config.py
All issues and failures stemmed from a specific test case:
test_project_config_tab_right_section in the file
bitbake/lib/toaster/tests/functional/test_project_page_tab_config.py.

This test was designed to verify whether the "Most built recipes"
section on the project page correctly displays the latest and oldest
recipes built by the user, irrespective of the build outcome (failed,
        cancelled, succeeded, or errored).

The errors and failures arose because the build process did not
terminate as expected, particularly when attempting to build recipe
images such as "core-image-minimal" or "bash." It was discovered that
building a real recipe/image was unnecessary for the test's purpose.
Instead, building a fake recipe like "foo" provided a reliable way to
ensure the build would fail or be interrupted.

(Bitbake rev: 5162db5305826235c09d9fcd38b5fb48ded31622)

Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-12-15 14:37:28 +00:00
Alassane Yattara
c8382b35e8 bitbake: toaster/tests: Removed all time.sleep occurrence
Use wait_until_visible instead of time.sleep to delay driver actions
(Bitbake rev: 96bf461d5860dad2377963c8dad6c754670738a6)

Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-12-15 14:37:28 +00:00
Alassane Yattara
5648636a8b bitbake: toaster/tests: logging warning in console, trying to kill unavailable Runbuilds process
(Bitbake rev: 26100ca3b5e451e9d296654fc8c47a4299fea835)

Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-12-15 14:37:28 +00:00
Alexander Lussier-Cullen
0fd93b86c4 bitbake: toaster/tests: fix chrome argument syntax and wait for driver exit
The chrome driver sometimes fails with a page crash for a full suite
of tests, pointing to a failure in the setup of the driver due to
resource limitations.
To mitigate these crashes, add a wait between driver driven tests to
ensure resources are freed.

(Bitbake rev: 8f998e27aae694c16f788aac12558621089d0839)

Signed-off-by: Alexander Lussier-Cullen <alexander.lussier-cullen@savoirfairelinux.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-12-15 14:37:28 +00:00
Alexander Lussier-Cullen
e63d6cb38e bitbake: toaster/tests: fix functional tests setup and teardown
Functional tests sometimes do not properly wait for previous tests to
close their instance of Toaster before launching their own, which
causes failures.
Track test created Toaster processes globally and wait for them to be
exited before executing further tests which need a Toaster instance to
fix this.
Additionally, quit Toaster in the teardown using the stop command with
a fallback of manually killing the processes in case of documented
stalling problem.

(Bitbake rev: 16aad11ce8eadd93b4b00dc65826329ff5526c84)

Signed-off-by: Alexander Lussier-Cullen <alexander.lussier-cullen@savoirfairelinux.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-12-15 14:37:28 +00:00
Alexander Lussier-Cullen
e9c2003bd0 bitbake: toaster/tests: Exit tests on chromedriver creation failure
When failing to create the web driver session for selenium tests,
a cascade of erroring tests will follow. To avoid processing these
unnecessarily, exit the tests completely in this case.

(Bitbake rev: 9327196102dd2671fcdb3200d9490e683f81d3a1)

Signed-off-by: Alexander Lussier-Cullen <alexander.lussier-cullen@savoirfairelinux.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-12-15 14:37:28 +00:00
Marlon Rodriguez Garcia
524255ad26 bitbake: toaster: Commandline build import table improvements
Added dataTables library to include sorting and pagination for table element

Added jquery.dataTables to customize table rendering in section "Import eventlogs".
This library includes the following: sorting, pagination, search and CSS styles.

Default to ascending order and 50 builds per page.

(Bitbake rev: f88f314cb2b071569acf3c7d43fb7256ba50762f)

Signed-off-by: Marlon Rodriguez Garcia <marlon.rodriguez-garcia@savoirfairelinux.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-12-13 20:35:02 +00:00
Alexander Lussier-Cullen
dc608a5bbe bitbake: bitbake: toaster: add functional testing toaster error details
Functional tests can sometimes fail to initialize toaster.
Most often this is due to a conflict on port 8000.
Add command information about whichever other process is running on
that port to better describe the initialization failure.

(Bitbake rev: da7f91d6dbe8703fb12d58ec95f077349d0005c8)

Signed-off-by: Alexander Lussier-Cullen <alexander.lussier-cullen@savoirfairelinux.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-12-13 11:49:18 +00:00
Marlon Rodriguez Garcia
799c131d92 bitbake: toaster: remove test and update setup to avoid rebuilding image
Update build test to fix setUp, by including the built, the system was rebuilding the image on every test, causing the database to lock
Delete test for unique order, this test was the only test using the self.built element and breaking the system.

(Bitbake rev: 9f1ad015051d4a4b363787c4a1f2b943d55eb8cb)

Signed-off-by: Marlon Rodriguez Garcia <marlon.rodriguez-garcia@savoirfairelinux.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-12-13 11:49:18 +00:00
Alassane Yattara
8a7dffc278 bitbake: toaster/test: fix Copyright
(Bitbake rev: 4967c3f3b3c5971e9ac65cb833eb8617e8c3445c)

Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-12-13 11:49:18 +00:00
Alexander Lussier-Cullen
effe2498eb bitbake: toaster: Add verbose printout for missing chrome(driver) dependencies
If the chrome driver binary is missing dependencies, it was near impossible
to work out which ones from just the logs. Add code to help debug things
if this happens by including the ldd output.

(Bitbake rev: 0ffe5fccbb7db5aca5c409fe00be2be69a6e37d9)

Signed-off-by: Alexander Lussier-Cullen <alexander.lussier-cullen@savoirfairelinux.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-12-12 15:58:57 +00:00
Marlon Rodriguez Garcia
df5c8d6471 bitbake: toaster: Added new feature to import eventlogs from command line into toaster using replay functionality
Added a new button on the base template to access a new template.
Added a model register the information on the builds and generate access links
Added a form to include the option to load specific files
Added jquery and ajax functions to block screen and redirect to build page when import eventlogs is trigger
Added a new button on landing page linked to import build page, and set min-height of buttons in landing page for uniformity
Removed test assertion to check command line build in content, because new button contains text
Updated toaster_eventreplay to use library
Fix test in test_layerdetails_page
Rebased from master

This feature uses the value from the variable BB_DEFAULT_EVENTLOG to read the files created by bitbake
Exclude listing of files that don't contain the allvariables definitions used to replay builds
This part of the feature should be revisited. Over a long period of time, the BB_DEFAULT_EVENTLOG
will exponentially increase the size of the log file and cause bottlenecks when importing.

(Bitbake rev: ab96cafe03d8bab33c1de09602cc62bd6974f157)

Signed-off-by: Marlon Rodriguez Garcia <marlon.rodriguez-garcia@savoirfairelinux.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-12-12 15:58:57 +00:00
Richard Purdie
b32dbb3747 bitbake: toaster/tests/builds: Add BB_HASHSERVE passthrough
As well as BB_HASHSERVE_UPSTREAM, ensure BB_HASHSERVE is passed through
to allow sstate resuse on the autobuilder.

(Bitbake rev: f18a647d998670cc37a8832cb36ffe03da43d1c5)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-12-09 10:04:12 +00:00
Richard Purdie
4d14176aa6 bitbake: toaster: Update to use qemux86-64 machine by default
Toaster currently uses qemux86 as the default, update to match the
local.conf default changes, i.e. qemux86-64.

(Bitbake rev: 27fbba9ee15994a69284a7f8579c22d85e0ce863)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-12-09 10:04:12 +00:00
Pavel Zhukov
d14eb12deb bitbake: utils: Do not create directories with ${ in the name
In some cases ${ may not be expanded in the WORKDIR (one of the cases is
undefined variable) and causes cryptic failures [1]. Guard this by
erroring out if directory name contains ${

Fixes: [Yocto #15255]

[1]
ERROR: x-native-1.0+${SRCPV}-r0 do_deploy_source_date_epoch: Error executing a python function in exec_func_python() autogenerated:

The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_func_python() autogenerated', lineno: 2, function: <module>
     0001:
 *** 0002:sstate_hardcode_path(d)
     0003:
File: '/home/mischief/src/poky/meta/classes-global/sstate.bbclass', lineno: 654, function: sstate_hardcode_path
     0650:    bb.note("Removing hardcoded paths from sstate package: '%s'" % (sstate_hardcode_cmd))
     0651:    subprocess.check_output(sstate_hardcode_cmd, shell=True, cwd=sstate_builddir)
     0652:
     0653:        # If the fixmefn is empty, remove it..
 *** 0654:    if os.stat(fixmefn).st_size == 0:
     0655:        os.remove(fixmefn)
     0656:    else:
     0657:        bb.note("Replacing absolute paths in fixmepath file: '%s'" % (sstate_filelist_relative_cmd))
     0658:        subprocess.check_output(sstate_filelist_relative_cmd, shell=True)
Exception: FileNotFoundError: [Errno 2] No such file or directory: '/home/mischief/src/poky/build/tmp/work/core2-64-poky-linux/x-native/1.0+${SRCPV}-r0/sstate-build-deploy_source_date_epoch/fixmepath'

(Bitbake rev: e91c256ec076e70cf8a18e369fe7862e50618c48)

Signed-off-by: Pavel Zhukov <pavel@zhukoff.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-12-08 17:17:42 +00:00