From 8e440609c219f279a985db85c1f613cc4d7b8b34 Mon Sep 17 00:00:00 2001 From: bunnie Date: Mon, 30 Jan 2023 19:01:13 +0800 Subject: [PATCH] add an extra test for checking if time server blocks on PDDB mount gated with a feature so it doesn't bloat the shipping code base --- services/shellchat/src/cmds/test.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/services/shellchat/src/cmds/test.rs b/services/shellchat/src/cmds/test.rs index e29a76962..00ceec2bb 100644 --- a/services/shellchat/src/cmds/test.rs +++ b/services/shellchat/src/cmds/test.rs @@ -629,6 +629,21 @@ impl<'a> ShellCmdApi<'a> for Test { write!(ret, "Ship mode request denied").unwrap(); } } + #[cfg(feature-"extra-tests")] + "timeblock" => { + let time_cid = xous::connect(xous::SID::from_bytes(b"timeserverpublic").unwrap()).unwrap(); + let result = xous::send_message(time_cid, + xous::Message::new_blocking_scalar(3, 0, 0, 0, 0) + ).unwrap(); + match result { + xous::Result::Scalar2(msb, lsb) => { + log::info!("GetTimeUtc: {}, {}", msb, lsb); + } + _ => { + log::info!("GetTimeUtc returned an unexpected result"); + } + } + } #[cfg(feature="ditherpunk")] "modals" => { modals::tests::spawn_test();