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_metadata_src_uri.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_metadata_src_uri.py')
-rw-r--r-- | meta/lib/patchtest/tests/test_metadata_src_uri.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/lib/patchtest/tests/test_metadata_src_uri.py b/meta/lib/patchtest/tests/test_metadata_src_uri.py index ce2ace17bb..c19582ec2d 100644 --- a/meta/lib/patchtest/tests/test_metadata_src_uri.py +++ b/meta/lib/patchtest/tests/test_metadata_src_uri.py | |||
@@ -6,8 +6,8 @@ | |||
6 | 6 | ||
7 | import subprocess | 7 | import subprocess |
8 | import base | 8 | import base |
9 | import re | ||
10 | import os | 9 | import os |
10 | import pyparsing | ||
11 | from data import PatchTestInput, PatchTestDataStore | 11 | from data import PatchTestInput, PatchTestDataStore |
12 | 12 | ||
13 | class SrcUri(base.Metadata): | 13 | class SrcUri(base.Metadata): |
@@ -15,7 +15,7 @@ class SrcUri(base.Metadata): | |||
15 | metadata = 'SRC_URI' | 15 | metadata = 'SRC_URI' |
16 | md5sum = 'md5sum' | 16 | md5sum = 'md5sum' |
17 | sha256sum = 'sha256sum' | 17 | sha256sum = 'sha256sum' |
18 | git_regex = re.compile('^git\:\/\/.*') | 18 | git_regex = pyparsing.Regex('^git\:\/\/.*') |
19 | 19 | ||
20 | def setUp(self): | 20 | def setUp(self): |
21 | # these tests just make sense on patches that can be merged | 21 | # these tests just make sense on patches that can be merged |