From fc910d4b9db01cc16fb5ebaa1c47109c11b2113d Mon Sep 17 00:00:00 2001 From: WangRunji Date: Mon, 9 Apr 2018 22:22:43 +0800 Subject: [PATCH] Change test pass error code, to avoid conflict with QEMU's --- Makefile | 5 ++--- src/test_util.rs | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 06eaef3..8f31918 100644 --- a/Makefile +++ b/Makefile @@ -10,8 +10,7 @@ grub_cfg := $(boot_src)/grub.cfg assembly_source_files := $(wildcard $(boot_src)/*.asm) assembly_object_files := $(patsubst $(boot_src)/%.asm, \ build/arch/$(arch)/boot/%.o, $(assembly_source_files)) -qemu_opts := -cdrom $(iso) \ - -smp 2 +qemu_opts := -cdrom $(iso) -smp 2 ifdef travis test := 1 @@ -40,7 +39,7 @@ clean: @rm -r build run: $(iso) - @qemu-system-$(arch) $(qemu_opts) || [ $$? -eq 1 ] # run qemu and assert it exit 1 + @qemu-system-$(arch) $(qemu_opts) || [ $$? -eq 11 ] # run qemu and assert it exit 11 iso: $(iso) diff --git a/src/test_util.rs b/src/test_util.rs index 9bab06b..3e79aa3 100644 --- a/src/test_util.rs +++ b/src/test_util.rs @@ -2,7 +2,7 @@ macro_rules! test_end { () => ( println!("Test end"); // test success - unsafe{ arch::cpu::exit_in_qemu(1) } + unsafe{ arch::cpu::exit_in_qemu(11) } ) }