{"library":"pytest-embedded-jtag","title":"pytest-embedded-jtag","description":"pytest-embedded-jtag is a plugin for pytest-embedded that enables interaction with JTAG-connected devices, providing services for OpenOCD and GDB utilities. It allows for advanced embedded testing scenarios by integrating debugging and flashing tools directly into pytest tests. The current version is 2.7.0, and it follows the release cadence of the broader pytest-embedded project.","language":"python","status":"active","last_verified":"Mon May 18","install":{"commands":["pip install pytest-embedded-jtag"],"cli":null},"imports":["from pytest_embedded import Dut","from pytest_embedded_jtag.gdb import Gdb","from pytest_embedded_jtag.openocd import OpenOcd"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import pytest\nfrom pytest_embedded import Dut\n\ndef test_jtag_connection(dut: Dut, openocd, gdb):\n    # To enable these fixtures, run pytest with --embedded-services jtag\n    # The 'openocd' and 'gdb' fixtures are automatically provided when 'jtag' service is active.\n    # 'openocd' is an instance of pytest_embedded_jtag.openocd.OpenOcd\n    # 'gdb' is an instance of pytest_embedded_jtag.gdb.Gdb\n    \n    print(f\"OpenOCD instance: {openocd}\")\n    print(f\"GDB instance: {gdb}\")\n    \n    # Example: Send a command to OpenOCD (requires OpenOCD to be running and connected)\n    # In a real test, you'd interact with OpenOCD or GDB to flash, debug, or verify state.\n    try:\n        openocd.write(\"version\") # Assuming 'version' is a valid OpenOCD command\n        version_output = dut.expect(\"Open On-Chip Debugger\").group(0)\n        print(f\"OpenOCD version output: {version_output}\")\n    except Exception as e:\n        print(f\"Could not interact with OpenOCD: {e}\")\n    \n    # Example: Basic DUT interaction (from pytest-embedded)\n    dut.expect_exact(\"Hello from target\") # Replace with expected output from your embedded target\n    print(\"Target responded 'Hello from target'\")\n","lang":"python","description":"This quickstart demonstrates a basic pytest test using the `dut`, `openocd`, and `gdb` fixtures provided by `pytest-embedded-jtag`. To run this test, you need an embedded target, OpenOCD, and GDB configured. Save the code as `test_jtag.py` and execute with `pytest -s --embedded-services jtag` to enable the JTAG services and see stdout. The `openocd` and `gdb` fixtures are instances of their respective classes, allowing direct interaction.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":{"tag":null,"tag_description":null,"last_tested":"2026-05-18","installed_version":"1.18.2","pypi_latest":"2.8.0","is_stale":true,"summary":{"python_range":"3.10–3.9","success_rate":100,"avg_install_s":3.2,"avg_import_s":0.37,"wheel_type":"wheel"},"results":[{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"pytest-embedded-jtag","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.36,"mem_mb":8.2,"disk_size":"32.6M"},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"pytest-embedded-jtag","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":3,"import_time_s":0.24,"mem_mb":8.2,"disk_size":"33M"},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"pytest-embedded-jtag","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.46,"mem_mb":9.3,"disk_size":"36.0M"},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"pytest-embedded-jtag","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":3.3,"import_time_s":0.4,"mem_mb":9.3,"disk_size":"36M"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"pytest-embedded-jtag","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.43,"mem_mb":9,"disk_size":"27.5M"},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"pytest-embedded-jtag","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":3,"import_time_s":0.41,"mem_mb":9,"disk_size":"28M"},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"pytest-embedded-jtag","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.45,"mem_mb":9.6,"disk_size":"27.3M"},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"pytest-embedded-jtag","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":2.9,"import_time_s":0.41,"mem_mb":9.6,"disk_size":"28M"},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"pytest-embedded-jtag","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.26,"mem_mb":7.4,"disk_size":"31.8M"},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"pytest-embedded-jtag","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":3.6,"import_time_s":0.26,"mem_mb":7.4,"disk_size":"32M"}]}}