mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-21 09:14:34 +00:00
finalize/improve basis stress testing
- add an autotrigger feature for the basis stress test so it can be run in a fuzzer loop - various fixes and improvements to the implementation to help integrate with CI
This commit is contained in:
parent
5d23ad9db6
commit
608817f343
3 changed files with 31 additions and 0 deletions
|
|
@ -60,8 +60,12 @@ threadpool = "1.8.1"
|
||||||
|
|
||||||
# testing rand compatibility - this is chasing the devil, but unfortunately
|
# testing rand compatibility - this is chasing the devil, but unfortunately
|
||||||
# a *lot* of useful packages are chasing this devil.
|
# a *lot* of useful packages are chasing this devil.
|
||||||
|
# also used in pddb testing
|
||||||
rand = {version = "0.8.5", features = ["getrandom"]}
|
rand = {version = "0.8.5", features = ["getrandom"]}
|
||||||
|
|
||||||
|
# pddb testing
|
||||||
|
rand_chacha = {version = "0.3.1", optional = true}
|
||||||
|
|
||||||
# for ditherpunk testing
|
# for ditherpunk testing
|
||||||
png = {version = "0.17.5", optional = true}
|
png = {version = "0.17.5", optional = true}
|
||||||
tracking-allocator = {version = "0.3.0", 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
|
aestests = [] # adds AES tests
|
||||||
tts = [] # adds text to speech plugin
|
tts = [] # adds text to speech plugin
|
||||||
pddbtest = []
|
pddbtest = []
|
||||||
|
autobasis = ["rand_chacha"]
|
||||||
|
autobasis-ci = []
|
||||||
ditherpunk = ["png"]
|
ditherpunk = ["png"]
|
||||||
tracking-alloc = ["tracking-allocator", "tracing", "tracing-subscriber"]
|
tracking-alloc = ["tracking-allocator", "tracing", "tracing-subscriber"]
|
||||||
default = [] # "debugprint"
|
default = [] # "debugprint"
|
||||||
|
|
|
||||||
|
|
@ -557,9 +557,11 @@ impl<'a> ShellCmdApi<'a> for PddbCmd {
|
||||||
if pass {
|
if pass {
|
||||||
log::info!("basis stress test passed");
|
log::info!("basis stress test passed");
|
||||||
write!(ret, "basis stress test passed").ok();
|
write!(ret, "basis stress test passed").ok();
|
||||||
|
log::info!("CI done");
|
||||||
} else {
|
} else {
|
||||||
log::info!("basis stress test failed: {} errors", errcount);
|
log::info!("basis stress test failed: {} errors", errcount);
|
||||||
write!(ret, "basis stress test failed: {} errors", errcount).ok();
|
write!(ret, "basis stress test failed: {} errors", errcount).ok();
|
||||||
|
log::info!("CI done");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#[cfg(feature="pddbtest")]
|
#[cfg(feature="pddbtest")]
|
||||||
|
|
|
||||||
|
|
@ -390,6 +390,12 @@ fn wrapped_main() -> ! {
|
||||||
|
|
||||||
let mut allow_redraw = true;
|
let mut allow_redraw = true;
|
||||||
log::trace!("starting main loop");
|
log::trace!("starting main loop");
|
||||||
|
|
||||||
|
#[cfg(feature = "autobasis-ci")]
|
||||||
|
{
|
||||||
|
log::info!("starting autobasis CI launcher");
|
||||||
|
autobasis_launcher(shch_sid);
|
||||||
|
}
|
||||||
loop {
|
loop {
|
||||||
let msg = xous::receive_message(shch_sid).unwrap();
|
let msg = xous::receive_message(shch_sid).unwrap();
|
||||||
log::debug!("got message {:?}", msg);
|
log::debug!("got message {:?}", msg);
|
||||||
|
|
@ -448,3 +454,20 @@ fn wrapped_main() -> ! {
|
||||||
log::trace!("quitting");
|
log::trace!("quitting");
|
||||||
xous::terminate_process(0)
|
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");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
Loading…
Reference in a new issue