my fork of labgrid
  • Python 97.7%
  • Shell 2.1%
  • Dockerfile 0.2%
Find a file
Bryan Brattlof 6825e54942
Some checks failed
reusable-unit-tests.yml / WIP: SDSwap: add initial support for a SDSwap device (push) Failing after 0s
unit tests / Release to Pypi (push) Has been cancelled
unit tests / unit tests (push) Has been cancelled
unit tests / unit tests-1 (push) Has been cancelled
unit tests / unit tests-2 (push) Has been cancelled
unit tests / unit tests-3 (push) Has been cancelled
unit tests / unit tests-4 (push) Has been cancelled
unit tests / Docker Unit Tests (push) Has been cancelled
unit tests / build (push) Has been cancelled
unit tests / build-1 (push) Has been cancelled
unit tests / build-2 (push) Has been cancelled
unit tests / build-3 (push) Has been cancelled
unit tests / build-4 (push) Has been cancelled
unit tests / docker (push) Has been cancelled
unit tests / release (push) Has been cancelled
WIP: SDSwap: add initial support for a SDSwap device
bla bla bla...

Signed-off-by: Bryan Brattlof <bb@ti.com>
2026-06-10 15:32:33 -05:00
.github netns: Disable mount namespace 2026-03-30 13:09:03 -06:00
contrib run ruff format on some files 2026-02-20 17:52:38 +01:00
debian CHANGES/debian: name next release 25.0 2025-01-31 10:51:59 +01:00
doc Merge pull request #1824 from N3xp7im3/txchunk 2026-03-18 06:38:44 +01:00
dockerfiles dockerfiles: Add statsd docker image 2026-03-27 07:54:38 -05:00
examples WIP: SDSwap: add initial support for a SDSwap device 2026-06-10 15:32:33 -05:00
helpers add support for transparent net device access using network namespaces 2026-03-14 22:30:53 +01:00
labgrid WIP: SDSwap: add initial support for a SDSwap device 2026-06-10 15:32:33 -05:00
man man: Update man pages 2026-03-30 13:41:42 -06:00
tests Add TAI protocol and driver classes 2026-06-10 15:30:47 -05:00
.codecov.yaml .codecov.yaml: disable github check annotations 2021-03-04 11:54:42 +01:00
.coveragerc tests: Omit generated protobuf code from coverage 2026-05-12 06:02:46 -06:00
.dockerignore Add .dockerignore file 2021-02-26 08:46:40 +01:00
.flake8 flake8: add configuration 2017-11-19 12:19:13 +01:00
.git_archival.txt setuptools_scm: support reading version from archive 2025-01-07 09:54:25 +00:00
.gitattributes setuptools_scm: support reading version from archive 2025-01-07 09:54:25 +00:00
.gitignore dockerfiles: migrate to gRPC 2024-08-13 14:26:04 +02:00
.gitlab-ci.yml add initial GitLab CI instructions 2022-03-02 19:26:10 +01:00
.readthedocs.yaml readthedocs: use latest ubuntu/python versions 2025-01-14 12:39:18 +01:00
CHANGES.rst CHANGES: update for 26.0 release 2026-06-06 14:21:14 +02:00
CODEOWNERS docker: rename docker to dockerfiles 2021-02-05 16:25:18 +01:00
COPYING COPYING,LICENSE: move from .txt 2017-05-11 21:18:37 +02:00
labgrid_logo.png add official labgrid logo 2019-03-20 12:49:03 +01:00
LICENSE COPYING,LICENSE: move from .txt 2017-05-11 21:18:37 +02:00
mypy.ini mypy: add some initial typo annotations 2021-09-15 16:13:44 +02:00
pyproject.toml add support for transparent net device access using network namespaces 2026-03-14 22:30:53 +01:00
README.rst man: Migrate to doc/ 2025-11-19 10:43:01 +01:00

.. image:: https://raw.githubusercontent.com/labgrid-project/labgrid/master/labgrid_logo.png
   :alt: labgrid logo
   :align: center

Welcome to labgrid
==================
|license| |unit-tests| |docker-build| |coverage-status| |docs-status| |chat| |calver|

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 <#Getting-started>`_

* `Purpose and Features <#purpose-and-features>`_

* `Documentation <#documentation>`_

* `Contributing <#contributing>`_

* `Background <#background>`_

* `Installation <#installation>`_

  * `Install Latest Release <#install-latest-release>`_

  * `Install Development State <#install-development-state>`_

Getting started
---------------
There is a tutorial series on the Pengutronix Youtube channel you can follow to
get started: `Labgrid Tutorial Playlist
<https://www.youtube.com/playlist?list=PLPy6BX4pJosCEq7CIU06bt2WM7lFAy1CF>`_.

The other starting point is in the `documentation
<https://labgrid.readthedocs.io/en/latest/getting_started.html>`__.

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 <https://docs.pytest.org>`_ (and additional pytest plugins).
Please see `Design Decisions
<https://labgrid.readthedocs.io/en/latest/design_decisions.html>`_ 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
<https://labgrid.readthedocs.io/en/latest/development.html#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
<https://labgrid.readthedocs.io/en/latest/development.html#ideas>`_ for
enhancements which are not yet implemented.

Documentation
-------------
labgrid's documentation is hosted on `Read the Docs <http://labgrid.readthedocs.io/en/latest/>`_.

Contributing
------------
See our `Development Docs <http://labgrid.readthedocs.io/en/latest/development.html>`_.

Visit us in our IRC channel ``#labgrid`` on libera.chat (bridged to the
`Matrix channel #labgrid:matrix.org <https://app.element.io/#/room/#labgrid:matrix.org>`_)

Background
----------
Work on labgrid started at `Pengutronix <http://pengutronix.de/>`_ in late 2016
and is currently in active use and development.

Installation
------------
See the `Installation section
<http://labgrid.readthedocs.io/en/latest/getting_started.html#installation>`_
for more details.

Install Latest Release
^^^^^^^^^^^^^^^^^^^^^^
Install labgrid via PyPi:

.. code-block:: bash

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

Install Development State
^^^^^^^^^^^^^^^^^^^^^^^^^
Clone the git repository:

.. code-block:: bash

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

Create and activate a virtualenv for labgrid:

.. code-block:: bash

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


Install labgrid into the virtualenv:

.. code-block:: bash

   venv $ pip install .

Tests can now run via:

.. code-block:: bash

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

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

.. code-block:: bash

   venv $ pip install '.[doc]'

.. |license| image:: https://img.shields.io/badge/license-LGPLv2.1-blue.svg
    :alt: LGPLv2.1
    :target: https://raw.githubusercontent.com/labgrid-project/labgrid/master/LICENSE

.. |unit-tests| image:: https://github.com/labgrid-project/labgrid/workflows/unit%20tests/badge.svg
    :alt: unit tests status
    :target: https://github.com/labgrid-project/labgrid/actions?query=workflow%3A%22unit+tests%22+branch%3Amaster

.. |docker-build| image:: https://github.com/labgrid-project/labgrid/workflows/docker%20build/badge.svg
    :alt: docker build status
    :target: https://github.com/labgrid-project/labgrid/actions?query=workflow%3A%22docker+build%22+branch%3Amaster

.. |coverage-status| image:: https://codecov.io/gh/labgrid-project/labgrid/branch/master/graph/badge.svg
    :alt: coverage status
    :target: https://codecov.io/gh/labgrid-project/labgrid

.. |docs-status| image:: https://readthedocs.org/projects/labgrid/badge/?version=latest
    :alt: documentation status
    :target: https://labgrid.readthedocs.io/en/latest/?badge=latest

.. |chat| image:: https://matrix.to/img/matrix-badge.svg
    :alt: chat
    :target: https://app.element.io/#/room/#labgrid:matrix.org

.. |calver| image:: https://img.shields.io/badge/calver-YY.MINOR%5B.MICRO%5D-22bfda.svg
    :alt: chat
    :target: https://calver.org/