test: on-hardware SMP self-test (revoke/kill must stop every hart) + make test-qemu
This commit is contained in:
10
Makefile
10
Makefile
@@ -1,4 +1,4 @@
|
||||
.PHONY: check fmt clippy test kani build all image run ci kernel-fmt kernel-clippy kernel-test
|
||||
.PHONY: check fmt clippy test kani build all image run ci kernel-fmt kernel-clippy kernel-test test-qemu
|
||||
|
||||
RISCV_TARGET = riscv64gc-unknown-none-elf
|
||||
KERNEL_BIN = target/$(RISCV_TARGET)/release/adapter-riscv
|
||||
@@ -52,11 +52,17 @@ build:
|
||||
cargo build --target $(RISCV_TARGET) --release \
|
||||
-p adapter-riscv -p init -p echo -p snake \
|
||||
-p display-qemu -p input-qemu -p storage-qemu \
|
||||
-p log-server -p permission-manager -p session-server
|
||||
-p log-server -p permission-manager -p session-server -p smptest
|
||||
|
||||
image: build
|
||||
scripts/make-disk-image.sh
|
||||
|
||||
# Boots a test image (normal image + smptest.elf) on $(SMP) harts; init runs
|
||||
# the SMP self-test and halts. Passes only on "SMPTEST PASS".
|
||||
test-qemu: build
|
||||
IMG=test.img SMPTEST=1 scripts/make-disk-image.sh > /dev/null
|
||||
SMP=$(SMP) scripts/test-qemu.sh test.img
|
||||
|
||||
run: build
|
||||
qemu-system-riscv64 -machine virt -smp $(SMP) -nographic -bios default \
|
||||
-kernel $(KERNEL_BIN)
|
||||
|
||||
Reference in New Issue
Block a user