Merge pull request #15419 from leandrolanzieri/pr/ci/compile_kconfig_first
.murdock: run Kconfig compilation first when needed
This commit is contained in:
commit
a11514a198
59
.murdock
59
.murdock
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
: ${TEST_BOARDS_AVAILABLE:="esp32-wroom-32 samr21-xpro"}
|
: ${TEST_BOARDS_AVAILABLE:="esp32-wroom-32 samr21-xpro"}
|
||||||
: ${TEST_BOARDS_LLVM_COMPILE:="iotlab-m3 native nrf52dk mulle nucleo-f401re samr21-xpro slstk3402a"}
|
: ${TEST_BOARDS_LLVM_COMPILE:="iotlab-m3 native nrf52dk mulle nucleo-f401re samr21-xpro slstk3402a"}
|
||||||
# we can't use '-' in the variable names, convert them to '_' to add new boards
|
|
||||||
: ${TEST_KCONFIG_samr21_xpro:="examples/hello-world tests/periph_*"}
|
: ${TEST_KCONFIG_samr21_xpro:="examples/hello-world tests/periph_*"}
|
||||||
|
|
||||||
export RIOT_CI_BUILD=1
|
export RIOT_CI_BUILD=1
|
||||||
@ -37,7 +36,7 @@ DWQ_ENV="-E BOARDS -E APPS -E NIGHTLY -E RUN_TESTS -E ENABLE_TEST_CACHE
|
|||||||
|
|
||||||
get_kconfig_test_apps() {
|
get_kconfig_test_apps() {
|
||||||
case "$1" in
|
case "$1" in
|
||||||
"samr21_xpro") echo "${TEST_KCONFIG_samr21_xpro}" ;;
|
"samr21-xpro") echo "${TEST_KCONFIG_samr21_xpro}" ;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -240,37 +239,43 @@ compile() {
|
|||||||
[ $# -ne 2 ] && error "$0: compile: invalid parameters (expected \$appdir \$board:\$toolchain)"
|
[ $# -ne 2 ] && error "$0: compile: invalid parameters (expected \$appdir \$board:\$toolchain)"
|
||||||
[ ! -d "$appdir" ] && error "$0: compile: error: application directory \"$appdir\" doesn't exist"
|
[ ! -d "$appdir" ] && error "$0: compile: error: application directory \"$appdir\" doesn't exist"
|
||||||
|
|
||||||
# compile
|
# We compile a first time with Kconfig based dependency
|
||||||
|
# resolution for regression purposes. $TEST_KCONFIG contains a
|
||||||
|
# list of board-application tuples that are currently modeled to
|
||||||
|
# run with Kconfig
|
||||||
|
|
||||||
|
should_check_kconfig_hash=0
|
||||||
|
|
||||||
|
for app in $(get_kconfig_test_apps "${board}")
|
||||||
|
do
|
||||||
|
if [ "${appdir}" = "${app}" ]; then
|
||||||
|
should_check_kconfig_hash=1
|
||||||
|
BOARD=${board} make -C${appdir} clean
|
||||||
|
CCACHE_BASEDIR="$(pwd)" BOARD=${board} TOOLCHAIN=${toolchain} RIOT_CI_BUILD=1 TEST_KCONFIG=1 \
|
||||||
|
make -C${appdir} all test-input-hash -j${JOBS:-4}
|
||||||
|
RES=$?
|
||||||
|
if [ $RES -eq 0 ]; then
|
||||||
|
kconfig_test_hash=$(test_hash_calc "${BINDIR}")
|
||||||
|
else
|
||||||
|
kconfig_test_hash=0
|
||||||
|
echo "An error occurred while compiling using Kconfig";
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# compile without Kconfig
|
||||||
CCACHE_BASEDIR="$(pwd)" BOARD=$board TOOLCHAIN=$toolchain RIOT_CI_BUILD=1 \
|
CCACHE_BASEDIR="$(pwd)" BOARD=$board TOOLCHAIN=$toolchain RIOT_CI_BUILD=1 \
|
||||||
make -C${appdir} clean all test-input-hash -j${JOBS:-4}
|
make -C${appdir} clean all test-input-hash -j${JOBS:-4}
|
||||||
RES=$?
|
RES=$?
|
||||||
|
|
||||||
test_hash=$(test_hash_calc "$BINDIR")
|
test_hash=$(test_hash_calc "$BINDIR")
|
||||||
|
|
||||||
# We compile a second time with Kconfig based dependency
|
if [ ${should_check_kconfig_hash} != 0 ]; then
|
||||||
# resolution for regression purposes. $TEST_KCONFIG contains a
|
if [ ${kconfig_test_hash} != ${test_hash} ]; then
|
||||||
# list of board-application tuples that are currently modeled to
|
echo "Hashes of binaries with and without Kconfig mismatch for ${app}";
|
||||||
# run with Kconfig
|
echo "Please check that all used modules are modelled in Kconfig and enabled";
|
||||||
if [ $RES -eq 0 ]; then
|
RES=1
|
||||||
# we can't use '-' in variable names
|
fi
|
||||||
_board=$(echo ${board} | tr '-' '_')
|
|
||||||
|
|
||||||
for app in $(get_kconfig_test_apps "${_board}")
|
|
||||||
do
|
|
||||||
if [ "${appdir}" = "${app}" ]; then
|
|
||||||
BOARD=$board make -C${appdir} clean
|
|
||||||
CCACHE_BASEDIR="$(pwd)" BOARD=$board TOOLCHAIN=$toolchain RIOT_CI_BUILD=1 TEST_KCONFIG=1 \
|
|
||||||
make -C${appdir} all test-input-hash -j${JOBS:-4}
|
|
||||||
RES=$?
|
|
||||||
if [ $RES -eq 0 ]; then
|
|
||||||
new_test_hash=$(test_hash_calc "$BINDIR")
|
|
||||||
if [ ${new_test_hash} != ${test_hash} ]; then
|
|
||||||
echo "Hashes of binaries mismatch for ${app}";
|
|
||||||
RES=1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# run tests
|
# run tests
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user