diff options
| author | Simon Glass <[email protected]> | 2026-03-06 11:12:29 -0700 |
|---|---|---|
| committer | Simon Glass <[email protected]> | 2026-03-18 06:14:16 -0600 |
| commit | b16319c6439a348ca97187540d71c10af4dad140 (patch) | |
| tree | 6ed898d036cf5ca74a17d7b4a9743050093039a9 /tools | |
| parent | a27980786cfb3c430aa1c05da8e79180c584d221 (diff) | |
binman: test: Capture output from tests with warnings
Tests are supposed to run silently and capture any output produced.
Fix testRemoveTemplate() so that the message about the missing openssl
is captured, along with the invalid-images message.
Fix testNxpImx9Image() as well, since it is expected that container.img
and bl31.bin are missing.
Signed-off-by: Simon Glass <[email protected]>
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/binman/ftest.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/tools/binman/ftest.py b/tools/binman/ftest.py index a53e37f31b3..a96789d4f1c 100644 --- a/tools/binman/ftest.py +++ b/tools/binman/ftest.py @@ -7915,7 +7915,8 @@ fdt fdtmap Extract the devicetree blob from the fdtmap container_path = os.path.join(testdir, 'mx95b0-ahab-container.img') with open(container_path, 'w') as f: f.write(bytes([0x87]).decode('latin1') * 32768) - self._DoTestFile('350_nxp_imx95.dts', output_dir=testdir) + with terminal.capture(): + self._DoTestFile('350_nxp_imx95.dts', output_dir=testdir) def testFitSignSimple(self): """Test that image with FIT and signature nodes can be signed""" @@ -8307,8 +8308,11 @@ fdt fdtmap Extract the devicetree blob from the fdtmap """Test whether template is removed""" TestFunctional._MakeInputFile('my-blob.bin', b'blob') TestFunctional._MakeInputFile('my-blob2.bin', b'other') - self._DoTestFile('346_remove_template.dts', - force_missing_bintools='openssl',) + with terminal.capture() as (_, stderr): + self._DoTestFile('346_remove_template.dts', + force_missing_bintools='openssl',) + err = stderr.getvalue() + self.assertRegex(err, "Image 'file2'.*missing bintools.*: openssl") def testBootphPropagation(self): """Test that bootph-* properties are propagated correctly to supernodes""" |
