Merge branch 'bugfix/build_example_make' into 'master'
Better detection failures in built_examples See merge request idf/esp-idf!3604
This commit is contained in:
commit
74d8806af0
|
@ -218,6 +218,8 @@ build_esp_idf_tests:
|
||||||
|
|
||||||
.build_examples_make_template: &build_examples_make_template
|
.build_examples_make_template: &build_examples_make_template
|
||||||
<<: *build_template
|
<<: *build_template
|
||||||
|
# This is a workaround for a rarely encountered issue with building examples in CI.
|
||||||
|
# Probably related to building of Kconfig in 'make clean' stage
|
||||||
retry: 1
|
retry: 1
|
||||||
artifacts:
|
artifacts:
|
||||||
when: always
|
when: always
|
||||||
|
@ -251,7 +253,6 @@ build_esp_idf_tests:
|
||||||
# same as above, but for CMake
|
# same as above, but for CMake
|
||||||
.build_examples_cmake_template: &build_examples_cmake_template
|
.build_examples_cmake_template: &build_examples_cmake_template
|
||||||
<<: *build_template
|
<<: *build_template
|
||||||
retry: 1
|
|
||||||
artifacts:
|
artifacts:
|
||||||
when: always
|
when: always
|
||||||
paths:
|
paths:
|
||||||
|
|
|
@ -75,7 +75,8 @@ else
|
||||||
[ -z ${JOB_PATTERN} ] && die "JOB_PATTERN is bad"
|
[ -z ${JOB_PATTERN} ] && die "JOB_PATTERN is bad"
|
||||||
|
|
||||||
# parse number 'NUM' at the end of string 'some_your_text_NUM'
|
# parse number 'NUM' at the end of string 'some_your_text_NUM'
|
||||||
JOB_NUM=$( echo ${JOB_NAME} | sed -n -r 's/^.*_([0-9]+)$/\1/p' )
|
# NOTE: Getting rid of the leading zero to get the decimal
|
||||||
|
JOB_NUM=$( echo ${JOB_NAME} | sed -n -r 's/^.*_0*([0-9]+)$/\1/p' )
|
||||||
[ -z ${JOB_NUM} ] && die "JOB_NUM is bad"
|
[ -z ${JOB_NUM} ] && die "JOB_NUM is bad"
|
||||||
|
|
||||||
# count number of the jobs
|
# count number of the jobs
|
||||||
|
@ -120,14 +121,19 @@ build_example () {
|
||||||
local BUILDLOG=${LOG_PATH}/ex_${ID}_log.txt
|
local BUILDLOG=${LOG_PATH}/ex_${ID}_log.txt
|
||||||
touch ${BUILDLOG}
|
touch ${BUILDLOG}
|
||||||
|
|
||||||
|
local FLASH_ARGS=build/download.config
|
||||||
|
|
||||||
make clean >>${BUILDLOG} 2>&1 &&
|
make clean >>${BUILDLOG} 2>&1 &&
|
||||||
make defconfig >>${BUILDLOG} 2>&1 &&
|
make defconfig >>${BUILDLOG} 2>&1 &&
|
||||||
make all >>${BUILDLOG} 2>&1 &&
|
make all >>${BUILDLOG} 2>&1 &&
|
||||||
( make print_flash_cmd | tail -n 1 >build/download.config ) >>${BUILDLOG} 2>&1 ||
|
make print_flash_cmd >${FLASH_ARGS}.full 2>>${BUILDLOG} ||
|
||||||
{
|
{
|
||||||
RESULT=$?; FAILED_EXAMPLES+=" ${EXAMPLE_NAME}" ;
|
RESULT=$?; FAILED_EXAMPLES+=" ${EXAMPLE_NAME}" ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tail -n 1 ${FLASH_ARGS}.full > ${FLASH_ARGS} || :
|
||||||
|
test -s ${FLASH_ARGS} || die "Error: ${FLASH_ARGS} file is empty"
|
||||||
|
|
||||||
cat ${BUILDLOG}
|
cat ${BUILDLOG}
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
|
|
@ -80,7 +80,8 @@ else
|
||||||
[ -z ${JOB_PATTERN} ] && die "JOB_PATTERN is bad"
|
[ -z ${JOB_PATTERN} ] && die "JOB_PATTERN is bad"
|
||||||
|
|
||||||
# parse number 'NUM' at the end of string 'some_your_text_NUM'
|
# parse number 'NUM' at the end of string 'some_your_text_NUM'
|
||||||
JOB_NUM=$( echo ${JOB_NAME} | sed -n -r 's/^.*_([0-9]+)$/\1/p' )
|
# NOTE: Getting rid of the leading zero to get the decimal
|
||||||
|
JOB_NUM=$( echo ${JOB_NAME} | sed -n -r 's/^.*_0*([0-9]+)$/\1/p' )
|
||||||
[ -z ${JOB_NUM} ] && die "JOB_NUM is bad"
|
[ -z ${JOB_NUM} ] && die "JOB_NUM is bad"
|
||||||
|
|
||||||
# count number of the jobs
|
# count number of the jobs
|
||||||
|
|
Loading…
Reference in a new issue