MCPcopy Create free account
hub / github.com/LPC4/Full-Stack / run_example_manifest_in_kernel

Function run_example_manifest_in_kernel

tests/integration/kernel_integration.rs:164–176  ·  view source on GitHub ↗
(name: &str)

Source from the content-addressed store, hash-verified

162// clean spawn-and-exit.
163fn run_example_in_kernel(user_src: &str, label: &str) {
164 let user = compile_hosted(user_src);
165 let (_, outcome, uart) = boot_kernel(cached_kernel(), Some(&user), None, "", 10_000_000);
166 assert_user_exit_ok(&uart, &outcome, label);
167}
168
169fn run_example_manifest_in_kernel(name: &str) {
170 let manifest_path = std::path::Path::new(env!("CARGO_MANIFEST_DIR"))
171 .join("programs/example")
172 .join(name)
173 .join(format!("{name}.build"));
174 let manifest = BuildManifest::from_file(&manifest_path)
175 .unwrap_or_else(|e| panic!("{}: parse failed: {e}", manifest_path.display()));
176 let user = BuildExecutor::build(&manifest)
177 .unwrap_or_else(|e| panic!("{}: build failed: {e}", manifest_path.display()))
178 .linked;
179 let (_, outcome, uart) = boot_kernel(cached_kernel(), Some(&user), None, "", 10_000_000);

Calls 3

boot_kernelFunction · 0.85
cached_kernelFunction · 0.85
assert_user_exit_okFunction · 0.85