summaryrefslogtreecommitdiff
path: root/tools/patman/func_test.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2025-04-29 07:22:17 -0600
committerSimon Glass <sjg@chromium.org>2025-05-27 10:07:41 +0100
commitd63b0750621cb1833c9d263c49476dff6dc88ffe (patch)
tree29bd58a171da70840652a07e828a7f9d56e0142a /tools/patman/func_test.py
parente2a991398db44ab433d2e926575ca873c5a0739a (diff)
patman: Split up check_and_show_status()
This function has three phases: - collecting things from patchwork - doing some processing - showing the results to the user / creating a branch Refactor into two functions so we can eventually have the patchwork part fully separated out. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/patman/func_test.py')
-rw-r--r--tools/patman/func_test.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/patman/func_test.py b/tools/patman/func_test.py
index 31ba708ab87..ea96c508fa2 100644
--- a/tools/patman/func_test.py
+++ b/tools/patman/func_test.py
@@ -790,7 +790,8 @@ diff --git a/lib/efi_loader/efi_memory.c b/lib/efi_loader/efi_memory.c
series = Series()
with terminal.capture() as (_, err):
- status.collect_patches(series, 1234, None, self._fake_patchwork)
+ patches = status.collect_patches(1234, None, self._fake_patchwork)
+ status.check_patch_count(0, len(patches))
self.assertIn('Warning: Patchwork reports 1 patches, series has 0',
err.getvalue())
@@ -799,7 +800,7 @@ diff --git a/lib/efi_loader/efi_memory.c b/lib/efi_loader/efi_memory.c
series = Series()
series.commits = [Commit('abcd')]
- patches = status.collect_patches(series, 1234, None,
+ patches = status.collect_patches(1234, None,
self._fake_patchwork)
self.assertEqual(1, len(patches))
patch = patches[0]