()
| 691 | #[test] |
| 692 | fn kernel_shell_ls_cd_run_exit() { |
| 693 | let shell = compile_hosted_program("shell"); |
| 694 | |
| 695 | let child = compile_hosted( |
| 696 | r#" |
| 697 | external console_writeln: (str: u8*) |
| 698 | main: () -> i32 { |
| 699 | console_writeln("HELLO_FROM_CHILD".ptr) |
| 700 | return 0 |
| 701 | } |
| 702 | "#, |
| 703 | ); |
| 704 | let exec_file = assembled_to_elf_file(&child); |
| 705 | |
| 706 | let image = build_fs_image(&[ |
| 707 | FsEntry::Dir { path: "/home" }, |
| 708 | FsEntry::File { |
| 709 | path: "/home/hello.elf", |
| 710 | data: &exec_file, |
| 711 | }, |
| 712 | ]); |
| 713 | |
| 714 | let session = "ls\ncd /home\nls\nrun hello.elf\nexit\n"; |
| 715 | let (_, outcome, uart) = boot_kernel( |
| 716 | cached_kernel(), |
nothing calls this directly
no test coverage detected