Clean the iso images in `ktest` to save disk space

This commit is contained in:
Zhang Junyang 2025-12-10 11:10:55 +08:00 committed by Tate, Hongliang Tian
parent d92f388ae1
commit c292ccdcca
1 changed files with 5 additions and 1 deletions

View File

@ -344,13 +344,17 @@ test:
.PHONY: ktest
ktest: initramfs $(CARGO_OSDK)
@# Exclude linux-bzimage-setup from ktest since it's hard to be unit tested
@# Notes:
@# 1. linux-bzimage-setup is excluded from ktest since it's hard to be unit tested;
@# 2. Artifacts are removed after testing each crate to save the limited disk space
@# available to free-tier Github runners.
@for dir in $(OSDK_CRATES); do \
[ $$dir = "ostd/libs/linux-bzimage/setup" ] && continue; \
echo "[make] Testing $$dir"; \
(cd $$dir && cargo osdk test $(CARGO_OSDK_TEST_ARGS)) || exit 1; \
tail --lines 10 qemu.log | grep -q "^\\[ktest runner\\] All crates tested." \
|| (echo "Test failed" && exit 1); \
rm -r target/osdk/*; \
done
.PHONY: docs