Skip to main content

BurnInTest Plugin Python Interface (burnintest-plugin)

A simple wrapper for interfacing with PassMark's BurnInTest plugin system.

BurnInTest allows you to integrate custom testing tools via a shared memory interface. This package abstracts away the underlying ctypes and multiprocessing.shared_memory boilerplate, giving you a simple, object-oriented API to communicate statuses, log errors, and track test cycles directly from Python.

Features

  • Context Manager Support: Automatically handles shared memory cleanup and safe exits.
  • Built-in Enums: Statuses and error severities are mapped to standard Python Enums (PluginStatus, ErrorSeverity).
  • Safe Encoding: Automatically handles UTF-8 encoding and string truncation to prevent buffer overflows in the underlying C-struct.
  • State Tracking: Easily update cycles, duty cycles, read/write/verify operations, and error counts.

Installation

pip install burnintest-plugin

Quick Start

When BurnInTest launches a plugin, it passes a unique shared memory key as the first entry in argv. You use this key to initialize the BitInterface.

Below is an example of a simple plugin that verifies hardware states and communicates its progress back to the BurnInTest dashboard.

import sys
import time
from burnintest_plugin import BitInterface, PluginStatus, ErrorSeverity

def main():
    # BurnInTest passes the shared memory key as a command line argument
    mem_key = sys.argv[0]
    if not mem_key.startswith("BIT_PLUGIN_INT"):
        print("No BIT shared memory key found... Aborting!")
        sys.exit(1)

    # Use the context manager for clean shared memory cleanup
    with BitInterface(key=mem_key, window_title="Custom BIT Plugin") as bit:
        
        bit.set_status(PluginStatus.PLUGIN_STARTUP, "Initializing hardware SDK...")
        time.sleep(1)

        # Simulating a testing loop (e.g., verifying GPIO/DIO or memory states)
        bit.set_status(PluginStatus.PLUGIN_READING, "Verifying module states...")

        for i in range(10):
            # Always check if the user has stopped the test in the BurnInTest UI
            if not bit.test_running:
                break

            # Simulate a read operation
            bit.read_operations += 1
            time.sleep(0.5)

            # Simulate catching a minor hardware anomaly (e.g., a recoverable bit flip)
            if i == 5:
                bit.log_message(ErrorSeverity.ERRORWARNING, "Minor state mismatch detected, retrying...")
                # Note: log_message automatically increments bit.error_count for severities > WARNING

            # Update metrics
            bit.verify_operations += 1
            bit.cycle += 1

        bit.set_status(PluginStatus.PLUGIN_CLEANUP, "Cleaning up resources...")

if __name__ == "__main__":
    main()

Usage Notes

  • Blocking vs Non-Blocking: Methods like set_status and log_message have an optional wait boolean parameter. When True, the Python script will block until BurnInTest acknowledges the update. If back to back calls are made, the second call will always wait for the first to be acknowledged.
  • Pre-Testing: If you are using this script as a Pre-Test plugin, you can call bit.set_pretest_complete() to signal to BurnInTest that it should proceed with the main testing phase.

Metadata

Release files for burnintest-plugin 0.1.1

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

Source distribution (sdist)

Source distribution for burnintest-plugin 0.1.1
File Size Uploaded Provenance Actions
burnintest_plugin-0.1.1.tar.gz 6.0 kB Without provenance Details for burnintest_plugin-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for burnintest-plugin 0.1.1
File Interpreter ABI Platform Actions
burnintest_plugin-0.1.1-py3-none-any.whl Python 3 none any Details for burnintest_plugin-0.1.1-py3-none-any.whl

Total release size: 13.2 kB

Release files / burnintest_plugin-0.1.1.tar.gz

Download URL burnintest_plugin-0.1.1.tar.gz
Size 6.0 kB
Tags Source
SHA-256 checksum
How to use checksums
f0782cd7b53d4d10e09949fdd2b63fcd37750f33cd76f0c3e5592385a3a048a0
BLAKE2b-256 checksum
How to use checksums
2f570f56d71fd38087f64c1612a8796bab9f207ea482d578fda6411e8081ded3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.16

Release files / burnintest_plugin-0.1.1-py3-none-any.whl

Download URL burnintest_plugin-0.1.1-py3-none-any.whl
Size 7.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4e52ceda1e21d37e0104102d155ddf90d9948a245e7ffbb5d304e3c643c5a5ea
BLAKE2b-256 checksum
How to use checksums
656a11015c96ed80bb929b2dfb1a2d5862481e7e6c76176480e00abce843834f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.16

Security for burnintest-plugin 0.1.1

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

0.1.1 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