Skip to content
Commit 302d671e authored by Simon Glass's avatar Simon Glass Committed by Anas Nashif
Browse files

emul: Create an emulation implementation



Create a header file and implementation for emulators. Set up a linker
list so that emulators can be found and initialised at start-up.

Emulators are used to emulate hardware devices, to support testing of
various subsystems. For example, it is possible to write an emulator
for an I2C compass such that it appears on the I2C bus and can be used
just like a real hardware device.

Emulators often implement special features for testing. For example a
compass may support returning bogus data if the I2C bus speed is too
high, or may return invalid measurements if calibration has not yet
been completed. This allows for testing that high-level code can
handle these situations correctly. Test coverage can therefore
approach 100% if all failure conditions are emulated.

Signed-off-by: default avatarPeter Bigot <peter.bigot@nordicsemi.no>
Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
parent dce95804
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment