From 1da43af14e90cd52d09e813536db0f99df4e5ce8 Mon Sep 17 00:00:00 2001 From: Nicolas Stalder Date: Thu, 8 Aug 2019 02:49:05 +0200 Subject: [PATCH] Add missing pyscard and cleanup --- .envrc | 2 ++ Makefile | 18 ++++++++++++++++++ README.md | 18 ++++++++---------- requirements.txt | 6 +++--- 4 files changed, 31 insertions(+), 13 deletions(-) create mode 100644 .envrc create mode 100644 Makefile diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..df8e0cf --- /dev/null +++ b/.envrc @@ -0,0 +1,2 @@ +# to use this, install [direnv](https://direnv.net/) +source venv/bin/activate diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..3bb249d --- /dev/null +++ b/Makefile @@ -0,0 +1,18 @@ +.PHONY: standard-tests vendor-tests + +standard-tests: venv + venv/bin/pytest tests/standard + +vendor-tests: venv + venv/bin/pytest tests/vendor + +# setup development environment +venv: + python3 -m venv venv + venv/bin/pip install -U pip + venv/bin/pip install -U -r requirements.txt + +# re-run if dependencies change +update: + venv/bin/pip install -U pip + venv/bin/pip install -U -r requirements.txt diff --git a/README.md b/README.md index 08c9363..e9cceda 100644 --- a/README.md +++ b/README.md @@ -2,27 +2,26 @@ Test suite for FIDO2, U2F, and other security key functions -# Installation +# Setup Need python 3.6+. +`make venv` and `source venv/bin/activate` -``` -pip3 install -r requirements.txt -``` +Or simply `pip3 install --user -r requirements.txt` # Running the tests -Run all FIDO2, U2F, and HID tests. +Run all FIDO2, U2F, and HID tests: ``` -python -m pytest tests/standard +pytest tests/standard ``` -Run vendor/model specific tests. +Run vendor/model specific tests: ``` -python -m pytest tests/vendor +pytest tests/vendor ``` # Running against simulation @@ -30,7 +29,6 @@ python -m pytest tests/vendor To run tests against a "simulation" build of the Solo authenticator, supply the `--sim` option. ``` -python -m pytest tests/standard --sim +pytest --sim tests/standard ``` - diff --git a/requirements.txt b/requirements.txt index 3f494f0..a2d48d7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ -fido2 -solo-python +fido2 >=0.7.0 +pyscard pytest pytest-ordering -solo-python +solo-python >=0.0.12