mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
.murdock: run Kconfig compilation first when needed
This allows to run the tests with the normal binary and avoids having to test the TEST_KCONFIG flag during the test stage.
This commit is contained in:
parent
1f7fdbc97a
commit
1ff2a8c2a7
59
.murdock
59
.murdock
@ -240,37 +240,46 @@ compile() {
|
||||
[ $# -ne 2 ] && error "$0: compile: invalid parameters (expected \$appdir \$board:\$toolchain)"
|
||||
[ ! -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
|
||||
|
||||
# we can't use '-' in variable names
|
||||
_board=$(echo ${board} | tr '-' '_')
|
||||
|
||||
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 \
|
||||
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
|
||||
if [ ${should_check_kconfig_hash} != 0 ]; then
|
||||
if [ ${kconfig_test_hash} != ${test_hash} ]; then
|
||||
echo "Hashes of binaries with and without Kconfig mismatch for ${app}";
|
||||
echo "Please check that all used modules are modelled in Kconfig and enabled";
|
||||
RES=1
|
||||
fi
|
||||
fi
|
||||
|
||||
# run tests
|
||||
|
Loading…
Reference in New Issue
Block a user