Lines Matching +full:- +full:f
7 # Assumes PWD is an out-of-tree build directory, and will create a
11 # IDF_PATH - must be set
12 # ESP_IDF_TEMPLATE_GIT - Can override git clone source for template app. Otherwise github.
13 # NOCLEANUP - Set to '1' if you want the script to leave its temporary directory when done, for pos…
25 # (although very invasive ones like appending CRLFs to all files take a copy of the esp-idf tree), …
26 # function can be used to force-delete all files from the build output directory.
31 [ -z ${ESP_IDF_TEMPLATE_GIT} ] && ESP_IDF_TEMPLATE_GIT=https://github.com/espressif/esp-idf-templat…
41 [ -z ${IDF_PATH} ] && echo "IDF_PATH is not set. Need path to esp-idf installation." && exit 2
46 if [ -z $CHECKOUT_REF_SCRIPT ]; then
47 git checkout ${CI_BUILD_REF_NAME} || echo "Using esp-idf-template default branch..."
49 $CHECKOUT_REF_SCRIPT esp-idf-template .
59 APP_BINS="app-template.elf app-template.bin"
67 [ -f ${BUILD}/partition*.bin ] || failure "A partition table should have been built"
89 assert_not_rebuilt app-template.bin app-template.elf ${BOOTLOADER_BINS}
94 ALL_BUILD_FILES=$(find ${BUILD} -type f | sed "s@${BUILD}/@@")
100 ALL_BUILD_FILES=$(find ${BUILD} -type f)
101 if [ -n "${ALL_BUILD_FILES}" ]; then
110 …find ${BUILD} -type d \( -name bootloader -o -name config \) -prune , -type f ! -name sdkconfig.h …
116 NEW_BUILD_FILES=$(find ${OUTOFREE_BUILD} -type f)
117 if [ -z "${NEW_BUILD_FILES}" ]; then
120 DEFAULT_BUILD_FILES=$(find ${BUILD} -mindepth 1)
121 if [ -n "${DEFAULT_BUILD_FILES}" ]; then
128 NEW_BUILD_FILES=$(find ${BUILD}/subdirectory -type f)
129 if [ -z "${NEW_BUILD_FILES}" ]; then
135 (make -j5 2>&1 | tee ${TESTDIR}/parallel_build.log) || failure "Failed to build in parallel"
136 if grep -q "warning: jobserver unavailable" ${TESTDIR}/parallel_build.log; then
142 find . -path .git -prune -exec unix2dos {} \; # CRLFify template dir
143 # make a copy of esp-idf and CRLFify it
144 CRLF_ESPIDF=${TESTDIR}/esp-idf-crlf
145 mkdir -p ${CRLF_ESPIDF}
146 cp -r ${IDF_PATH}/* ${CRLF_ESPIDF}
148 … find ${CRLF_ESPIDF} -name .git -prune -name build -prune -type f ! -perm 755 -exec unix2dos {} \;
152 … [ -f ${BUILD}/partition*.bin ] || failure "A partition table should have been built in CRLF mode"
154 print_status "Touching rom ld file should re-link app and bootloader"
161 print_status "Touching app-only template ld file should only re-link app"
168 …print_status "Touching a linker fragment file should trigger re-link of app" # only app linker scr…
200 test $(make print_flash_cmd V=0 | wc -l | tr -d ' ') -eq 1
207 echo "COMPONENT_ADD_LDFLAGS := -l\$(COMPONENT_NAME) -u required_global" >> main/component.mk
213 mkdir -p extra_source_dir
219 echo "COMPONENT_ADD_LDFLAGS := -l\$(COMPONENT_NAME) -u required_global" >> main/component.mk
222 rm -rf extra_source_dir
228 echo "project-version-w.z" > ${TESTDIR}/template/version.txt
230 [ -f ${IDF_PATH}/.gitmodules ] && mv ${IDF_PATH}/.gitmodules ${IDF_PATH}/.gitmodules_backup
232 echo -e '#!/bin/bash\ntouch ${IDF_PATH}/git_invoked' > git
237 …[ -f ${IDF_PATH}/git_invoked ] && rm ${IDF_PATH}/git_invoked && failure "git should not have been …
238 rm -f ${IDF_PATH}/version.txt git
239 rm -f ${TESTDIR}/template/version.txt
240 … [ -f ${IDF_PATH}/.gitmodules_backup ] && mv ${IDF_PATH}/.gitmodules_backup ${IDF_PATH}/.gitmodules
246 echo "project-version-1.0" > ${TESTDIR}/template/version.txt
251 echo "project-version-2.0(012345678901234567890123456789)" > ${TESTDIR}/template/version.txt
256 print_status "Re-building does not change app.bin"
260 rm -f ${TESTDIR}/template/version.txt
264 version="App \"app-template\" version: "
265 version+=$(git describe --always --tags --dirty)
270 rm -f sdkconfig.defaults
271 rm -f sdkconfig
277 version="App \"app-template\" version: "
280 rm -f sdkconfig.defaults
281 rm -f sdkconfig
282 rm -f ${TESTDIR}/template/version.txt
285 sed -i.bak "s/CONFIG_ESPTOOLPY_FLASHSIZE.\+//" sdkconfig # remove all flashsize config
307 bin_header_match build/bootloader/bootloader.bin "021f"
312 rm -f sdkconfig.defaults;
313 rm -f sdkconfig;
326 rm -f sdkconfig.defaults
327 rm -f sdkconfig
337 rm -f -r build sdkconfig
341 make uf2-app
342 assert_built "uf2-app.bin"
343 rm -f -r build sdkconfig
346 mkdir -p components/esp32
348 rm -rf components
351 mkdir -p main/test
355 rm -rf main/test
358 mkdir -p mycomponents/mycomponent
361 mkdir -p mycomponents/esp32
364 rm -rf mycomponents/esp32
366 mkdir -p esp32
369 rm -rf esp32
370 rm -rf mycomponents
374 rm -f sdkconfig.defaults;
375 rm -f sdkconfig;
380 echo -e "\n\
395 rm -f sdkconfig sdkconfig.defaults
397 git checkout -- sdkconfig.rename Kconfig
402 rm -f sdkconfig;
405 echo -e "\n\
417 rm -f sdkconfig.defaults;
419 git checkout -- sdkconfig.rename Kconfig
424 mkdir -p extra_dir/my_component
427 …sed -i "s%PROJECT_NAME := app-template%PROJECT_NAME := app-template\nEXTRA_COMPONENT_DIRS := extra…
428 …(make list-components | grep "$PWD/extra_dir/my_component") || failure "Unable to find component …
429 mkdir -p components/my_component
431 …(make list-components | grep "$PWD/components/my_component") || failure "Project components shoul…
433 rm -rf extra_dir components
437 mkdir -p components/test_component
446 echo "" | \$(CC) -x c++ -c -o dummy_obj.o -
450 rm -f libtest_component.a dummy_obj.o
453 …[ -f ${BUILD}/test_component/dummy_obj.o ] || failure "Failed to build dummy_obj.o in custom targe…
454 …[ -f ${BUILD}/test_component/libtest_component.a ] || failure "Failed to build custom component li…
455 grep -q "libtest_component.a" ${BUILD}/*.map || failure "Linker didn't see the custom library"
457 …[ -f ${BUILD}/test_component/dummy_obj.o ] && failure "Custom clean target didn't clean object fil…
458 …[ -f ${BUILD}/test_component/libtest_component.a ] && failure "Custom clean target didn't clean li…
459 rm -rf components/test_component
462 if [ -n "${FAILURES}" ]; then
464 echo -e "${FAILURES}"
486 mkdir -p ${TESTDIR}
488 # for post-mortem debugging
489 [ -z ${NOCLEANUP} ] && trap "rm -rf ${TESTDIR}" EXIT KILL
497 rm -rf ${SNAPSHOT}
498 cp -ap ${TESTDIR}/template/build ${SNAPSHOT}
504 until [ -z "$1" ]; do
505 if [ ! -f "${BUILD}/$1" ]; then
515 # can't use [ a -ot b ] here as -ot only gives second resolution
516 # but stat -c %y seems to be microsecond at least for tmpfs, ext4..
517 if [ "$(stat -c %y ${SNAPSHOT}/$1)" != "$(stat -c %y ${BUILD}/$1)" ]; then
527 until [ -z "$1" ]; do
529 if [ ! -f "${SNAPSHOT}/$1" ]; then
543 until [ -z "$1" ]; do
545 if [ ! -f "${SNAPSHOT}/$1" ]; then
558 rm -rf --preserve-root ${BUILD}/*
561 # check the bytes 3-4 of the binary image header. e.g.:
567 actual=$(xxd -s 2 -l 2 -ps $1)