diff options
author | Simon Glass <sjg@chromium.org> | 2020-07-09 18:39:40 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2020-07-20 11:37:47 -0600 |
commit | 13262c93626502873786067fcbe2e2ab5894b90f (patch) | |
tree | f4d6cdfb02fcfbec1bac60d33f11ef8e0e430f83 /tools/binman/ftest.py | |
parent | f9793a12c5e76c50018d516cbaa011ac86c285fa (diff) |
binman: Detect when valid images are not produced
When external blobs are missing, show a message indicating that the images
are not functional.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/binman/ftest.py')
-rw-r--r-- | tools/binman/ftest.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/tools/binman/ftest.py b/tools/binman/ftest.py index 928d3608a31..cc551c9f176 100644 --- a/tools/binman/ftest.py +++ b/tools/binman/ftest.py @@ -3380,7 +3380,19 @@ class TestFunctional(unittest.TestCase): def testExtblobMissingOk(self): """Test an image with an missing external blob that is allowed""" - self._DoTestFile('158_blob_ext_missing.dts', allow_missing=True) + with test_util.capture_sys_output() as (stdout, stderr): + self._DoTestFile('158_blob_ext_missing.dts', allow_missing=True) + err = stderr.getvalue() + self.assertRegex(err, "Image 'main-section'.*missing.*: blob-ext") + + def testExtblobMissingOkSect(self): + """Test an image with an missing external blob that is allowed""" + with test_util.capture_sys_output() as (stdout, stderr): + self._DoTestFile('159_blob_ext_missing_sect.dts', + allow_missing=True) + err = stderr.getvalue() + self.assertRegex(err, "Image 'main-section'.*missing.*: " + "blob-ext blob-ext2") if __name__ == "__main__": |