Args:
allow_fake: True if allowed, False if not allowed
"""
- pass
+ self.allow_fake = allow_fake
def CheckMissing(self, missing_list):
"""Check if any entries in this section have missing external blobs
missing = False
pathnames = []
for fname in self._filenames:
+ fname = self.check_fake_fname(fname)
pathname = tools.GetInputFilename(
fname, self.external and self.section.GetAllowMissing())
# Allow the file to be missing
Args:
allow_fake_blob: True if allowed, False if not allowed
"""
+ super().SetAllowFakeBlob(allow_fake)
for entry in self._entries.values():
entry.SetAllowFakeBlob(allow_fake)
err,
"Image '.*' has faked external blobs and is non-functional: .*")
+ def testExtblobListFaked(self):
+ """Test an extblob with missing external blob that are faked"""
+ with test_util.capture_sys_output() as (stdout, stderr):
+ self._DoTestFile('216_blob_ext_list_missing.dts',
+ allow_fake_blobs=True)
+ err = stderr.getvalue()
+ self.assertRegex(err, "Image 'main-section'.*faked.*: blob-ext-list")
+
if __name__ == "__main__":
unittest.main()
--- /dev/null
+// SPDX-License-Identifier: GPL-2.0+
+
+/dts-v1/;
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ binman {
+ blob-ext-list {
+ filenames = "refcode.bin", "fake-file";
+ };
+ };
+};