mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-01-20 05:13:55 +00:00
selftests: Add version file to kselftest installation dir
As titled, adding version file to kselftest installation dir, so the user of the tarball can know which kernel version the tarball belongs to. Link: https://lore.kernel.org/r/20250610221248.819519-1-1997cui@gmail.com Signed-off-by: Tianyi Cui <1997cui@gmail.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
This commit is contained in:
parent
44c71c16f3
commit
cd9f02adca
@ -293,6 +293,13 @@ ifdef INSTALL_PATH
|
||||
$(MAKE) -s --no-print-directory OUTPUT=$$BUILD_TARGET COLLECTION=$$TARGET \
|
||||
-C $$TARGET emit_tests >> $(TEST_LIST); \
|
||||
done;
|
||||
@VERSION=$$(git describe HEAD 2>/dev/null); \
|
||||
if [ -n "$$VERSION" ]; then \
|
||||
echo "$$VERSION" > $(INSTALL_PATH)/VERSION; \
|
||||
printf "Version saved to $(INSTALL_PATH)/VERSION\n"; \
|
||||
else \
|
||||
printf "Unable to get version from git describe\n"; \
|
||||
fi
|
||||
else
|
||||
$(error Error: set INSTALL_PATH to use install)
|
||||
endif
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user