murdock: add test for Kconfig dependency modelling
This adds a list of board/application pairs which should be tested. The test consists on comparing the binaries generated using dependency resolution in Makefile and in Kconfig.
This commit is contained in:
parent
7dc6639f59
commit
8f1fd3a5a3
37
.murdock
37
.murdock
@ -2,6 +2,8 @@
|
||||
|
||||
: ${TEST_BOARDS_AVAILABLE:="esp32-wroom-32 samr21-xpro"}
|
||||
: ${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"}
|
||||
|
||||
export RIOT_CI_BUILD=1
|
||||
export STATIC_TESTS=${STATIC_TESTS:-1}
|
||||
@ -32,6 +34,12 @@ RUN_TESTS=${RUN_TESTS:-${NIGHTLY}}
|
||||
DWQ_ENV="-E BOARDS -E APPS -E NIGHTLY -E RUN_TESTS -E ENABLE_TEST_CACHE
|
||||
-E TEST_HASH -E CI_PULL_LABELS"
|
||||
|
||||
get_kconfig_test_apps() {
|
||||
case "$1" in
|
||||
"samr21_xpro") echo "${TEST_KCONFIG_samr21_xpro}" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
check_label() {
|
||||
local label="${1}"
|
||||
[ -z "${CI_PULL_LABELS}" ] && return 1
|
||||
@ -236,6 +244,34 @@ compile() {
|
||||
make -C${appdir} clean all test-input-hash -j${JOBS:-4}
|
||||
RES=$?
|
||||
|
||||
test_hash=$(test_hash_calc "$BINDIR")
|
||||
|
||||
# We compile a second 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
|
||||
if [ $RES -eq 0 ]; then
|
||||
# we can't use '-' in variable names
|
||||
_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
|
||||
|
||||
# run tests
|
||||
if [ $RES -eq 0 ]; then
|
||||
if [ $RUN_TESTS -eq 1 -o "$board" = "native" ]; then
|
||||
@ -244,7 +280,6 @@ compile() {
|
||||
BOARD=$board make -C${appdir} test
|
||||
RES=$?
|
||||
elif is_in_list "$board" "$TEST_BOARDS_AVAILABLE"; then
|
||||
test_hash=$(test_hash_calc "$BINDIR")
|
||||
echo "-- test_hash=$test_hash"
|
||||
if test_cache_get $test_hash; then
|
||||
echo "-- skipping test due to positive cache hit"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user