]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
kunit: respect KBUILD_OUTPUT env variable by default
authorRyota Sakamoto <sakamo.ryota@gmail.com>
Mon, 5 Jan 2026 16:41:01 +0000 (01:41 +0900)
committerShuah Khan <skhan@linuxfoundation.org>
Mon, 5 Jan 2026 22:35:22 +0000 (15:35 -0700)
commit5c7a4741431b0a938dcbd22b90a4dc9a2903fc00
treee51b3b47a7a2ec45d82811654e49bf658ec6d79f
parenta7a81655dc90688f9ddff1c0b185d7a6fa8bfc7d
kunit: respect KBUILD_OUTPUT env variable by default

Currently, kunit.py ignores the KBUILD_OUTPUT env variable and always
defaults to .kunit in the working directory. This behavior is inconsistent
with standard Kbuild behavior, where KBUILD_OUTPUT defines the build
artifact location.

This patch modifies kunit.py to respect KBUILD_OUTPUT if set.  A .kunit
subdirectory is created inside KBUILD_OUTPUT to avoid polluting the build
directory.

Link: https://lore.kernel.org/r/20260106-kunit-kbuild_output-v2-1-582281797343@gmail.com
Reviewed-by: David Gow <davidgow@google.com>
Signed-off-by: Ryota Sakamoto <sakamo.ryota@gmail.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/kunit/kunit.py
tools/testing/kunit/kunit_tool_test.py