Skip to main content

pytest-embedded-qemu

A pytest-embedded service for executing test cases in a QEMU virtual machine without physical hardware.

Service Activation

Activate this service by passing qemu to --embedded-services. Typically paired with idf:

pytest --embedded-services idf,qemu --app-path /path/to/app

Extra Functionalities

  • Automatic Image Generation: When used with idf, automatically merges binaries (bootloader, partition table, and app) into a single bootable QEMU flash image.
  • qemu Fixture: Launches and supervises the QEMU process.
  • Flash Encryption Simulation: Supports pre-encrypted flash images using a specified key file.
  • eFuse Support: Allows specifying virtual eFuse states for chip feature simulation.

CLI Options

  • --qemu-image-path: Path to the QEMU flash image binary. Default: <app_path>/flash_image.bin.
  • --qemu-prog-path: Path to the QEMU executable. Default: "qemu-system-xtensa".
  • --qemu-cli-args: Base CLI options for QEMU. Default: "-nographic -machine esp32".
  • --qemu-extra-args: Extra arguments appended to the QEMU command line. Default: None.
  • --qemu-efuse-path: Path to an eFuse file to simulate burn-in values. Default: None.
  • --skip-regenerate-image: Skip recreating the flash image if one is already present. Default: False.
  • --encrypt: Enable pre-encryption flash simulation workflow. Default: False.
  • --keyfile: Path to the encryption key file for the pre-encrypted workflow. Default: None.

Quick Example

from pytest_embedded import Dut


def test_qemu_execution(dut: Dut):
    # Runs entirely in QEMU software emulation
    dut.expect('Booting ESP-IDF app...')
    dut.expect('Hello world!')

Metadata

Release files for pytest-embedded-qemu 2.12.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pytest-embedded-qemu 2.12.0
File Size Uploaded Provenance Actions
pytest_embedded_qemu-2.12.0.tar.gz 9.1 kB Without provenance Details for pytest_embedded_qemu-2.12.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pytest-embedded-qemu 2.12.0
File Interpreter ABI Platform Actions
pytest_embedded_qemu-2.12.0-py3-none-any.whl Python 3 none any Details for pytest_embedded_qemu-2.12.0-py3-none-any.whl

Total release size: 17.7 kB

Release files / pytest_embedded_qemu-2.12.0.tar.gz

Download URL pytest_embedded_qemu-2.12.0.tar.gz
Size 9.1 kB
Tags Source
SHA-256 checksum
How to use checksums
0034f06c5a48526f145f0e6ef60f152221c9c1ad152409a30ab8d79fe450419a
BLAKE2b-256 checksum
How to use checksums
c1b6ac2f0a1ca83cea2388beb19e25bae5d7ce1ed02e0507f57703dfca11ac1f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.31.0

Release files / pytest_embedded_qemu-2.12.0-py3-none-any.whl

Download URL pytest_embedded_qemu-2.12.0-py3-none-any.whl
Size 8.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
33f3a1b9694561a1d1ddfa6002793c25b378d2f4addfa883b525fcd267a2550d
BLAKE2b-256 checksum
How to use checksums
eb64e32eadec6bd1095f84d92a09f3d7e4a045156bb1beb840813481c8aa4ac7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.31.0

Security for pytest-embedded-qemu 2.12.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

2.12.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page