Commit Graph

7 Commits

Author SHA1 Message Date
Trevor Gamblin
4c378fc895 patchtest: simplify, rename modules
- simplify base.py, data.py
- move some leftover regex patterns to patterns.py
- remove pyparsing path logic, since this is no longer needed
- rename PatchTestInput class to PatchtestParser
- data.py: rename to patchtest_parser.py
- patterns.py: rename to patchtest_patterns.py
- move PatchTestDataStore to test_metadata.py since that's the only
  place it's used
- remove unused logger code

(From OE-Core rev: 1e971b05b036b0b1eb0bdbd9b26b54d06e74294c)

Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-09-30 17:00:50 +01:00
Trevor Gamblin
bb0f1625d7 patchtest: patterns: add module, refactor
Currently, patchtest has a lot of spread-out definitions for patterns
used in various setup and test functions. Organize these by putting them
all into a new patterns.py module. This allows the tests/pyparsing
directory to be removed, as it is now redundant. Also remove some
definitions where they were duplicated or unused, and perform some
renames to improve readability and avoid collisions. Many of these
variables are composed from others, so the file is only partially
sorted.

(From OE-Core rev: 1ab55d495957918be532a36224b5598c9955a44d)

Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-09-30 17:00:50 +01:00
Trevor Gamblin
3ad5aa3f16 patchtest: make pylint tests compatible with 3.x
pylint 3.x has removed epylint, which is now a separate module. To avoid
adding another recipe or using outdated modules, modify the
test_python_pylint tests so that they use the standard pylint API.

(From OE-Core rev: 72be3d6a116febf46130cccbe12afe5ad93779b5)

Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-11-01 19:19:40 +00:00
Trevor Gamblin
9b8b9a9fa3 patchtest: test regardless of mergeability
(From OE-Core rev: dc089073eb120de76c8907e476c341ed3e97c164)

Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-19 22:25:23 +01:00
Trevor Gamblin
b5a87b5f98 patchtest: update SPDX identifiers
Replace full license headers with SPDX identifiers and adjust all
patchtest-related code to use GPL-2.0-only.

(From OE-Core rev: 9bea6b39074296bb8d8719a3300636e316f19d1b)

Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-17 22:53:30 +01:00
Trevor Gamblin
2fdabc368a patchtest: improve test issue messages
The patchtest tests provide vague feedback to the user, and many of them
also provide redundant 'fix' strings that could easily be incorporated
into the issue messages themselves. Simplify them so that it is more
clear what the errors are and how they can be addressed. No
recommendation is given when the issue string adequately conveys the
issue, e.g. with a missing "LICENSE" entry in a newly-created recipe.

(From OE-Core rev: 0bfb3614244ec7aa79b6424bc63f9f2bccdabe98)

Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-13 11:53:06 +01:00
Trevor Gamblin
4a6f38c532 patchtest: Add tests from patchtest oe repo
Copy the core components of the patchtest-oe repo into
meta/lib/patchtest in oe-core.

(From OE-Core rev: 257f64f4e4414b78981104aec132b067beb5a92a)

Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-14 15:20:08 +01:00