tflite: pkg_size: Ignore static libs and source files https://crrev.com/c/5981742 will add a few `.a` files into tensorflow package, but those files will not be installed onto DUT. BUG=b:364243814 TEST=./script/pkg_size.py --board=rauru tensorflow Change-Id: I56c0345695f55db0075c7ccf0e74af249f959c83 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/tflite/+/5998411 Commit-Queue: Tommy Chiang <ototot@google.com> Auto-Submit: Shik Chen <shik@chromium.org> Tested-by: Shik Chen <shik@chromium.org> Reviewed-by: Tommy Chiang <ototot@google.com>
diff --git a/script/pkg_size.py b/script/pkg_size.py index 1f0bc82..d997312 100755 --- a/script/pkg_size.py +++ b/script/pkg_size.py
@@ -88,7 +88,7 @@ # TODO(shik): Ignore files listed in install_mask.py instead of # hard-coding common masks here. Reference: # https://www.chromium.org/chromium-os/developer-library/guides/portage/ebuild-faq/#how-do-i-find-out-the-on-disk-package-size - if re.match(r"/usr/(include|lib/debug)/", file): + if re.search(r"^/usr/(include|lib/debug)/|\.(a|c|cc|h|hpp)$", file): continue path = sysroot / file.lstrip("/")