From e9c85ff1583433bbc4dadbccb7e2d2c6e2f96ccc Mon Sep 17 00:00:00 2001 From: Fabing Li Date: Sun, 20 Apr 2025 02:44:28 +0000 Subject: [PATCH] Only pack benchmark utils while running benchmarks --- test/Makefile | 9 +++++++-- test/benchmark/common/prepare_host.sh | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/test/Makefile b/test/Makefile index 70c2714b..2cfbf77c 100644 --- a/test/Makefile +++ b/test/Makefile @@ -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 @@ -196,4 +201,4 @@ check: .PHONY: clean clean: - @rm -rf $(BUILD_DIR) \ No newline at end of file + @rm -rf $(BUILD_DIR) diff --git a/test/benchmark/common/prepare_host.sh b/test/benchmark/common/prepare_host.sh index 2ba1d944..5cdd3551 100644 --- a/test/benchmark/common/prepare_host.sh +++ b/test/benchmark/common/prepare_host.sh @@ -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} } \ No newline at end of file