Expand description
Minimal std test support for Xila, without platform drivers.
Provides the abstractions tests need (allocator, time, randomness,
console, hashing, a headless screen) and initialize (with the
environment feature enabled), which sets up a complete in-memory
environment. Real drivers (windows, network interfaces, host file systems)
belong to platform crates and their integration tests.
Modules§
- logger
- A logger that prints errors, warnings and information to standard output,
and checks that exercise any
LoggerTraitimplementation. - memory_
crate - wifi
- Deterministic Wi-Fi control-plane mock (
drivers_core::wifi); it never changes the host’s Wi-Fi. Deterministic Wi-Fi control-plane mock. It never changes the host’s Wi-Fi. Pair with a smoltcp packet device and spawn the returned runner explicitly.
Macros§
- instantiate_
global_ allocator - Install
MemoryManageras the global allocator and Xila memory manager.
Structs§
- Executor
- A std executor that
Executor::rununtilExecutor::stopis called. - Hash
Device - Headless
Screen Device - Character device implementing a headless display for host drivers and tests.
- Logger
- Memory
Manager - Xila memory manager for tests: every capability is served by
System. - Random
Device - Thread
Allocations - Allocation counters recorded for a single thread by
MemoryManager. - Time
Device
Enums§
- Console
Device - Standard input, output or error of the test process. Never a terminal, so tests behave the same whether or not they run interactively.
- Headless
Error - Error returned when creating a
HeadlessScreenDevice. - Load
Error
Functions§
- initialize
- Set up an in-memory Xila environment and return the standard streams of
the current task: a formatted LittleFS on a memory device, the default
hierarchy, test devices, and an
administratoruser and group. - load_
file - Copy a host file into the virtual file system, replacing
destination. - new_
thread_ executor - Start an executor on a new thread and register it with
manager.