summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster
Commit message (Collapse)AuthorAgeFilesLines
...
* bitbake: toaster/tests: Added distro page TestCaseAlassane Yattara2023-12-021-0/+51
| | | | | | | | | | | | | Test distros page - Check if title "Compatible distros" is displayed - Check search input - Check "Add layer" button works - Check distro table feature(show/hide column, pagination) (Bitbake rev: 8b56af0837e9f09f13d6892c1aa1d82ecd5ef87d) Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster/tests: Added Layers page TestCaseAlassane Yattara2023-12-021-0/+72
| | | | | | | | | | | | | | Test layers page - Check if title "Compatible layerss" is displayed - Check search input - Check "Add layer" button works - Check "Remove layer" button works - Check layers table feature(show/hide column, pagination) (Bitbake rev: a7bdda5b31f95e39c70eefb8ddf0ec690b3786ef) Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster/tests: Added Machine page TestCaseAlassane Yattara2023-12-021-0/+79
| | | | | | | | | | | | | | Test Machine page - Check if title "Compatible machines" is displayed - Check search input - Check "Select machine" button works - Check "Add layer" button works - Check Machine table feature(show/hide column, pagination) (Bitbake rev: 98b78d49e2169d57324e4e471d7ad353963c273a) Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster/tests: Test software recipe pageAlassane Yattara2023-12-021-0/+118
| | | | | | | | | | | | | Test software recipe page - Check title "Compatible software recipes" is displayed - Check search input - Check "build recipe" button works - Check software recipe table feature(show/hide column, pagination) (Bitbake rev: b9c8c77d73d19bd4ddf9b6e90b0aa71f92d36993) Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster/tests: Override table edit columns TestCase from image ↵Alassane Yattara2023-12-021-0/+130
| | | | | | | | | | | recipe page Better handle TestCase of table edit column feature (Bitbake rev: 6adc708a1520f8c947f9c40fdc88ebe2b51ecc97) Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster/tests: Update methods wait_until_~ to skip using time.sleepAlassane Yattara2023-12-021-5/+8
| | | | | | | | | | | Update Class Wait from selenium_helpers_base, to override wait_until_visible and wait_until_present with poll argument to better handle delay between driver actions (Bitbake rev: 486817ac6ad28580d81dcf6e3789678d9259bb54) Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: make django temp directory configurableAlexander Lussier-Cullen2023-11-233-5/+7
| | | | | | | | | | | | | | | | Modify the django settings to make cache, logs and databases save to a configurable directory with TOASTER_DJANGO_TMPDIR instead of the machine root level /tmp directory. In addition, add this variable to the passthroughs for tox. This change is made to facilitate cleaning test files for runs on the autobuilder and avoid errors involving the persisted database. (Bitbake rev: 887aaa91fd54ef24fc3cce42d584b381e37d3343) Signed-off-by: Alexander Lussier-Cullen <alexander.lussier-cullen@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster/tests: add passthroughs for relevant build environment ↵Alexander Lussier-Cullen2023-11-232-0/+12
| | | | | | | | | | | | | | | | | variables Toaster build tests create new build environments which do not utlize any existing build environment variables. In particular, DL_DIR and SSTATE_DIR from an existing environment can be passed in to allow for faster builds. Adding these as passthroughs specifically resolves slow builds related to the autobuilder integrations of the toaster test suite. (Bitbake rev: 58cc3a4671878a425f52f9ec21636e366356bfc2) Signed-off-by: Alexander Lussier-Cullen <alexander.lussier-cullen@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster/tests: Add UI TestCase - Test the show rows feature in ↵Alassane Yattara2023-11-231-1/+35
| | | | | | | | | | | image recipe Test the show rows feature in image recipe table on project page (Bitbake rev: 0afbce01f8b037adb9311f63dcb63a2d180a5373) Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster/tests: Add UI TestCase for the edit column feature in image ↵Alassane Yattara2023-11-231-0/+121
| | | | | | | | | | | | recipe BUILD IMAGE RECIPES: toastergui/project/{id}/images/ Test the edit column feature in image recipe table on project page (Bitbake rev: 005f8e4a875d280268e0369d26aaaa9e5a65fd68) Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster/tests: Add UI TestCase - Test project page section imagesAlassane Yattara2023-11-231-0/+41
| | | | | | | | | | | | | | BUILD IMAGE RECIPES: toastergui/project/{id}/images/ Test project page section images - Check image recipes are displayed - Check search input - Check image recipe build button works - Check image recipe table features(show/hide column, pagination) (Bitbake rev: 9aa0aad6812730d4ffaa9b3adfae041176274475) Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster/tests: Add UI TestCase - Test project page tab "New custom ↵Alassane Yattara2023-11-231-0/+31
| | | | | | | | | | | image" Test project page tab "New custom image" when no custom image (Bitbake rev: fd8fe1d3b25679032a43c1dd25a945318e573cef) Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster/tests: Add UI TestCase - Test project page tab import layerAlassane Yattara2023-11-231-0/+43
| | | | | | | (Bitbake rev: 857e6fdefa655fa73460c9bb008dc08abb4c3107) Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster/tests: Add UI TestCase - Test project config tabAlassane Yattara2023-11-232-1/+133
| | | | | | | | | | | | | | | | | | | | | | | | | | | Check if project config tab right section contains five blocks: - Machine: - check 'Machine' is displayed - check can change Machine - Distro: - check 'Distro' is displayed - check can change Distro - Most built recipes: - check 'Most built recipes' is displayed - check can select a recipe and build it - Project release: - check 'Project release' is displayed - check project has right release displayed - Layers: - check can add a layer if exists - check at least three layers are displayed - openembedded-core - meta-poky - meta-yocto-bsp (Bitbake rev: cbf0df0604e6cb37aa8c4433e9af3c321be80010) Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster/tests: Add UI TestCase - Test project config tab navigation:Alassane Yattara2023-11-231-0/+176
| | | | | | | | | | | | | | | | | | | | | - Check if the menu is displayed and contains the right elements: - Configuration - COMPATIBLE METADATA - Custom images - Image recipes - Software recipes - Machines - Layers - Distro - EXTRA CONFIGURATION - Bitbake variables - Actions - Delete project (Bitbake rev: a12fe481aac82e1feebdb56afb67ba77a8904995) Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster/tests: Add UI TestCase - Test project page has right tabs ↵Alassane Yattara2023-11-231-0/+78
| | | | | | | | | | | | | | | | displayed Test project tabs: - "configuration" tab - "Builds" tab - "Import layers" tab - "New custom image" tab Check search box used to build recipes (Bitbake rev: 13a55ebe630ad20e8ab4cdcb3dc6dcbf4fa7243a) Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster/tests: Add UI TestCase - Test edit project name on project pageAlassane Yattara2023-11-231-0/+27
| | | | | | | | | | | | | Test edit project name: - Click on "Edit" icon button - Change project name - Click on "Save" button - Check project name is changed (Bitbake rev: 0bd0bbf8df2a1043d5c768a70e4c4fabd5195227) Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster/tests: Add UI TestCase - Check project header contains ↵Alassane Yattara2023-11-231-0/+142
| | | | | | | | | | | | | | | | | right items Check page header in project page: - AT LEFT -> Logo of Yocto project, displayed, clickable - "Toaster"+" Information icon", displayed, clickable - "Server Icon" + "All builds", displayed, clickable - "Directory Icon" + "All projects", displayed, clickable - "Book Icon" + "Documentation", displayed, clickable - AT RIGHT -> button "New project", displayed, clickable (Bitbake rev: 5b2b8fe16e2adb45ca88165162c65c0f7f9a0755) Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster/tests/create_new_project: Code cleanupAlassane Yattara2023-11-231-1/+2
| | | | | | | | | | | | Fixed - Select import, - Remove trailing whitespace, - Set excepted 2lines after imports (Bitbake rev: f0c91629fad2e556cd429f561cc244aef4b7b066) Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster/tests: Add UI TestCase for visualize all projects show rowsAlassane Yattara2023-11-231-0/+34
| | | | | | | | | Test the show rows feature in the projects table on the all projects page (Bitbake rev: d899a3cf9e186f78780415195c734fdef359d08d) Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster/tests: Add UI TestCase for visualize all projects edit columnAlassane Yattara2023-11-231-0/+58
| | | | | | | | | Test the edit column feature in the projects table on the all projects page (Bitbake rev: 16e05122b7298c449bf6cec1bcae75c3fb5d87db) Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster/tests: Add UI TestCase for Visualize all projectsAlassane Yattara2023-11-231-0/+34
| | | | | | | | | Test the search box in the all project table on the all projects page (Bitbake rev: a2c0e65e90619268da916a235a97df890697d22f) Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster/tests: Add UI TestCase for deleting projectAlassane Yattara2023-11-161-0/+103
| | | | | | | | | | | | | | Test delete project: - Check delete modal is visible - Check delete modal has right text - Confirm delete - Check project is deleted (Bitbake rev: 669b270b6839dbf8f2daaa20ad809b309957edfd) Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster/tox.ini: Add py 3.11 and 3.12Richard Purdie2023-11-161-1/+1
| | | | | | | | | Some of the autobuilder workers have python 3.11 or in the future 3.12. Add these to allow toaster tests to work on those platforms. (Bitbake rev: 04d5edd81f5e924370090d68fd4a254abaacbfe4) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: test_create_new_project typos, whitespaceTim Orling2023-11-141-5/+5
| | | | | | | | | | | | * Cleanup an extraneous # at the end of the hash bang line. * Cleanup some trailing whitespace errors. * Fix typo inf dunfull -> dunfell. (Bitbake rev: 3938b53f40960ff4a96a55fe5ef35b69737538a3) Signed-off-by: Tim Orling <tim.orling@konsulko.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: fix obsolete use of find_element_by_link_textTim Orling2023-11-141-9/+10
| | | | | | | | | | | | | | | | | | | The find_element_by_* commands were deprecated in 4.1.4 and have been removed in 4.3.0: https://github.com/SeleniumHQ/selenium/blob/selenium-4.3.0/py/CHANGES#L2 as they relied on the use of APIs only intended for internal use. The recommended method is to use find_elements(By.*) instead. https://www.selenium.dev/documentation/webdriver/elements/finders/#find-elements-from-element Also fix some trailing whitespace errors. (Bitbake rev: 745b555cce58414029b531d19c0dbb6768f036e3) Signed-off-by: Tim Orling <tim.orling@konsulko.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: use docs for BitBake link on landing pageTim Orling2023-11-142-2/+2
| | | | | | | | | | | | | | | | With the webpage refresh in November 2023, the old BitBake link https://www.yoctoproject.org/tools-resources/projects/bitbake on the landing page is no longer valid. Point the BitBake link in the landing page to https://docs.yoctoproject.org/bitbake.html Fix the test_landing_page.py test case to test for the new link. (Bitbake rev: 968c75852ec8be4f4b8204521c8eec18a7042cf5) Signed-off-by: Tim Orling <tim.orling@konsulko.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: drop deprecated USE_L10N from settingsTim Orling2023-11-141-4/+0
| | | | | | | | | | | | Every build currently results in a warning because of the USE_L10N deprecation. https://docs.djangoproject.com/en/4.2/ref/settings/#use-l10n (Bitbake rev: 89df63d967dd3091fba7943f5fe5a98e2c3871e3) Signed-off-by: Tim Orling <tim.orling@konsulko.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster/tests: Add UI TestCase to test "show rows" feature, change ↵Alassane Yattara2023-11-141-12/+52
| | | | | | | | | | | displaying rows in table Test the "show rows" feature in the builds table, on the all builds page (Bitbake rev: 04c1c46d117b98ee6ccc351323edaf90ac1436c5) Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster/tests: Add UI TestCase to test "edit column" feature ↵Alassane Yattara2023-11-141-0/+59
| | | | | | | | | | | show/hide column Test the "edit column" feature in the builds table on the all builds page (Bitbake rev: eb9f8ae240bb0b934da28474075a72a409e336ef) Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster/tests: Add UI TestCase to test filtering feature on ↵Alassane Yattara2023-11-141-2/+78
| | | | | | | | | | | 'completed_on' column Test the filtering on completed_on column in the builds table on the all builds page (Bitbake rev: bb459d5809ada703b551172c8dd3771565f80dec) Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster/tests: Add UI TestCase to test the filtering feature on ↵Alassane Yattara2023-11-141-0/+38
| | | | | | | | | | | 'failure tasks' column Test the filtering on failure tasks column in the builds table on the all builds page (Bitbake rev: 9e48818f08c71ae2529aa52166e3527850a6234f) Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster/tests: Add UI TestCase to test search box on all build pageAlassane Yattara2023-11-141-9/+34
| | | | | | | | | Test the search box in the builds table on the all builds page (Bitbake rev: 6ec40284e4fd173430cdc526716794b7da7d6523) Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster/tests: Add UI TestCase to test if 'no build' message is shownAlassane Yattara2023-11-141-0/+9
| | | | | | | | | In all builds page, check if 'no build' message is shown when there are no build. (Bitbake rev: 4aa2a4e464a9bd85e1e22c87d0d7b54a5a899745) Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: Toaster: Write UI TestCase import new project usingAlassane Yattara2023-11-091-0/+25
| | | | | | | | | | | | * Test import new project using: - Project Name: Any string - Project type: select (Import command line project) - Import existing project directory: Wrong Path (Bitbake rev: d9239f2d2235f2adb0322ecb2cedd507a00e1e90) Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: Toaster: Test create new project without project nameAlassane Yattara2023-11-091-0/+17
| | | | | | | (Bitbake rev: 2670bacd5b2865ed825d24c96ecd12940218b65e) Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: Toaster: Write UI TestCase create new projectAlassane Yattara2023-11-091-0/+134
| | | | | | | | | | | | Test create new project using: - Project Name: Any string - Release: Master/Kirkstone/Dunfell/Local - Merge Toaster settings: False/True (Bitbake rev: 8502ed9ce3e04e5e0f913a8af60828ac0cefa110) Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: Revert "toaster: Bug-fix webdriver No parameter named options"Richard Purdie2023-11-091-1/+1
| | | | | | | | | This reverts commit 99305c25fafa61064a1bb0849616e4627e3453d7. After discussion we found various versions of selenium don't work with this change. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Bug-fix webdriver No parameter named optionsAlassane Yattara2023-11-091-1/+1
| | | | | | | | | Change options to chrome_options (Bitbake rev: 99305c25fafa61064a1bb0849616e4627e3453d7) Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Test jumbotron links visible and clickableAlassane Yattara2023-11-091-1/+88
| | | | | | | | | | | | | | | | | Test that the followings link are visible and clickable: - OpenEmbedded - BitBake - Yocto Project - Read the Toaster manual - Contribute to Toaster - Fixed typo: using instead of usign line:97 - Remove whitespace (Bitbake rev: d4c35eaff3c152ee864a886aac8ad5476f7f29f7) Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Test documentation link in landing header is displayedAlassane Yattara2023-11-091-0/+15
| | | | | | | | | | - check that the documentation link is visible - check browser open new tab toaster manual when clicking on the documentation link (Bitbake rev: befe970fcc7742cf266e03849be36c733bb09de6) Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Check info_sign is visible and clickable in landing pageAlassane Yattara2023-11-092-1/+17
| | | | | | | | | | Check the information icon is visible and clickable Also if popup appearing when clicked and contain "Toaster version information" (Bitbake rev: 0508fd74ebd43359473a9718edf0d146002041ad) Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Added pytest.ini fileAlassane Yattara2023-11-091-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The main reason for using pytest is to be able to generate a positive test report using the pytest-html plugin. Integrating Pytest with Tox is a straightforward process, this can be done using tox.ini instead of pytest.ini used to configure pytest, that is another reason for using pytest. Tox is a tool that automates testing across different virtual environments, it can help ensure application will be tested against multiple Python versions and environments. https://github.com/pytest-dev/pytest/blob/main/tox.ini Generated reports create a historical record of test results over time. This can help track the progress of the application's stability and quality Documentation and Transparency: Test reports provide us a clear and detailed documentation of the test results. They show what tests were executed, which ones passed, and which ones failed. This transparency is critical for understanding the current state of the application and its test coverage. Communication: Test reports are an effective means of communication among community to understand the testing progress and results. Debugging, Troubleshooting Historical Tracking and Regression Testing: In case of test failures, a detailed test report can be invaluable for debugging. It provides information about the specific test case that failed, the input data used, and any error messages. (Bitbake rev: 6ba046b8d0d821e304c14b78ef6b00945e0ab453) Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: fixed: Tests fail when executed one after the other out of ↵Alassane Yattara2023-11-093-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | sequence As mentionned in earlier commit, pytest-django takes a conservative approach to enabling database access. By default our tests will fail if they try to access the database, Only if we explicitly request database access will this be allowed, using pytest marks to tell pytest-django our test needs database access. A side effect of pytest mark, is test_case method marked is execute out of scope of its module class, which create an inconsistance sequence and make fails followings tests. The scope of the ordering is global per default, e.g. tests with lower ordinal numbers are always executed before tests with higher numbers in the same test session, regardless of the module and class they reside in. This can be changed by using the --order-scope option from module pytest-order. To fix that i added execution order to tests suite using pytest-order. (Bitbake rev: 8bf32459ab6d8ce7632fca0a4ce0f3aecc7495c2) Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Bug-fix django.db.utils.IntegrityError: Problem installing ↵Alassane Yattara2023-11-091-2/+2
| | | | | | | | | | | | | fixture toastergui-unittest-data.xml fixture contains a release objects with name="master" or an release with same name seem existing - Change release name and fix bitbakeversion instead of bitbake_version (Bitbake rev: 36b48905ea26e5173b5ab2369b90952bc13e9c0d) Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: fixed pytest error: Database access not allowed, use the ↵Alassane Yattara2023-11-091-0/+2
| | | | | | | | | | | | | | | | | | "django_db" Pytest failed on functional/test_functional_basic because database access not allowed - we should use "django_db" fixture to allowed db access Note: Pytest-django takes a conservative approach to enabling database access. By default your tests will fail if they try to access the database. Only if you explicitly request database access will this be allowed. https://pytest-django.readthedocs.io/en/latest/helpers.html#pytest-mark-django-db-request-database-access (Bitbake rev: 5f92a6b13cdea26b26ff939e9a3f746f7d0937b7) Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Bug-fix pytest and Failed: Database access not allowedAlassane Yattara2023-11-091-6/+0
| | | | | | | | | | | | | | Remove load and create build environment from tests/functional/functional_helpers - Testcases in the FunctionalTestCase do not require a build process, - Also marked setUpClass or class with pytest django_db, db ... not working, as declared above of file functional_helpers.py, The database access process runs as an external process, separate from the test case process and outside the context of pytest. (Bitbake rev: 35c02c26541c05a8d147f41d0855e09d8fba1a83) Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Update orm.models to catch error ProcessLookupErrorAlassane Yattara2023-11-091-3/+2
| | | | | | | | | - catch error ProcessLookupError and logs it (Bitbake rev: a61a5f47dc56daafa9089adaad388b3c0b59155d) Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Add toaster-tests-requirements.txt to add pytest and some ↵Alassane Yattara2023-11-091-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | plugins The pytest framework makes it easy to write small, readable tests, and can scale to support complex functional testing for applications and libraries. - Pytest-html is a plugin for pytest that generates a HTML report for test results. - Pytest-django allows us to test Django project/applications with the pytest testing tool. - Pytest-env is a pytest plugin that enables us to set environment variables in a pytest.ini or pyproject.toml file - Pytest-metadata is a plugin for pytest that provides access to test session metadata, required by pytest-html plugin to provides metadata information in the HTML report like below: Python 3.10.12 Platform Linux-6.2.0-35-generic-x86_64-with-glibc2.35 Packages: - pytest: 7.4.2 - pluggy: 1.3.0 Plugins : - django: 4.5.2 - metadata: 3.0.0 - order: 1.1.0 - html: 4.0.2 - env: 1.1.0 To make difference between bitbake and toaster python requirements, a dedicated requirements file is created for toaster in root of toaster dir. (Bitbake rev: 804d17df22391b2d18a68d8cb05a04841d4e551b) Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: replace deprecated tags ifequal and ifnotequalMarlon Rodriguez Garcia2023-11-085-14/+14
| | | | | | | | | | Tags ifequal and ifnotequal are deprecated and were removed on version 3.1 https://django.readthedocs.io/en/stable/releases/3.1.html#deprecated-features-3-1 (Bitbake rev: d6dd2d091c18a888a237d986ae2bd6dae068be5a) Signed-off-by: Marlon Rodriguez Garcia <marlon.rodriguez-garcia@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>