docs: document Tor unlock, e2e tests, and make targets
README: Tor onion unlock feature + security note, the rootless and QEMU end-to-end tests and how to run them, project-structure entries, and a correction that PyYAML>=6 is required (not stdlib-only) on the package-manager/symlink install path. Makefile: test-tor, test-qemu and test-all targets, with an overridable PYTHON interpreter. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
22
Makefile
22
Makefile
@@ -1,6 +1,9 @@
|
||||
.PHONY: install test
|
||||
.PHONY: install test test-tor test-qemu test-all
|
||||
|
||||
PREFIX ?= $(HOME)/.local
|
||||
# Interpreter used for the tests. Override if your active venv lacks pytest,
|
||||
# e.g. make test PYTHON=/usr/bin/python3
|
||||
PYTHON ?= python3
|
||||
|
||||
install:
|
||||
chmod +x main.py
|
||||
@@ -8,5 +11,20 @@ install:
|
||||
ln -sf $(CURDIR)/main.py $(PREFIX)/bin/lim
|
||||
@echo "Installed lim to $(PREFIX)/bin/lim"
|
||||
|
||||
# Default suite: fully mocked, no root/QEMU/network. The opt-in e2e tests skip.
|
||||
test:
|
||||
python3 -m pytest
|
||||
$(PYTHON) -m pytest
|
||||
|
||||
# Rootless Tor onion unlock e2e (needs the `tor` binary and network access).
|
||||
test-tor:
|
||||
LIM_E2E_TOR=1 $(PYTHON) -m pytest tests/e2e/test_tor_unlock_e2e.py -v
|
||||
|
||||
# Full virtualized build+boot+unlock e2e. Needs qemu, arch-install-scripts,
|
||||
# cryptsetup, tor and ncat; the build stage runs under sudo. Set CHUTNEY_PATH
|
||||
# to use a private, offline Tor network instead of the public one.
|
||||
test-qemu:
|
||||
LIM_E2E_QEMU=1 $(PYTHON) -m pytest tests/e2e/test_qemu_unlock_e2e.py -v -s
|
||||
|
||||
# Everything: mocked suite plus both opt-in e2e stages, in one run.
|
||||
test-all:
|
||||
LIM_E2E_TOR=1 LIM_E2E_QEMU=1 $(PYTHON) -m pytest -v -s
|
||||
|
||||
Reference in New Issue
Block a user