From 2f0b9e65921bd729b2975aa71b3d0b2332af0844 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Autin?= Date: Wed, 5 Apr 2023 17:07:58 +0200 Subject: [PATCH] Tests now point to the correct locations --- src/kernel/thread_manager.rs | 2 +- src/simulator/loader.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/kernel/thread_manager.rs b/src/kernel/thread_manager.rs index f2b38ec..7e5a36b 100644 --- a/src/kernel/thread_manager.rs +++ b/src/kernel/thread_manager.rs @@ -208,7 +208,7 @@ mod test { fn test_thread_context() { let mut machine = Machine::default(); - let (loader, ptr) = loader::Loader::new("./test/syscall_tests/halt", &mut machine, 0).expect("IO Error"); + let (loader, ptr) = loader::Loader::new("./target/guac/halt.guac", &mut machine, 0).expect("IO Error"); let start_pc = loader.elf_header.entrypoint; let system = &mut System::default(); diff --git a/src/simulator/loader.rs b/src/simulator/loader.rs index f58f0e9..3fb1bdd 100644 --- a/src/simulator/loader.rs +++ b/src/simulator/loader.rs @@ -613,7 +613,7 @@ mod test { #[test] fn test_parse_elf() { let mut machine = Machine::default(); - let loader = Loader::load_and_parse("./test/riscv_instructions/simple_arithmetics/unsigned_addition").expect("IO Error"); + let loader = Loader::load_and_parse("./target/guac/unsigned_addition.guac").expect("IO Error"); loader.load_into_machine(&mut machine, 0).expect("Parsing error"); assert!(!loader.elf_header.is_32bits); assert!(!loader.elf_header.endianess); @@ -634,7 +634,7 @@ mod test { #[test] fn test_parse_section() { let mut machine = Machine::default(); - let loader = Loader::load_and_parse("./test/riscv_instructions/simple_arithmetics/unsigned_addition").expect("IO Error"); + let loader = Loader::load_and_parse("./target/guac/unsigned_addition.guac").expect("IO Error"); loader.load_into_machine(&mut machine, 0).expect("Parsing error"); assert_eq!(9, loader.sections.len()); let n = loader.sections.iter().filter(|p| { p.does_flag_contains_key(crate::simulator::loader::FlagValue::ShfAlloc)}).collect::>().len();