add join command to libstd-test

This commit is contained in:
bunnie 2022-03-02 21:20:20 +08:00
parent 7e63f89433
commit 9d1aa10a50
4 changed files with 9 additions and 2 deletions

1
Cargo.lock generated
View file

@ -1210,6 +1210,7 @@ checksum = "c7d73b3f436185384286bd8098d17ec07c9a7d2388a6599f824d8502b529702a"
name = "libstd-test"
version = "0.1.0"
dependencies = [
"com",
"dns",
"log",
"log-server",

Binary file not shown.

View file

@ -16,6 +16,7 @@ num-derive = {version = "0.3.3", default-features = false}
num-traits = {version = "0.2.14", default-features = false}
net = {path = "../net"}
dns = {path = "../dns"}
com = {path = "../com"}
[target.'cfg(not(any(windows,unix)))'.dependencies]
utralib = { path = "../../utralib"}

View file

@ -6,11 +6,16 @@ fn test_main() -> ! {
let tt = ticktimer_server::Ticktimer::new().unwrap();
log::info!("waiting for others to boot");
tt.sleep_ms(5000).unwrap();
tt.sleep_ms(1000).unwrap();
let xns = xous_names::XousNames::new().unwrap();
let mut com = com::Com::new(&xns).unwrap();
com.wlan_join().expect("couldn't issue join command");
log::info!("waiting for join to finish");
tt.sleep_ms(1000).unwrap();
let host = "bunniefoo.com";
log::info!("attempting to resolve {}", host);
let xns = xous_names::XousNames::new().unwrap();
let dns = dns::Dns::new(&xns).unwrap();
match dns.lookup(host) {
Ok(ipaddr) => {