test_image_content.sh: exclude component libraries.

lddtree doesn't know that Chrome can find its components in
/opt/google/chrome/lib/. Hence exclude the files in this directory
from the dependency check.

BUG=chromium:595763, chromium:601854
TEST=./build_image --board=daisy_skate --noenable_rootfs_verification test

Change-Id: Idfa4163dd79263cc12c4872925fef9a0260911da
Reviewed-on: https://chromium-review.googlesource.com/340921
Reviewed-by: Ilja Friedel <ihf@chromium.org>
Tested-by: Ilja Friedel <ihf@chromium.org>
diff --git a/build_library/test_image_content.sh b/build_library/test_image_content.sh
index bd03c63..7af0048 100644
--- a/build_library/test_image_content.sh
+++ b/build_library/test_image_content.sh
@@ -62,7 +62,10 @@
 
   # Check that all .so files, plus the binaries, have the appropriate
   # dependencies.  Need to use sudo as some files are set*id.
-  libs=( $(sudo find "${root}" -type f -name '*.so*') )
+  # Exclude Chrome components, which are the only files in the lib directory.
+  local components="${root}/opt/google/chrome/lib/*"
+  libs=( $(sudo \
+      find "${root}" -type f -name '*.so*' -not -path "${components}") )
   if ! test_elf_deps "${root}" "${binaries[@]}" "${libs[@]}"; then
     returncode=1
   fi