diff options
author | Simon Glass <sjg@chromium.org> | 2025-04-29 07:21:59 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2025-05-27 10:07:41 +0100 |
commit | ae3695f691c6325f1a504ee3df7f22d75c7a0c96 (patch) | |
tree | f18e01121a9e05a60835462be85662a3d85cc7d9 /tools/binman/elf_test.py | |
parent | 6330f94a35142c135c96f5af952087ef3d9c3177 (diff) |
patman: Move capture_sys_output() into terminal and rename
This function is sometimes useful outside tests. Also it can affect how
terminal output is done, e.g. whether ANSI characters should be emitted
or not.
Move it out of the test_util package and into terminal.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/binman/elf_test.py')
-rw-r--r-- | tools/binman/elf_test.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/binman/elf_test.py b/tools/binman/elf_test.py index 2f22639dffc..5b173392898 100644 --- a/tools/binman/elf_test.py +++ b/tools/binman/elf_test.py @@ -13,6 +13,7 @@ import unittest from binman import elf from u_boot_pylib import command +from u_boot_pylib import terminal from u_boot_pylib import test_util from u_boot_pylib import tools from u_boot_pylib import tout @@ -187,7 +188,7 @@ class TestElf(unittest.TestCase): entry = FakeEntry(24) section = FakeSection() elf_fname = self.ElfTestFile('u_boot_binman_syms') - with test_util.capture_sys_output() as (stdout, stderr): + with terminal.capture() as (stdout, stderr): elf.LookupAndWriteSymbols(elf_fname, entry, section) self.assertTrue(len(stdout.getvalue()) > 0) finally: |