提交 87971521 编写于 作者: R redjie

add file size log

Signed-off-by: Nredjie <hongshaojie@h-partners.com>
Change-Id: I980763c4b88218b09e85c6db8a67a2563474a3db
上级 20f0d857
......@@ -140,13 +140,15 @@ if __name__ == "__main__":
target_dir = os.path.normpath(os.path.join(args.archive_path, "rootfs"))
ret_size = GetDirSize(target_dir)/1024/1024
PrintToLog('Size of rootfs is ({:.2f}M)'.format(ret_size))
if ret_size > 15:
PrintToLog('ERROR: Size of rootfs({:.2f}M) is over the upper limit(15M)'.format(ret_size))
PrintToLog("End of check, test failed!")
sys.exit(99)
target_dir = os.path.normpath(os.path.join(args.archive_path, "rootfs"))
target_dir = os.path.normpath(os.path.join(args.archive_path, "userfs"))
ret_size = GetDirSize(target_dir)/1024/1024
PrintToLog('Size of userfs is ({:.2f}M)'.format(ret_size))
if ret_size > 15:
PrintToLog('ERROR: Size of userfs({:.2f}M) is over the upper limit(15M)'.format(ret_size))
PrintToLog("End of check, test failed!")
......
......@@ -173,6 +173,7 @@ if __name__ == "__main__":
target_dir = os.path.normpath(os.path.join(args.archive_path, "system"))
PrintToLog(target_dir)
ret_size = GetDirSize(target_dir)/1024/1024
PrintToLog('Size of system is :{:.2f}M'.format(ret_size))
if ret_size > 50:
PrintToLog('ERROR: Size of system({:.2f}M) is over the upper limit(50M)'.format(ret_size))
PrintToLog("End of check, test failed!")
......@@ -180,6 +181,7 @@ if __name__ == "__main__":
target_dir = os.path.normpath(os.path.join(args.archive_path, "data"))
ret_size = GetDirSize(target_dir)/1024/1024
PrintToLog('Size of data is :{:.2f}M'.format(ret_size))
if ret_size > 50:
PrintToLog('ERROR: Size of data({:.2f}M) is over the upper limit(50M)'.format(ret_size))
PrintToLog("End of check, test failed!")
......@@ -187,6 +189,7 @@ if __name__ == "__main__":
target_dir = os.path.normpath(os.path.join(args.archive_path, "updater"))
ret_size = GetDirSize(target_dir)/1024/1024
PrintToLog('Size of updater is :{:.2f}M'.format(ret_size))
if ret_size > 50:
PrintToLog('ERROR: Size of updater({:.2f}M) is over the upper limit(50M)'.format(ret_size))
PrintToLog("End of check, test failed!")
......@@ -194,6 +197,7 @@ if __name__ == "__main__":
target_dir = os.path.normpath(os.path.join(args.archive_path, "vendor"))
ret_size = GetDirSize(target_dir)/1024/1024
PrintToLog('Size of vendor is :{:.2f}M'.format(ret_size))
if ret_size > 50:
PrintToLog('ERROR: Size of vendor({:.2f}M) is over the upper limit(50M)'.format(ret_size))
PrintToLog("End of check, test failed!")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册