diff --git a/services/shellchat/Cargo.toml b/services/shellchat/Cargo.toml index f90de4067..0e71f8085 100644 --- a/services/shellchat/Cargo.toml +++ b/services/shellchat/Cargo.toml @@ -60,8 +60,12 @@ threadpool = "1.8.1" # testing rand compatibility - this is chasing the devil, but unfortunately # a *lot* of useful packages are chasing this devil. +# also used in pddb testing rand = {version = "0.8.5", features = ["getrandom"]} +# pddb testing +rand_chacha = {version = "0.3.1", optional = true} + # for ditherpunk testing png = {version = "0.17.5", optional = true} tracking-allocator = {version = "0.3.0", optional = true} @@ -98,6 +102,8 @@ benchmarks = [] # adds the benchmark routines. Left off normally to free up code aestests = [] # adds AES tests tts = [] # adds text to speech plugin pddbtest = [] +autobasis = ["rand_chacha"] +autobasis-ci = [] ditherpunk = ["png"] tracking-alloc = ["tracking-allocator", "tracing", "tracing-subscriber"] default = [] # "debugprint" diff --git a/services/shellchat/src/cmds/pddb_cmd.rs b/services/shellchat/src/cmds/pddb_cmd.rs index e46b711be..c70256b47 100644 --- a/services/shellchat/src/cmds/pddb_cmd.rs +++ b/services/shellchat/src/cmds/pddb_cmd.rs @@ -557,9 +557,11 @@ impl<'a> ShellCmdApi<'a> for PddbCmd { if pass { log::info!("basis stress test passed"); write!(ret, "basis stress test passed").ok(); + log::info!("CI done"); } else { log::info!("basis stress test failed: {} errors", errcount); write!(ret, "basis stress test failed: {} errors", errcount).ok(); + log::info!("CI done"); } } #[cfg(feature="pddbtest")] diff --git a/services/shellchat/src/main.rs b/services/shellchat/src/main.rs index 50ca84ef3..728717fef 100644 --- a/services/shellchat/src/main.rs +++ b/services/shellchat/src/main.rs @@ -390,6 +390,12 @@ fn wrapped_main() -> ! { let mut allow_redraw = true; log::trace!("starting main loop"); + + #[cfg(feature = "autobasis-ci")] + { + log::info!("starting autobasis CI launcher"); + autobasis_launcher(shch_sid); + } loop { let msg = xous::receive_message(shch_sid).unwrap(); log::debug!("got message {:?}", msg); @@ -448,3 +454,20 @@ fn wrapped_main() -> ! { log::trace!("quitting"); xous::terminate_process(0) } + +#[cfg(feature="autobasis-ci")] +fn autobasis_launcher(sid: xous::SID) { + let _ = std::thread::spawn({ + let conn = xous::connect(sid).unwrap(); + move || { + let pddb = pddb::Pddb::new(); + pddb.is_mounted_blocking(); + let tt = ticktimer_server::Ticktimer::new().unwrap(); + tt.sleep_ms(5000).unwrap(); + let cmd = xous_ipc::String::<4000>::from_str("pddb btest"); + let buf = Buffer::into_buf(cmd).unwrap(); + buf.send(conn, ShellOpcode::Line.to_u32().unwrap()).expect("couldn't kick off the CI"); + log::info!("CI run started"); + } + }); +} \ No newline at end of file