[PATCH 07/11] test: Move the configuration-editor setup to its own file
Simon Glass
sjg at chromium.org
Mon May 18 00:51:05 CEST 2026
Move setup_cedit_file() to its own module.
Signed-off-by: Simon Glass <sjg at chromium.org>
---
test/py/img/cedit.py | 20 ++++++++++++++++++++
test/py/tests/test_ut.py | 12 +-----------
2 files changed, 21 insertions(+), 11 deletions(-)
create mode 100644 test/py/img/cedit.py
diff --git a/test/py/img/cedit.py b/test/py/img/cedit.py
new file mode 100644
index 00000000000..4b53275d259
--- /dev/null
+++ b/test/py/img/cedit.py
@@ -0,0 +1,20 @@
+# SPDX-License-Identifier: GPL-2.0+
+# Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.
+
+"""Create configuration editor test files"""
+
+import os
+
+import utils
+
+
+def setup_cedit_file(ubman):
+ """Set up a .dtb file for use with testing expo and configuration editor"""
+ infname = os.path.join(ubman.config.source_dir,
+ 'test/boot/files/expo_layout.dts')
+ inhname = os.path.join(ubman.config.source_dir,
+ 'test/boot/files/expo_ids.h')
+ expo_tool = os.path.join(ubman.config.source_dir, 'tools/expo.py')
+ outfname = 'cedit.dtb'
+ utils.run_and_log(
+ ubman, f'{expo_tool} -e {inhname} -l {infname} -o {outfname}')
diff --git a/test/py/tests/test_ut.py b/test/py/tests/test_ut.py
index 4736b92ca13..e8d47b79365 100644
--- a/test/py/tests/test_ut.py
+++ b/test/py/tests/test_ut.py
@@ -25,19 +25,9 @@ from img.armbian import setup_bootmenu_image
from img.chromeos import setup_cros_image
from img.android import setup_android_image
from img.efi import setup_efi_image
+from img.cedit import setup_cedit_file
-def setup_cedit_file(ubman):
- """Set up a .dtb file for use with testing expo and configuration editor"""
- infname = os.path.join(ubman.config.source_dir,
- 'test/boot/files/expo_layout.dts')
- inhname = os.path.join(ubman.config.source_dir,
- 'test/boot/files/expo_ids.h')
- expo_tool = os.path.join(ubman.config.source_dir, 'tools/expo.py')
- outfname = 'cedit.dtb'
- utils.run_and_log(
- ubman, f'{expo_tool} -e {inhname} -l {infname} -o {outfname}')
-
@pytest.mark.buildconfigspec('ut_dm')
def test_ut_dm_init(ubman):
"""Initialize data for ut dm tests."""
--
2.43.0
More information about the U-Boot
mailing list