diff options
author | Trevor Gamblin <tgamblin@baylibre.com> | 2023-09-13 13:00:46 -0400 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-09-14 15:20:08 +0100 |
commit | 4a6f38c5327b40a45c340af49fee9a0d5cc890bd (patch) | |
tree | 669ae555ecc031990579baa207d40f38ab7e1335 /meta/lib/patchtest/tests/pyparsing/common.py | |
parent | e12e6d94ecbea6e0dafc080f2f196e12228730eb (diff) | |
download | poky-4a6f38c5327b40a45c340af49fee9a0d5cc890bd.tar.gz |
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>
Diffstat (limited to 'meta/lib/patchtest/tests/pyparsing/common.py')
-rw-r--r-- | meta/lib/patchtest/tests/pyparsing/common.py | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/meta/lib/patchtest/tests/pyparsing/common.py b/meta/lib/patchtest/tests/pyparsing/common.py new file mode 100644 index 0000000000..9d37b0403d --- /dev/null +++ b/meta/lib/patchtest/tests/pyparsing/common.py | |||
@@ -0,0 +1,26 @@ | |||
1 | # common pyparsing variables | ||
2 | # | ||
3 | # Copyright (C) 2016 Intel Corporation | ||
4 | # | ||
5 | # SPDX-License-Identifier: GPL-2.0 | ||
6 | |||
7 | import pyparsing | ||
8 | |||
9 | # general | ||
10 | colon = pyparsing.Literal(":") | ||
11 | start = pyparsing.LineStart() | ||
12 | end = pyparsing.LineEnd() | ||
13 | at = pyparsing.Literal("@") | ||
14 | lessthan = pyparsing.Literal("<") | ||
15 | greaterthan = pyparsing.Literal(">") | ||
16 | opensquare = pyparsing.Literal("[") | ||
17 | closesquare = pyparsing.Literal("]") | ||
18 | inappropriate = pyparsing.CaselessLiteral("Inappropriate") | ||
19 | submitted = pyparsing.CaselessLiteral("Submitted") | ||
20 | |||
21 | # word related | ||
22 | nestexpr = pyparsing.nestedExpr(opener='[', closer=']') | ||
23 | inappropriateinfo = pyparsing.Literal("Inappropriate") + nestexpr | ||
24 | submittedinfo = pyparsing.Literal("Submitted") + nestexpr | ||
25 | word = pyparsing.Word(pyparsing.alphas) | ||
26 | worddot = pyparsing.Word(pyparsing.alphas+".") | ||