Commit 52deef8e authored by Shetty Yttehs's avatar Shetty Yttehs :yum:
Browse files

feat: add test img

No related merge requests found
Showing with 17 additions and 2 deletions
+17 -2
.PHONY : all build clean setup
.PHONY : all build test clean setup
all:
@cd user && make -s all
......@@ -8,6 +8,10 @@ build:
@cd user && make -s all
@cd kernel && make -s build
test:
@cd user && make -s build
@cd kernel && make -s test
clean:
@cd user && make -s clean
@cd kernel && make -s clean
......
.PHONY : all build run debug connect fmt clean
.PHONY : all build run test debug connect fmt clean
ARCH := riscv64gc-unknown-none-elf
BUILD_TYPE := release
......@@ -6,6 +6,7 @@ BIOS := rustsbi.bin
KERNEL := kernel
TARGET := target/$(ARCH)/$(BUILD_TYPE)/$(KERNEL)
FS_IMG := ../user/target/${ARCH}/${BUILD_TYPE}/sdcard.img
TEST_IMG := ../test/test.img
CARGO := cargo
CARGO_FLAGS := --$(BUILD_TYPE)
......@@ -18,6 +19,13 @@ QEMU_FLAGS := -machine virt \
-device virtio-blk-device,drive=x0,bus=virtio-mmio-bus.0 \
-nographic
TEST_FLAGS := -machine virt \
-bios ../bootloader/$(BIOS) \
-kernel $(TARGET) \
-drive file=$(TEST_IMG),if=none,format=raw,id=x0 \
-device virtio-blk-device,drive=x0,bus=virtio-mmio-bus.0 \
-nographic
GDB := riscv64-elf-gdb
GDB_FLAGS := -ex "file $(TARGET)" \
-ex "target remote :1234" \
......@@ -31,6 +39,9 @@ build:
run: build
@$(QEMU) $(QEMU_FLAGS)
test: build
@$(QEMU) $(TEST_FLAGS)
debug:
@echo -e "\033[33m[+] Run 'make connect' in another terminal at the same dir\033[0m"
@$(QEMU) $(QEMU_FLAGS) -S -s
......
test/cases/brk 0 → 100755
File added
File added
File added
File added
test/cases/dup 0 → 100755
File added
File added
File added
File added
File added
File added
File added
File added
File added
File added
File added
File added
File added
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment