aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2023-09-15README: Add obsolesence noticeHEADmasterTrevor Gamblin
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-09-12selftest: use new patchtest CLI formatTrevor Gamblin
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-09-11selftest/files: tweak files for consistencyTrevor Gamblin
LicFilesChkSum.test_lic_files_chksum_modified_not_mentioned.fail's commit message suggests it will pass, so fix that. Also rename other tests to be consistent with the file numbering scheme when more than one test case is available. Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-09-08selftest: explicitly label test files in outputTrevor Gamblin
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-09-08selftest: fix test_src_uri_left_files testsTrevor Gamblin
Use selftest-hello as the target for test_src_uri_left_files pass and fail cases, so that the tests work properly. Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-09-08selftest: Fix lic_files_chksum_presence test filesTrevor Gamblin
Update the existing lic_files_chksum_presence patch files so that they use the MIT license and (in the case of the pass file) actually include a proper LIC_FILES_CHKSUM. Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-09-08selftest: remove checksums_not_changed test filesTrevor Gamblin
The actual test for these files was removed in fab5c3ad7, but the files were left around. It could be added back in the future, but since bitbake already checks this it may end up being an extra point of failure that isn't worth maintaining. Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-09-08test_mbox_cve: remove @classmethod decoratorTrevor Gamblin
The @classmethod decorator is unnecessary for the test and actually causes positional argument errors when running patchtest: |Traceback (most recent call last): | File "/usr/lib64/python3.11/unittest/case.py", line 57, in testPartExecutor | yield | File "/usr/lib64/python3.11/unittest/case.py", line 619, in run | self._callSetUp() | File "/usr/lib64/python3.11/unittest/case.py", line 576, in _callSetUp | self.setUp() | File "/workspace/yocto/patchtest-oe/tests/test_mbox_cve.py", line 40, in setUp | self.skip('No new CVE patches introduced') |TypeError: Base.skip() missing 1 required positional argument: 'issue' |None Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-09-08selftest: Correctly count totalTrevor Gamblin
Include XPASS counts in the total number of tests in the selftest results. Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-09-08tests: Add test_mbox_cve testTrevor Gamblin
Add a test for ensuring there is a CVE tag in the mbox commit message (in addition to the carried patch) by doing the following: - Create parse_cve_tags.py with pyparsing patterns similar to parse_signed_off_by - Add test_mbox_cve.py to check for CVE tags in the mbox commit message - Modify the CVE.test_cve_presence_in_commit_message files to be consistent with other test files, i.e. by testing modifications against selftest-hello in oe-core Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-09-08selftest: Add distinct XPASS resultsTrevor Gamblin
Add XPASS as a test result distinct from PASS so that false passes can be identified. Also reorganize the result output so that the XPASS and XFAIL totals are printed before any others: ============================================================================ Testsuite summary for patchtest-oe ============================================================================ \# TOTAL: 17 \# XPASS: 14 \# XFAIL: 15 \# PASS: 0 \# FAIL: 0 \# SKIP: 2 \# ERROR: 0 ============================================================================ Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-09-07selftest: reformat and add new result outputTrevor Gamblin
The current selftest output is not very readable and isn't consistent with the way other project test standards (e.g. ptest) provide results. Refactor the selftest script so that it prints results like so: XFAIL: Summary.test_summary_presence (Summary.test_summary_presence.fail) PASS: Author.test_author_valid (Author.test_author_valid.2.pass) PASS: Bugzilla.test_bugzilla_entry_format (Bugzilla.test_bugzilla_entry_format.pass) No test for=SrcUri.test_src_uri_checksums_not_changed.fail No test for=CVE.test_cve_presence_in_commit_message.fail PASS: SignedOffBy.test_signed_off_by_presence (SignedOffBy.test_signed_off_by_presence.pass) And add a summary like that found in ptests: ============================================================================ Testsuite summary for patchtest-oe ============================================================================ \# TOTAL: 31 \# PASS: 14 \# SKIP: 2 \# XFAIL: 15 \# FAIL: 0 \# ERROR: 0 ============================================================================ Note that tests where the result is "No test for X" are not yet counted, and will be handled in a future patch. Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-09-06selftest: Fix SignedOffBy test filesTrevor Gamblin
Similar to the PatchSignedOffBy test patches, these had an incorrect path listed for the actual patch file added. Fix that and regenerate them so the tests pass again. Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-09-06selftest: fix PatchSignedOffBy filesTrevor Gamblin
The previously-added files were actually failing due to a mismatch in the carried patch path. Fix this and regenerate them so that they pass with the patchtest command. Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-09-06selftest: Add new licence checksum patch filesTrevor Gamblin
Generate two new pass/fail patch files for the lic_files_chksum_modified_not_mentioned test and remove the extra pass file, so that the files no longer fail the merge_on_head test. Note that these tests actually require the meta-selftest layer to be added to bblayers.conf for the tests to work correctly. Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-09-01selftest: improve script outputTrevor Gamblin
Make selftest output more informative by doing the following: - For successes, list the test run and the patch file being tested - Warn if there is a mismatch between expected and actual results - Print the patchtest invocation used on a mismatched result - Use upper-case indicators for PASS, FAIL, SKIP (matching other parts of the project) Old output style (only printed result on mismatch): patch=MboxFormat.test_mbox_format.fail expected=fail actual=pass cmd=patchtest /workspace/yocto/patchtest-oe/selftest/files New output style: Running 'CommitMessage.test_commit_message_presence' against file '/workspace/yocto/patchtest-oe/selftest/files/CommitMessage.test_commit_message_presence.fail': FAIL Mismatched result for test 'SrcUri.test_src_uri_left_files' against patch 'SrcUri.test_src_uri_left_files.fail' - expected FAIL, got SKIP The test command was: 'patchtest /workspace/yocto/patchtest-oe/selftest/files/SrcUri.test_src_uri_left_files.fail /workspace/yocto/openembedded-core /workspace/yocto/patchtest-oe/tests' Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-09-01patchtest: enable test_metadata_max_length testTrevor Gamblin
Enable this test so that patchtest can warn if a shortlog is longer than 200 characters. Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-09-01selftest: Add commit message to merge_on_head fileTrevor Gamblin
The "pass" file for test_series_merge_on_head was failing because it lacked a commit message, now that the test for commit message presence is enabled. Add one so that it passes again. Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-09-01selftest: Fix test_mbox_format testTrevor Gamblin
The "fail" test file was actually passing on tests because of a mistake when the new version was created. Modify the file so it fails the test_mbox_format test, with the caveat that it will also cause the merge_on_head test to fail. Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-09-01patchtest: enable commit message presence testTrevor Gamblin
This has been marked as auto-skip previously, but since patch submissions ideally come with some sort of description in the commit log, the test should be enabled. Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-09-01selftest: Add new commit message presence filesTrevor Gamblin
Add new patch files that will pass the merge on head test. Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-08-30selftest: Add new signed-off-by test filesTrevor Gamblin
Make the tests files for signoffs in mboxes (not carried patches) use selftest-hello instead of another recipe that is more likely to change. Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-08-30selftest: remove --debug flagTrevor Gamblin
This was added previously but it makes no difference for the output of results, so remove it to avoid later confusion. Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-08-30selftest: Add new shortlog test filesTrevor Gamblin
Modify the shortlog test files to use selftest-hello from oe-core, similar to other revised tests. Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-08-30selftest: Add new patch signed-off-by test filesTrevor Gamblin
Copy the previously-added CVE check files and modify them to fail/pass the patchtest signed-off-by presence check for carried patches. Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-08-30selftest: Add new merge test patch filesTrevor Gamblin
Add a new patch file that should always merge for the pass case because it modifies selftest-hello (which shouldn't change), while replacing the failing case with a new file that should *only* fail the merge case. Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-08-30selftest: Add new mbox format test patchesTrevor Gamblin
Replace the existing test patch files with new ones that change selftest-hello and therefore aren't reliant on recipes that will change often. Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-08-29selftest: Add new test patches for CVE tag formatTrevor Gamblin
Copy and modify the new patch files from the CVE tag presence test so that they validate tag formats instead. Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-08-29selftest: add new test patches for CVE presenceTrevor Gamblin
Add new selftests for the presence of CVE tags that do not rely on a real recipe whose version and/or configuration may change over time. Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-08-29selftest: add new valid author test patchesTrevor Gamblin
The old files are unclear on whether they should actually pass/fail and why, so create some new ones using oe-core's meta-selftest/recipes-test/selftest-hello as a baseline. Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-08-29selftest: take target directory as parameterTrevor Gamblin
The selftests invoke patchtest in a way that doesn't match the current usage, and therefore do not operate as expected. Until the tests are merged into openembedded-core, allow selftest to take a single argument (the target directory) to pass to patchtest so that selftest can run. Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-08-29test_metadata_lic_files_chksum: explicitly import PatchTestDataStoreTrevor Gamblin
This was missed in 9abbb0e8, and without it the test doesn't work. Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-08-29tests: Correct license identifiersRichard Purdie
The license is clearly GPL 2.0 and there is no "or later" option, the patch adding the license identifiers was incorrect. Fix the license idetifers and clean up the boilerplate whilst we're here. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-08-28patchtest: refactor tests to reflect module namingTrevor Gamblin
The patchtest repo is being refactored to improve maintainability, so modify the test cases in oe-core to match. Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-08-23COPYING: rename to LICENSE, remove old versionTrevor Gamblin
We had both a COPYING and a LICENSE file, but the latter simply pointed to the former, so just remove the redundancy. Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-08-23README: Update maintainerTrevor Gamblin
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-08-22test_patch_upstream_status: fix testTrevor Gamblin
Similar to test_mbox_signed_off_by and test_patch_signed_off_by, replace the regex object with the use of pyparsing's AtLineStart to search for the Upstream-Status tag. Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-08-22test_patch_signed_off_by: fix testTrevor Gamblin
Instead of using a regex search, use pyparsing's search_string functionality and define a new patch_signed_off_by pattern to search the patch file with, like previous the test_mbox_signed_off_by fix. Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2023-06-12test_mbox_signed_off_by: fix testTrevor Gamblin
This fixes a consistent issue with false failures being reported when testing for authors' signed-off-bys in mboxes. Instead of manually compiling a regex pattern, use pyparsing's AtLineStart to check for the signature's presence at the beginning of the line. Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
2020-05-12Add SPDX-License-Identifier: GPL-2.0-or-later to source filesChangqing Li
[YOCTO #13532] Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-01-16README: Update links and other referencesmaster-nextPaul Barker
* Switch http links to https. * Update the yocto mailing list address after the move to groups.io. * Minor style fixes. Signed-off-by: Paul Barker <pbarker@konsulko.com>
2020-01-16README: Update maintainersPaul Barker
Signed-off-by: Paul Barker <pbarker@konsulko.com>
2018-11-06test_patch_cve.py: fix cve tag checking logicChen Qi
The current logic for checking cve tag is not correct. It errors out if and only if the patch contains a line which begins with CVE-YYYY-XXXX and contains nothing else. It will not error out if the patch contains no CVE information, nor will it error out if the patch contains line like below. 'Fix CVE-YYYY-XXXX' I can see that the cve tag checking logic tries to ensure the patch contains something like 'CVE: CVE-YYYY-XXXX'. So fix to implement such logic. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-02-01test_metadata_lic_files_chksum.py: correctly match against multiline stringsAlexander Kanavin
Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
2018-01-31base: find PN on renamesLeonardo Sandoval
Renames patches, usually from recipes upgrades, need extra care becase the unidiff library only provides the old name (through the is_modified_file predicate) and patchtest, on the second run (when patch is merged), the datastore contains the new filename so we cannot compare directly. To overcome this problem, use 'basenames', which is filename without the PV part. Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
2018-01-17test_metadata_lic_files_chksum: fix regexLeonardo Sandoval
Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
2018-01-17test_metadata_lic_files_chksum: match colon and tag must be starting the newlineLeonardo Sandoval
Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
2018-01-17test_metadata_lic_files_chksum.py: use License-Update tag insteadLeonardo Sandoval
Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
2017-12-06tests/test_metadata_src_uri: remove check src_uri_checksums_not_changedLeonardo Sandoval
This check does not really makes sense because bitbake itself does this test (the checksums from the downloaded tarball are check againts those define on recipe). Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
2017-11-27test_mbox_bugzilla: allow zero or one space before bugzilla tagLeonardo Sandoval
Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>