Skip to main content

Crate babble_bridge

Crate babble_bridge 

Source
Expand description

BabbleSim + Zephyr nRF RPC simulation bridge.

This crate provides three things:

§Test harness usage

use std::collections::HashSet;
use std::path::Path;

let tests_dir = Path::new(concat!(env!("CARGO_MANIFEST_DIR"), "/tests/sockets"));
let (mut processes, socket_path) =
    babble_bridge::spawn_zephyr_rpc_server_with_socat(tests_dir, "my_test");

// … run test logic, write/read via a UnixStream to socket_path …

processes.search_stdout_for_strings(HashSet::from([
    "<inf> nrf_ps_server: Initializing RPC server",
]));

Modules§

xtask
Xtask commands (docker, zephyr-setup, run-bsim) and programmatic API.

Structs§

TestProcesses
Owns all child processes spawned for a single simulation run and accumulates their stdout output for later inspection.

Functions§

spawn_zephyr_rpc_server_with_socat
tests_dir/<test_name>.sock.