From b17a0a41bea7789178919f4a0999ea8519e1f897 Mon Sep 17 00:00:00 2001 From: natrixaeria Date: Sat, 9 Nov 2019 04:44:04 +0100 Subject: Introduce integration test crate --- kernel/run | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'kernel/run') diff --git a/kernel/run b/kernel/run index 1353d92..f9c8df3 100755 --- a/kernel/run +++ b/kernel/run @@ -12,6 +12,7 @@ build_mode=release action=help target=x86_64 test_mode=false +serial_mode=false function define_vars() { target_name="$target-$name" target_path="target/" @@ -20,7 +21,7 @@ function define_vars() { iso_path="$target_path/iso/" obj_path="$iso_path/obj/" src_path="src/" - asm_path="$src_path/" + asm_path="$src_path/asm/" link_script="$src_path/linker.ld" grub_cfg="$src_path/grub.cfg" } @@ -33,6 +34,7 @@ print_help() { echo " -mode= set build mode (standard: $build_mode)" echo " -target= set target (standard: $target)" echo " -test enable test mode (standard: disabled)" + echo " -serial enable serial mode (standard: disabled)" echo echo "actions:" echo " build build the iso" @@ -90,7 +92,10 @@ run() { "x86_64") qemu="qemu-system-x86_64 -cdrom $iso_path/$name.iso" if $test_mode; then - qemu="$qemu -device isa-debug-exit,iobase=0xf4,iosize=0x04 -serial stdio -display none" + qemu="$qemu -device isa-debug-exit,iobase=0xf4,iosize=0x04 -serial stdio" + if $serial_mode; then + qemu="$qemu -display none" + fi fi $qemu case "$?" in @@ -115,14 +120,15 @@ for arg in "$@"; do target="$(echo $arg | sed "s/^-target=//")"; define_vars;; -test) test_mode=true; define_vars;; - /*kernel-*) - kernel_libary=$arg;; + -serial) + serial_mode=true; define_vars;; "run") action=run;; "build") action=build;; "test") action=test;; "help") action=help;; *) - echo "warn: ignoring unknown option '$arg'";; + echo "warn: ignoring unknown option '$arg'" + kernel_libary=$arg;; esac done -- cgit v1.2.3-54-g00ecf