diff options
author | Simon Glass <sjg@chromium.org> | 2020-07-09 18:39:40 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2020-07-25 14:46:57 -0600 |
commit | b1cca9552c6c930d094806a64b2096411783d13f (patch) | |
tree | c4389d3fe703f83e8f951b63be919bb802bc8e67 /tools/binman/ftest.py | |
parent | 38fdb4cb35e9260a6aa78ffcfa68d39bfc3523de (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__": |