Change test pass error code, to avoid conflict with QEMU's

master
WangRunji 7 years ago
parent c446d2bb5e
commit fc910d4b9d

@ -10,8 +10,7 @@ grub_cfg := $(boot_src)/grub.cfg
assembly_source_files := $(wildcard $(boot_src)/*.asm) assembly_source_files := $(wildcard $(boot_src)/*.asm)
assembly_object_files := $(patsubst $(boot_src)/%.asm, \ assembly_object_files := $(patsubst $(boot_src)/%.asm, \
build/arch/$(arch)/boot/%.o, $(assembly_source_files)) build/arch/$(arch)/boot/%.o, $(assembly_source_files))
qemu_opts := -cdrom $(iso) \ qemu_opts := -cdrom $(iso) -smp 2
-smp 2
ifdef travis ifdef travis
test := 1 test := 1
@ -40,7 +39,7 @@ clean:
@rm -r build @rm -r build
run: $(iso) 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) iso: $(iso)

@ -2,7 +2,7 @@ macro_rules! test_end {
() => ( () => (
println!("Test end"); println!("Test end");
// test success // test success
unsafe{ arch::cpu::exit_in_qemu(1) } unsafe{ arch::cpu::exit_in_qemu(11) }
) )
} }

Loading…
Cancel
Save