.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)"
|
[ $# -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
|
||||||
|
|
||||||
|
# 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 \
|
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