Skip to main content

LibreHTF

An open hardware test framework.

Install

PyPI

Install and update using pip:

pip install -U librehtf

Repository

When using git, clone the repository and change your present working directory.

git clone http://github.com/mcpcpc/librehtf
cd librehtf/

Create and activate a virtual environment.

python3 -m venv venv
source venv/bin/activate

Install LibreHTF to the virtual environment.

pip install -e .

Commands

db-init

The Sqlite3 database can be initialized or re-initialized with the following command.

flask --app librehtf init-db

Deployment

Before deployment, we strongly encourage you to override the default SECRET_KEY variable. This can be done by creating a conf.py file and placing it in the same root as the instance (i.e. typically where the SQLite database resides).

SECRET_KEY = “192b9bdd22ab9ed4d12e236c78afcb9a393ec15f71bbf5dc987d54727823bcbf“

There are a number of ways to generate a secret key value. The simplest would be to use the built-in secrets Python library.

$ python -c ‘import secrets; print(secrets.token_hex())’
‘192b9bdd22ab9ed4d12e236c78afcb9a393ec15f71bbf5dc987d54727823bcbf’

Waitress

Production WSGI via waitress.

pip install waitress
waitress-serve --call librehtf:create_app

Test

python3 -m unittest

Run with coverage report.

coverage run -m unittest
coverage report
coverage html  # open htmlcov/index.html in a browser

Authorization

OpenHTF provides a simple role-based access control (RBAC) for protecting both APIs and environment configuration. There are three levels of user access controls: administrator, functional and public. Responsibilities range from least restrictive to most restrictive, respectively.

Function Description Evaluation API Access Management
Administrator An individual for system administration and user management. Yes Yes Yes
Functional A non-human interface, typically for machine integration. Yes Yes Limited
Public Typically an operator or technician responsible for test execution. Yes No No

Nomenclature

OpenHTF is architected to allow inherent branching of tests. At the core, there are three tiers of organization: device, test and task.

Device

Devices refer to specific to hardware versions or product configurations. These are typically descriptive in nature and are useful when organizing hardware test interfaces that are intended to be used with multiple product offerings. Each device may have one or multiple test configurations.

Test

Tests are a collection of similar or related tasks. Thus, executing a test will execute all collected task operators.

Task

The smallest unitdiscretized observation for a given test. The result of running a task can either be informative or comparative. When comparing the result of a task, the resulting outcome either yields PASS or FAIL.

Metadata

Release files for librehtf 0.0.3

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

Source distribution (sdist)

Source distribution for librehtf 0.0.3
File Size Uploaded
librehtf-0.0.3.tar.gz 19.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for librehtf 0.0.3
File Interpreter ABI Platform
librehtf-0.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 51.9 kB

Release files / librehtf-0.0.3.tar.gz

Download URL librehtf-0.0.3.tar.gz
Size 19.7 kB
Tags Source
SHA-256 checksum
How to use checksums
d3437abb80cbbdca97954680c38b21caa47ae0a6ce78d26faa0aee57fe3a7457
BLAKE2b-256 checksum
How to use checksums
79875598f2d4d88bfffbebf8a642c577d6bbaf289ec1812300ab425549891d43
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.16

Release files / librehtf-0.0.3-py3-none-any.whl

Download URL librehtf-0.0.3-py3-none-any.whl
Size 32.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4c761da75549d0ad800c46200fb77f994043096b87e941e16acf4ac070254d65
BLAKE2b-256 checksum
How to use checksums
172dcc6b407bdb9c378c35cd63aa931398eac5a529dae1286a19eb9e9130ab71
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.16

Release history Release notifications | RSS feed

This release

0.0.3 This release

2 release files

0.0.2

2 release files

0.0.1

2 release files

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