Skip to main content

embedded systems control library for development, testing and installation

Project description

labgrid logo

Welcome to labgrid

LGPLv2.1 unit tests status docker build status coverage status documentation status chat chat

Labgrid is an embedded board control python library with a focus on testing, development and general automation. It includes a remote control layer to control boards connected to other hosts.

Getting started

There is a tutorial series on the Pengutronix Youtube channel you can follow to get started: Labgrid Tutorial Playlist.

The other starting point is in the documentation.

Purpose and Features

The idea behind labgrid is to create an abstraction of the hardware control layer needed for testing of embedded systems, automatic software installation and automation during development. Labgrid itself is not a testing framework, but is intended to be combined with pytest (and additional pytest plugins). Please see Design Decisions for more background information.

It currently supports:

  • remote client-exporter-coordinator infrastructure to make boards available from different computers on a network

  • pytest plugin to write automated tests for embedded systems

  • CLI and library usage for development and automation

  • interaction with bootloader and Linux shells on top of serial console or SSH

  • power/reset management via drivers for power switches

  • upload of binaries and device bootstrapping via USB

  • control of digital outputs, SD card and USB multiplexers

  • integration of audio/video/measurement devices for remote development and testing

  • Docker/QEMU integration

While labgrid is currently used for daily development on embedded boards and for automated testing, several planned features are not yet implemented and the APIs may be changed as more use-cases appear. We appreciate code contributions and feedback on using labgrid on other environments (see Contributing for details). Please consider contacting us (via a GitHub issue) before starting larger changes, so we can discuss design trade-offs early and avoid redundant work. You can also look at Ideas for enhancements which are not yet implemented.

Documentation

labgrid’s documentation is hosted on Read the Docs.

Contributing

See our Development Docs.

Visit us in our IRC channel #labgrid on libera.chat (bridged to the Matrix channel #labgrid:matrix.org)

Background

Work on labgrid started at Pengutronix in late 2016 and is currently in active use and development.

Installation

See the Installation section for more details.

Install Latest Release

Install labgrid via PyPi:

$ virtualenv -p python3 venv
$ source venv/bin/activate
venv $ pip install --upgrade pip
venv $ pip install labgrid

Install Development State

Clone the git repository:

$ git clone https://github.com/labgrid-project/labgrid

Create and activate a virtualenv for labgrid:

$ virtualenv -p python3 venv
$ source venv/bin/activate
venv $ pip install --upgrade pip

Install labgrid into the virtualenv:

venv $ pip install .

Tests can now run via:

venv $ python -m pytest --lg-env <config>

To install sphinx and the dependencies needed for generating man pages and documentation run:

venv $ pip install '.[doc]'

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

labgrid-26.0.tar.gz (485.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

labgrid-26.0-py3-none-any.whl (279.2 kB view details)

Uploaded Python 3

File details

Details for the file labgrid-26.0.tar.gz.

File metadata

  • Download URL: labgrid-26.0.tar.gz
  • Upload date:
  • Size: 485.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for labgrid-26.0.tar.gz
Algorithm Hash digest
SHA256 686695d3fa8c0ac0c9a6e6b42f9c8e9e92a9363c9d4945718e5fc21e431bd3d8
MD5 eb73ca22609565b77e5d21dc523c3e6c
BLAKE2b-256 5823e8b3e879003973999b70d56f238f80777dfa3c45450241de749c52657bc3

See more details on using hashes here.

File details

Details for the file labgrid-26.0-py3-none-any.whl.

File metadata

  • Download URL: labgrid-26.0-py3-none-any.whl
  • Upload date:
  • Size: 279.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for labgrid-26.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d75bd710045fb9bfca47e52ddf1b4ac175463056ba78e16d9087d2b232a73df1
MD5 17f0d9274b3e267923b20d317d6919fe
BLAKE2b-256 94b57261b83adadaf887938ca573ac4aa2fbf8eae26ec3a02d2f291eb93f2de2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page