def yocto_id_from_ext4(self, filename):
try:
cmd = "debugfs -R 'cat %s' %s| sed -n 's/^%s=//p'" % (self.artifact_info_file, filename, self.artifact_prefix)
output = subprocess.check_output(cmd, shell=True).strip()
logger.info("Running: " + cmd + " returned: " + output)
return output
except subprocess.CalledProcessError:
pytest.fail("Unable to read: %s, is it a broken image?" % (filename))
except Exception, e:
pytest.fail("Unexpected error trying to read ext4 image: %s, error: %s" % (filename, str(e)))
评论列表
文章目录