From d63b0750621cb1833c9d263c49476dff6dc88ffe Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Tue, 29 Apr 2025 07:22:17 -0600 Subject: 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 --- tools/patman/func_test.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tools/patman/func_test.py') 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] -- cgit v1.2.3