aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2023-10-19Update the README to point people to the new location.HEADmasterMichael Halstead
Signed-off-by: Michael Halstead <mhalstead@linuxfoundation.org>
2023-10-18initscripts-patchtest: improve testresult filtersTrevor Gamblin
Add filters with awk to print newlines before the first occurrences of the words FAIL, PASS, and SKIP, and clean up the line they are called on so each stage of the overall command piping is more readable. Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-10-18initscripts-patchtest: sort testresultsTrevor Gamblin
Use awk to sort the .testresult contents after running patchtest, except for the 'header' line that says which patch is being tested. This will prioritize FAIL results, followed by PASS and then SKIP. Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-10-18python3-pylint: add missing patch filesTrevor Gamblin
pylint 2.17.4 was added again as a recipe, but the patch files it needs were not included because of the patchtest repo's .gitignore settings. Explicitly add them back so that builds will not stumble on missing files. Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-10-18core-image-patchtest: move patchtest-get-branch callTrevor Gamblin
patchtest-get-branch is getting called before the script is on the image's PATH, and is breaking test runs in the initscript. Move it to after the 'source oe-init-build-env' line so that it can be found. Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-10-18python3-pylint: re-add recipeTrevor Gamblin
The 3.0.0 release of python3-pylint removes the epylint module, which is used in some of the patchtest tests. Most systems will be running older versions, but meta-python carries 3.0.0, so add 2.17.4 back as a recipe temporarily and take advantage of meta-patchtest's higher layer priority. Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-10-17core-image-patchtest: use explicit testdir, repodirTrevor Gamblin
Update the 'pt' bash function so that it explicitly uses the --tesdir and --repodir flags according to the patchtest CLI in oe-core. Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-10-17README.md: add layer dependencies to exampleTrevor Gamblin
The layer requires meta-oe and meta-python, so make sure the example in README.md of how to add dependencies includes them. Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-10-16initscripts-patchtest: set -xtgamblin/oe-core-migrationTrevor Gamblin
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-10-13README.md: make layer-specificTrevor Gamblin
The previous README.md contents have been moved to oe-core under scripts/patchtest.README, but this layer needs a brief guide on how to use it properly. Move the old meta-patchtest/README file over and update it. Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-10-13patchtest: remove python modulesTrevor Gamblin
These are all being migrated to oe-core from here or meta-python, so no need to carry duplicate recipes in meta-patchtest. Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-10-13requirements.txt: removeTrevor Gamblin
This is in oe-core already, so remove it. Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-10-13patchtest/lib: remove supporting modulesTrevor Gamblin
patchtest is being moved to oe-core, so remove these to avoid maintaining two copies. Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-10-13patchtest: remove scriptsTrevor Gamblin
These are being moved to oe-core, so remove them here to avoid maintaining two copies of the same code. Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-10-12patchtest-send-results: update senderTrevor Gamblin
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-10-12patchtest: update image, initscripts script namesTrevor Gamblin
The supplementary get-target-branch script has changed to patchtest-get-branch, so update the image and initscripts references to anything related to it and get-latest-series. Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-10-12patchtest-get-series: rename get-latest-seriesTrevor Gamblin
Change the get-latest-series script to be prefixed with "patchtest" so that its purpose is more clear in other contexts. Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-10-12patchtest-get-branch: rename get-target-branchTrevor Gamblin
Change the get-target-branch script to be prefixed with "patchtest" so that its purpose is more clear in other contexts. Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-10-12patchtest-send-results: update email noticeTrevor Gamblin
Patchtest tests patches individually for their ability to merge on top of the target branch, and therefore it can report false failures in the merge-on-head test if the patch being tested relies on changes made by previous entries in a series. For now, simply warn the submitter that this is the case in the automated reply. Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-10-11patchtest-send-results: set test-list as targetTrevor Gamblin
Start testing the use of test-list as a destination for patchtest reviews when a patch fails one or more tests. Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-10-11patchtest-send-results: add scriptTrevor Gamblin
Add a script for sending email responses against patches on failure. It relies on the boto3 Python module for sending, which has already been added to requirements.txt and is supported internally by Yocto infrastructure. The script is not yet finalized but needs to be added to the repository at this point for final testing. Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-10-06patchtest: don't split test.id() outputTrevor Gamblin
In c98f2e30 the result output was changed to be more human-readable, but the attempt to shorten line length resulted in the oe-core selftests being unable to properly parse the results and determine if a given test had passed or failed. Put the full test ID back into the output so that this works again. Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-10-06get-latest-series: fix indent in download stepTrevor Gamblin
Make the call to store a tested series have the same indent as the rest of the code. Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-10-05README.md: Fix host usage instructionsTrevor Gamblin
The example testing of a single patch was missing the patch name. Fix that, and also reorder the passing of arguments in the examples to be consistent with the way the help output suggests they be given. Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-10-05patchtest: improve result reportingTrevor Gamblin
Make use of Python's .split() and .replace() methods to clean up the patchtest PASS/FAIL/SKIP output and subsequent information about tests being run. This should make the patchtest output much more human-readable. Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-10-05get-latest-series: download with --separate optionTrevor Gamblin
Use the --separate option with the git-pw series download so that patchtest will test each entry in a series separately, instead of as one large file. Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-10-04patchtest-setup-sharedir: fix authorTrevor Gamblin
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-10-04requirements.txt: add boto3Trevor Gamblin
Add the AWS SDK for Python to requirements.txt so that the mailer scripts will work. Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-10-04tests: remove directoryTrevor Gamblin
There's nothing in here and the actual oe-core tests are in that repo, so remove it. Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-10-04hooks: remove directoryTrevor Gamblin
These haven't been used since the patchtest refactor began. Remove them so there's less to maintain. Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-10-04patchtest: remove unused scriptsTrevor Gamblin
All of these scripts qualify as some combination of incomplete, obsolete, confusing, and/or redundant, so remove them. Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-10-02initscripts-patchtest: don't test empty dirTrevor Gamblin
If there are no patches in the sharedir to test, print a message to /dev/console (because we're in an initscript) and then skip to shutdown. Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-10-02initscripts-patchtest: filter .testresult contentsTrevor Gamblin
Instead of capturing the entire bitbake log as patchtest runs for each patch, use grep in the patchtest initscript to only write the initial "Testing patch ..." line, along with the actual test results, to each .testresult file. Example: Testing patch /home/patchtest/share/mboxes/v2-gcc-depend-on-zstd.patch SKIP test_metadata_lic_files_chksum.LicFilesChkSum.pretest_lic_files_chksum_modified_not_mentioned {"id": "test_metadata_lic_files_chksum.LicFilesChkSum.pretest_lic_files_chksum_modified_not_mentioned", "issue": "No modified recipes, skipping pretest"} SKIP test_metadata_src_uri.SrcUri.pretest_src_uri_left_files {"id": "test_metadata_src_uri.SrcUri.pretest_src_uri_left_files", "issue": "No modified recipes, skipping pretest"} SKIP test_python_pylint.PyLint.pretest_pylint {"id": "test_python_pylint.PyLint.pretest_pylint", "issue": "No python related patches, skipping test"} PASS test_mbox_author.Author.test_author_valid PASS test_mbox_author.Author.test_non_auh_upgrade Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-10-02usage.adoc: removeTrevor Gamblin
This guide is very outdated and is superseded by the contents of README.md, so remove it. Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-10-02README.md: Add section on guest modeTrevor Gamblin
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-10-02README.md: Add note about git-pw install pathTrevor Gamblin
The location of git-pw once installed will not be immediately obvious to patchtest users if they have not also read its documentation, and this may cause some unnecessary confusion with use. Add a line to the "Installation" section clarifying the need to set PATH after installing git-pw. Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-09-29patchtest-setup-sharedir: add helper scriptTrevor Gamblin
Add a simple script for preparing a directory to be shared with the guest image. Note that patchtest-setup-sharedir does not handle any ownership/permission changes that may be required for the image to access or write to the share directory's contents. Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-09-28patchtest: make initscripts bbappend standaloneTrevor Gamblin
Replace the bbappend with an independent recipe so that core-image-patchtest can have the patchtest initscript installed without contaminating other images when the meta-patchtest layer is included in a build setup. Note that this does not prevent the layer's kernel configuration changes from occurring. Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-09-28get-latest-series: handle empty results caseTrevor Gamblin
get-latest-series wouldn't work properly if there were no new series available since the SERIES_CHECK_LIMIT. Change the command setting SERIES_LIST so that it ignores non-numeric values to avoid trying to download "ID" and other strings from the git-pw output. Also explicitly use SERIES_CHECK_LIMIT in the SERIES_LIST pipe. Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-09-27patchtest: fix initscripts, core-image-patchtestTrevor Gamblin
- use poky instead of separate oe-core and bitbake checkouts - directly pipe patchtest output to <patch>.testresult file instead of a separate results directory - Disable network in the local.conf of each build - remove the useless safe directories options in the image's .gitconfig Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-09-26scripts/get-latest-series: add --server optionTrevor Gamblin
Add an option to pass a server URL to get-latest-series rather than relying on the user and/or system .gitconfig file. Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-09-25packagegroup-patchtest-oe: add python3-git-pwTrevor Gamblin
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-09-25python3-git-pw: add recipeTrevor Gamblin
git-pw is a tool for integrating Git with Patchwork instances, and is an essential component of the patchtest workflow. Add a recipe for it so that it can be built directly into patchtest images. Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-09-25python3-arrow: add recipeTrevor Gamblin
python3-arrow is required by git-pw. Add a recipe based on the one in meta-cloud-services, but update the version and only use a sha256sum to verify the fetched source. Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-09-25python3-dateutil: add from meta-pythonTrevor Gamblin
python3-arrow is required by git-pw, but it requires dateutil, so add the module to meta-patchtest. Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-09-25python3-tabulate: add from meta-pythonTrevor Gamblin
git-pw relies on it, so add the recipe here. Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-09-25python3-click: add from meta-pythonTrevor Gamblin
git-pw relies on it, so add the recipe here. Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-09-21patchtest: Add option to log resultsTrevor Gamblin
Add a --log-results option that will generate a logfile matching the tested patch's name but with ".testresults" appended, containing all of the same result lines seen in a manual run (except for bitbake-specific information). Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-09-21patchtest: remove --json optionTrevor Gamblin
There are currently two output formats, one of which is similar to how ptest results are formatted and one optional JSON-style output that is selected with the --json flag. To simplify the patchtest codebase, one should be removed - in this case, the JSON format so that other tools expecting the ptest-style results (e.g. patchtest selftests in oe-core) continue to work. Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-09-20patchtest: fix directory handlingTrevor Gamblin
The patchtest --directory option was not handling paths other than the current directory (".") properly because of how os.listdir() was invoked. Use the join function to make sure that the absolute path is used for each patch in the location provided. Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>