summaryrefslogtreecommitdiffstats
path: root/meta/lib/patchtest/tests/pyparsing/parse_upstream_status.py
diff options
context:
space:
mode:
authorTrevor Gamblin <tgamblin@baylibre.com>2024-09-24 07:54:58 -0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-09-30 17:00:50 +0100
commitbb0f1625d7655d04c6df3c144e488f676ff2f762 (patch)
tree3e3a07f71c4e1950f5e7cc47dbdd1605888d0d16 /meta/lib/patchtest/tests/pyparsing/parse_upstream_status.py
parentdd3a73961b49b508771a8cd579ebf1004f786f12 (diff)
downloadpoky-bb0f1625d7655d04c6df3c144e488f676ff2f762.tar.gz
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>
Diffstat (limited to 'meta/lib/patchtest/tests/pyparsing/parse_upstream_status.py')
-rw-r--r--meta/lib/patchtest/tests/pyparsing/parse_upstream_status.py24
1 files changed, 0 insertions, 24 deletions
diff --git a/meta/lib/patchtest/tests/pyparsing/parse_upstream_status.py b/meta/lib/patchtest/tests/pyparsing/parse_upstream_status.py
deleted file mode 100644
index bc6c427c4c..0000000000
--- a/meta/lib/patchtest/tests/pyparsing/parse_upstream_status.py
+++ /dev/null
@@ -1,24 +0,0 @@
1# upstream-status pyparsing definition
2#
3# Copyright (C) 2016 Intel Corporation
4#
5# SPDX-License-Identifier: GPL-2.0-only
6
7
8import common
9import pyparsing
10
11upstream_status_literal_valid_status = ["Pending", "Backport", "Denied", "Inappropriate", "Submitted"]
12upstream_status_nonliteral_valid_status = ["Pending", "Backport", "Denied", "Inappropriate [reason]", "Submitted [where]"]
13
14upstream_status_valid_status = pyparsing.Or(
15 [pyparsing.Literal(status) for status in upstream_status_literal_valid_status]
16)
17
18upstream_status_mark = pyparsing.Literal("Upstream-Status")
19inappropriate_status_mark = common.inappropriate
20submitted_status_mark = common.submitted
21
22upstream_status = common.start + upstream_status_mark + common.colon + upstream_status_valid_status
23upstream_status_inappropriate_info = common.start + upstream_status_mark + common.colon + common.inappropriateinfo
24upstream_status_submitted_info = common.start + upstream_status_mark + common.colon + common.submittedinfo