From c969c9265233bd2e951b94f6d920ee83dc662495 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Mon, 8 Nov 2021 15:24:07 +0100 Subject: [PATCH] build_library: Add another build root check The `/build` directory should never exist in the image. If it happens, it means that there was some leak from SDK into the image. --- build_library/test_image_content.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/build_library/test_image_content.sh b/build_library/test_image_content.sh index bf8bcddd09..a2efef7bc3 100644 --- a/build_library/test_image_content.sh +++ b/build_library/test_image_content.sh @@ -79,5 +79,14 @@ test_image_content() { returncode=1 fi + # TODO: merge this check with the blacklisted directories above, + # when it stops being a warning-only check. + if [ -d "${root}/build" ]; then + error "test_image_content: ${root}/build directory found" + info "contents of ${root}/build" + ls -lAR "${root}/build" + returncode=1 + fi + return $returncode }