summaryrefslogtreecommitdiff
path: root/tools/buildman/func_test.py
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2025-05-27 07:43:04 -0600
committerTom Rini <trini@konsulko.com>2025-05-27 07:43:04 -0600
commit6015a24a5a2647ab044333ed8e2462f90f855e36 (patch)
tree53fe80bee534a17f6c40e697cc112287a0b4b3c5 /tools/buildman/func_test.py
parent39b815d02d7ce6af32bcf023d20243c404b75a84 (diff)
parentec2482a24ac3a1d0beadae80bcb28c8d89b4c1ab (diff)
Merge tag 'dm-next-27may25' of git://git.denx.de/u-boot-dm into next
Sync up Python tools from my tree - minor binman tweaks - terminal improvements in u_boot_pylib - patman move to asyncio - patman support for new 'series' subcommand
Diffstat (limited to 'tools/buildman/func_test.py')
-rw-r--r--tools/buildman/func_test.py20
1 files changed, 15 insertions, 5 deletions
diff --git a/tools/buildman/func_test.py b/tools/buildman/func_test.py
index b45eb95a1e6..51c6855420e 100644
--- a/tools/buildman/func_test.py
+++ b/tools/buildman/func_test.py
@@ -670,7 +670,7 @@ Some images are invalid'''
def testThreadExceptions(self):
"""Test that exceptions in threads are reported"""
- with test_util.capture_sys_output() as (stdout, stderr):
+ with terminal.capture() as (stdout, stderr):
self.assertEqual(102, self._RunControl('-o', self._output_dir,
test_thread_exceptions=True))
self.assertIn(
@@ -808,7 +808,7 @@ Some images are invalid'''
# CONFIG_LOCALVERSION_AUTO is not set
''', cfg_data)
- with test_util.capture_sys_output() as (stdout, stderr):
+ with terminal.capture() as (stdout, stderr):
lines, cfg_data = self.check_command('-r', '-a', 'LOCALVERSION')
self.assertIn(b'SOURCE_DATE_EPOCH=0', lines[0])
@@ -1032,14 +1032,14 @@ endif
outfile = os.path.join(self._output_dir, 'test-boards.cfg')
if os.path.exists(outfile):
os.remove(outfile)
- with test_util.capture_sys_output() as (stdout, stderr):
+ with terminal.capture() as (stdout, stderr):
result = self._RunControl('-R', outfile, brds=None,
get_builder=False)
self.assertTrue(os.path.exists(outfile))
def test_print_prefix(self):
"""Test that we can print the toolchain prefix"""
- with test_util.capture_sys_output() as (stdout, stderr):
+ with terminal.capture() as (stdout, stderr):
result = self._RunControl('-A', 'board0')
self.assertEqual('arm-\n', stdout.getvalue())
self.assertEqual('', stderr.getvalue())
@@ -1083,7 +1083,7 @@ endif
def test_print_arch(self):
"""Test that we can print the board architecture"""
- with test_util.capture_sys_output() as (stdout, stderr):
+ with terminal.capture() as (stdout, stderr):
result = self._RunControl('--print-arch', 'board0')
self.assertEqual('arm\n', stdout.getvalue())
self.assertEqual('', stderr.getvalue())
@@ -1152,3 +1152,13 @@ CONFIG_SOC="fred"
'board': 'ARM Board 0',
'config': 'config0',
'target': 'board0'}, []), res)
+
+ def testTarget(self):
+ """Test that the --target flag works"""
+ lines = self.check_command('--target', 'u-boot.dtb')[0]
+
+ # It should not affect the defconfig line
+ self.assertNotIn(b'u-boot.dtb', lines[0])
+
+ # It should appear at the end of the build line
+ self.assertEqual(b'u-boot.dtb', lines[1].split()[-1])