]> granicus.if.org Git - esp-idf/commitdiff
build system tests: Verify bootloader doesn't build any files outside build/bootloade...
authorAngus Gratton <angus@espressif.com>
Thu, 13 Oct 2016 00:01:30 +0000 (11:01 +1100)
committerAngus Gratton <angus@espressif.com>
Thu, 13 Oct 2016 00:01:30 +0000 (11:01 +1100)
See TW7505. Looks like bug was fixed via prior refactors, but adding the
test ensures it will stay fixed.

make/test_build_system.sh

index 5be1504e3de3aa353fd7c2d0c07b22e59ad51773..86be1f82ec2262fa868054d824852aefec3e244a 100755 (executable)
@@ -80,6 +80,13 @@ function run_tests()
                 failure "Files weren't cleaned: ${ALL_BUILD_FILES}"
        fi
 
+    print_status "Bootloader build shouldn't leave build output anywhere else"
+    rm -rf --preserve-root ${BUILD}
+    make bootloader
+    # find wizardry: find any file not named sdkconfig.h that
+    # isn't in the "bootloader" or "config" directories
+    find ${BUILD} -type d \( -name bootloader -o -name config \) -prune , -type f ! -name sdkconfig.h || failure "Bootloader built files outside the bootloader or config directories"
+
        print_status "Can still clean build if all text files are CRLFs"
        make clean
        find . -exec unix2dos {} \; # CRLFify template dir