Only pack benchmark utils while running benchmarks

This commit is contained in:
Fabing Li 2025-04-20 02:44:28 +00:00 committed by Tate, Hongliang Tian
parent 8815ca384f
commit e9c85ff158
2 changed files with 8 additions and 3 deletions

View File

@ -33,9 +33,14 @@ INITRAMFS_ALL_DIRS := \
$(INITRAMFS)/sbin \
$(INITRAMFS)/usr/bin \
$(INITRAMFS)/usr/local \
$(INITRAMFS)/test \
$(INITRAMFS)/benchmark \
$(INITRAMFS_EMPTY_DIRS)
# Include test as target if BENCHMARK is not set.
ifeq ($(BENCHMARK), none)
INITRAMFS_ALL_DIRS += $(INITRAMFS)/test
endif
SYSCALL_TEST_DIR := $(INITRAMFS)/opt/syscall_test
.PHONY: all

View File

@ -43,5 +43,5 @@ prepare_libs() {
prepare_fs() {
# Disable unsupported ext2 features of Asterinas on Linux to ensure fairness
mke2fs -F -O ^ext_attr -O ^resize_inode -O ^dir_index ${BENCHMARK_ROOT}/../build/ext2.img
make initramfs
make initramfs BENCHMARK=${benchmark}
}