build: Fix test for the first time 'make clean' and error handling in build_examples
Now the tests do not pass Before we had incorrect code of the error code checking in build_examples.sh for that case and did nothing in test_build_system.sh.
This commit is contained in:
parent
4678d81c83
commit
f0b6256490
2 changed files with 10 additions and 3 deletions
|
@ -50,6 +50,7 @@ die() {
|
||||||
export BATCH_BUILD=1
|
export BATCH_BUILD=1
|
||||||
export V=0 # only build verbose if there's an error
|
export V=0 # only build verbose if there's an error
|
||||||
|
|
||||||
|
shopt -s lastpipe # Workaround for Bash to use variables in loops (http://mywiki.wooledge.org/BashFAQ/024)
|
||||||
RESULT=0
|
RESULT=0
|
||||||
FAILED_EXAMPLES=""
|
FAILED_EXAMPLES=""
|
||||||
|
|
||||||
|
@ -113,9 +114,12 @@ build_example () {
|
||||||
# build non-verbose first
|
# build non-verbose first
|
||||||
local BUILDLOG=$(mktemp -t examplebuild.XXXX.log)
|
local BUILDLOG=$(mktemp -t examplebuild.XXXX.log)
|
||||||
(
|
(
|
||||||
make clean defconfig
|
make clean defconfig &> >(tee -a "${BUILDLOG}") &&
|
||||||
make all 2>&1 | tee "${BUILDLOG}"
|
make all &> >(tee -a "${BUILDLOG}")
|
||||||
) || { RESULT=$?; FAILED_EXAMPLES+=" ${EXAMPLE_NAME}"; make V=1; } # verbose output for errors
|
) || {
|
||||||
|
RESULT=$?; FAILED_EXAMPLES+=" ${EXAMPLE_NAME}"
|
||||||
|
make V=1 clean defconfig && make V=1 # verbose output for errors
|
||||||
|
}
|
||||||
popd
|
popd
|
||||||
|
|
||||||
if grep ": warning:" "${BUILDLOG}" 2>&1 >> "${LOG_WARNINGS}"; then
|
if grep ": warning:" "${BUILDLOG}" 2>&1 >> "${LOG_WARNINGS}"; then
|
||||||
|
|
|
@ -48,6 +48,9 @@ function run_tests()
|
||||||
print_status "Updating template config..."
|
print_status "Updating template config..."
|
||||||
make defconfig || exit $?
|
make defconfig || exit $?
|
||||||
|
|
||||||
|
print_status "Try to clean fresh directory..."
|
||||||
|
make clean || exit $?
|
||||||
|
|
||||||
BOOTLOADER_BINS="bootloader/bootloader.elf bootloader/bootloader.bin"
|
BOOTLOADER_BINS="bootloader/bootloader.elf bootloader/bootloader.bin"
|
||||||
APP_BINS="app-template.elf app-template.bin"
|
APP_BINS="app-template.elf app-template.bin"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue