mirror of
https://xff.cz/git/u-boot/
synced 2025-09-02 09:12:08 +02:00
binman: Don't show image-skip message by default
This message is not very important since it is simply indicating that the user's instructions are being followed. Only show it when the verbosity level is above the default. Also drop the unnecessary extra newline on this message, which causes two line breaks. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
This commit is contained in:
@@ -133,8 +133,8 @@ def Binman(options, args):
|
|||||||
if name not in options.image:
|
if name not in options.image:
|
||||||
del images[name]
|
del images[name]
|
||||||
skip.append(name)
|
skip.append(name)
|
||||||
if skip:
|
if skip and options.verbosity >= 2:
|
||||||
print 'Skipping images: %s\n' % ', '.join(skip)
|
print 'Skipping images: %s' % ', '.join(skip)
|
||||||
|
|
||||||
state.Prepare(images, dtb)
|
state.Prepare(images, dtb)
|
||||||
|
|
||||||
|
@@ -187,7 +187,8 @@ class TestFunctional(unittest.TestCase):
|
|||||||
return control.Binman(options, args)
|
return control.Binman(options, args)
|
||||||
|
|
||||||
def _DoTestFile(self, fname, debug=False, map=False, update_dtb=False,
|
def _DoTestFile(self, fname, debug=False, map=False, update_dtb=False,
|
||||||
entry_args=None, images=None, use_real_dtb=False):
|
entry_args=None, images=None, use_real_dtb=False,
|
||||||
|
verbosity=None):
|
||||||
"""Run binman with a given test file
|
"""Run binman with a given test file
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
@@ -210,6 +211,8 @@ class TestFunctional(unittest.TestCase):
|
|||||||
args.append('-up')
|
args.append('-up')
|
||||||
if not use_real_dtb:
|
if not use_real_dtb:
|
||||||
args.append('--fake-dtb')
|
args.append('--fake-dtb')
|
||||||
|
if verbosity is not None:
|
||||||
|
args.append('-v%d' % verbosity)
|
||||||
if entry_args:
|
if entry_args:
|
||||||
for arg, value in entry_args.iteritems():
|
for arg, value in entry_args.iteritems():
|
||||||
args.append('-a%s=%s' % (arg, value))
|
args.append('-a%s=%s' % (arg, value))
|
||||||
@@ -1459,13 +1462,22 @@ class TestFunctional(unittest.TestCase):
|
|||||||
|
|
||||||
def testSelectImage(self):
|
def testSelectImage(self):
|
||||||
"""Test that we can select which images to build"""
|
"""Test that we can select which images to build"""
|
||||||
with test_util.capture_sys_output() as (stdout, stderr):
|
expected = 'Skipping images: image1'
|
||||||
retcode = self._DoTestFile('006_dual_image.dts', images=['image2'])
|
|
||||||
self.assertEqual(0, retcode)
|
|
||||||
self.assertIn('Skipping images: image1', stdout.getvalue())
|
|
||||||
|
|
||||||
self.assertFalse(os.path.exists(tools.GetOutputFilename('image1.bin')))
|
# We should only get the expected message in verbose mode
|
||||||
self.assertTrue(os.path.exists(tools.GetOutputFilename('image2.bin')))
|
for verbosity in (None, 2):
|
||||||
|
with test_util.capture_sys_output() as (stdout, stderr):
|
||||||
|
retcode = self._DoTestFile('006_dual_image.dts',
|
||||||
|
verbosity=verbosity,
|
||||||
|
images=['image2'])
|
||||||
|
self.assertEqual(0, retcode)
|
||||||
|
if verbosity:
|
||||||
|
self.assertIn(expected, stdout.getvalue())
|
||||||
|
else:
|
||||||
|
self.assertNotIn(expected, stdout.getvalue())
|
||||||
|
|
||||||
|
self.assertFalse(os.path.exists(tools.GetOutputFilename('image1.bin')))
|
||||||
|
self.assertTrue(os.path.exists(tools.GetOutputFilename('image2.bin')))
|
||||||
|
|
||||||
def testUpdateFdtAll(self):
|
def testUpdateFdtAll(self):
|
||||||
"""Test that all device trees are updated with offset/size info"""
|
"""Test that all device trees are updated with offset/size info"""
|
||||||
|
Reference in New Issue
Block a user