diff options
author | Trevor Gamblin <tgamblin@baylibre.com> | 2023-10-12 09:24:59 -0400 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-10-13 11:53:06 +0100 |
commit | fd06e4f2664b69a2776cdc8188dba6e6e958d86a (patch) | |
tree | 2b26efe798c2169eeeea6e9c24ae5ac72d9fa9df /meta/lib/patchtest/tests/test_mbox_format.py | |
parent | 2fdabc368a52a9bf60f76f33e92b94de843688a8 (diff) | |
download | poky-fd06e4f2664b69a2776cdc8188dba6e6e958d86a.tar.gz |
patchtest: clean up test suite
Various tweaks to make the test suite cleaner and more efficient:
- Replace use of "re" module with "pyparsing" in tests (but not base.py)
- Make test_mbox_cve only check for CVE tags in the commit if the added
patch has them
- Make test_mbox_cve SKIP instead of PASS if there's no CVE tag
- Simplify the bugzilla tag checking test now that pyparsing is used
- Modify the selftest script to correctly parse the new result output
(From OE-Core rev: 7a187c2475aa762e2bc830950f608143f2535a72)
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/patchtest/tests/test_mbox_format.py')
-rw-r--r-- | meta/lib/patchtest/tests/test_mbox_format.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/meta/lib/patchtest/tests/test_mbox_format.py b/meta/lib/patchtest/tests/test_mbox_format.py index 42a8491a09..c9e0465835 100644 --- a/meta/lib/patchtest/tests/test_mbox_format.py +++ b/meta/lib/patchtest/tests/test_mbox_format.py | |||
@@ -5,11 +5,10 @@ | |||
5 | # SPDX-License-Identifier: GPL-2.0 | 5 | # SPDX-License-Identifier: GPL-2.0 |
6 | 6 | ||
7 | import base | 7 | import base |
8 | import re | ||
9 | 8 | ||
10 | class MboxFormat(base.Base): | 9 | class MboxFormat(base.Base): |
11 | 10 | ||
12 | def test_mbox_format(self): | 11 | def test_mbox_format(self): |
13 | if self.unidiff_parse_error: | 12 | if self.unidiff_parse_error: |
14 | self.fail('Series cannot be parsed correctly due to malformed diff lines. Create the series again using git-format-patch and ensure it can be applied using git am', | 13 | self.fail('Series cannot be parsed correctly due to malformed diff lines. Create the series again using git-format-patch and ensure it can be applied using git am', |
15 | data=[('Diff line', re.sub('^.+:\s(?<!$)','',self.unidiff_parse_error))]) | 14 | data=[('Diff line',self.unidiff_parse_error)]) |