Skip to main content

An open hardware test framework.

Project description

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 three levels user access controls, ranging from least restrictive to most restrictive: administrator, functional and public.

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

librehtf-0.0.2.tar.gz (19.8 kB view details)

Uploaded Source

Built Distribution

librehtf-0.0.2-py3-none-any.whl (31.6 kB view details)

Uploaded Python 3

File details

Details for the file librehtf-0.0.2.tar.gz.

File metadata

  • Download URL: librehtf-0.0.2.tar.gz
  • Upload date:
  • Size: 19.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for librehtf-0.0.2.tar.gz
Algorithm Hash digest
SHA256 77b8bc92a25f3f8437133ef46981697a91cd1132378840c2938047354b2122f8
MD5 e0c5e533c1121fa7a662c964f7da205f
BLAKE2b-256 3e52f32ceaa94fc09c380339b0c3ef6a72017e6f907894ee3dd694cfca62292a

See more details on using hashes here.

File details

Details for the file librehtf-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: librehtf-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 31.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for librehtf-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 429c31bf9ae5fd963282f51e3f82afa5211b6b2f45c132ba2cb3fb3a49961e68
MD5 b597442820d6f28608ad4e30e09552c4
BLAKE2b-256 6ff9262d5931bbb149f91db017ca5c764b6336e6214ed6d588f9e969e5e5408f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page