Skip to content

Commit c1f4a7a

Browse files
committed
selftests/nolibc: always keep test kernel configuration up to date
Avoid using a stale test kernel configuration by always synchronizing it to the current source tree. kbuild is smart enough to avoid spurious rebuilds. Shuffle the code around a bit to keep all the commands with side-effects together. Acked-by: Willy Tarreau <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Thomas Weißschuh <[email protected]>
1 parent d7d271e commit c1f4a7a

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

tools/testing/selftests/nolibc/run-tests.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,10 +157,6 @@ test_arch() {
157157
fi
158158
MAKE=(make -j"${nproc}" XARCH="${arch}" CROSS_COMPILE="${cross_compile}" LLVM="${llvm}" O="${build_dir}")
159159

160-
mkdir -p "$build_dir"
161-
if [ "$test_mode" = "system" ] && [ ! -f "${build_dir}/.config" ]; then
162-
swallow_output "${MAKE[@]}" defconfig
163-
fi
164160
case "$test_mode" in
165161
'system')
166162
test_target=run
@@ -173,6 +169,9 @@ test_arch() {
173169
exit 1
174170
esac
175171
printf '%-15s' "$arch:"
172+
173+
mkdir -p "$build_dir"
174+
swallow_output "${MAKE[@]}" defconfig
176175
swallow_output "${MAKE[@]}" CFLAGS_EXTRA="$CFLAGS_EXTRA" "$test_target" V=1
177176
cp run.out run.out."${arch}"
178177
"${MAKE[@]}" report | grep passed

0 commit comments

Comments
 (0)