#### Beyond Linux® From Scratch (systemd Edition) - Version 10.1

### Chapter 9. General Libraries

- Prev

  Uchardet-0.0.7

- Next

  Wayland-1.19.0

- Up
- Home

# Umockdev-0.15.4

## Introduction to Umockdev

The Umockdev package contains a framework that allows a developer to mock devices for use in unit testing.

This package is known to build and work properly using an LFS-10.1 platform.

### Package Information

- Download (HTTP): https://github.com/martinpitt/umockdev/releases/download/0.15.4/umockdev-0.15.4.tar.xz

- Download MD5 sum: e6c06e56873ee7d5fbb9e3efa758edaf

- Download size: 448 KB

- Estimated disk space required: 7.3 MB (with tests)

- Estimated build time: 0.2 SBU (with tests)

### Umockdev Dependencies

#### Required

libgudev-234 and Vala-0.50.3

#### Optional

GTK-Doc-1.33.2 and libgphoto2 (optional for tests)

User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/umockdev

## Installation of Umockdev

Install Umockdev by running the following commands:

    mkdir build &&
    cd    build &&

    meson --prefix=/usr .. &&
    ninja

To test the results, issue: PATH=$PATH:/sbin:/usr/sbin ninja test. The addition to `PATH` is needed if you use the starting scripts in The Bash Shell Startup Files, because some tests need to run udevadm. One test needs to be run in an X session.

Now, as the `root` user:

    ninja install

## Command Explanations

`-Dgtk_doc=true`: Use this switch if you have GTK-Doc-1.33.2 installed and wish to rebuild and install the API documentation.

## Contents

Installed Programs: umockdev-record, umockdev-run, and umockdev-wrapper
Installed Libraries: libumockdev-preload.so.0 and libumockdev.so
Installed Directories: /usr/include/umockdev-1.0

### Short Descriptions

umockdev-record | records Linux devices and their ancestors from sysfs/udev or records ioctls for a device
umockdev-run | runs a program under an umockdev testbed
umockdev-wrapper | wraps a program around `libumockdev-preload.so.0` through LD_PRELOAD
`libumockdev.so` | provides API functions that allow mocking hardware devices for unit testing

Last updated on 2021-02-19 22:13:48 -0800

- Prev

  Uchardet-0.0.7

- Next

  Wayland-1.19.0

- Up
- Home