[Concept,01/32] test: pxe: Preserve filesystem images when persist is enabled

Message ID 20260109231151.4056804-2-sjg@u-boot.org
State New
Headers
Series boot: pxe: Refactor into separate load/setup phases |

Commit Message

Simon Glass Jan. 9, 2026, 11:11 p.m. UTC
  From: Simon Glass <simon.glass@canonical.com>

Skip cleanup of filesystem images in the pxe_fdtdir_image and
pxe_error_image fixtures when the persist option is set. This allows
inspection of the test files after a test run for debugging purposes.

Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
---

 test/py/tests/test_pxe_parser.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
  

Patch

diff --git a/test/py/tests/test_pxe_parser.py b/test/py/tests/test_pxe_parser.py
index de01f219244..d52bf3e6b50 100644
--- a/test/py/tests/test_pxe_parser.py
+++ b/test/py/tests/test_pxe_parser.py
@@ -325,7 +325,8 @@  def pxe_fdtdir_image(u_boot_config):
 
     yield fsh.fs_img, cfg_path
 
-    fsh.cleanup()
+    if not u_boot_config.persist:
+        fsh.cleanup()
 
 
 @pytest.fixture
@@ -385,7 +386,8 @@  def pxe_error_image(u_boot_config):
 
     yield fsh.fs_img, cfg_path
 
-    fsh.cleanup()
+    if not u_boot_config.persist:
+        fsh.cleanup()
 
 
 @pytest.mark.boardspec('sandbox')