Add "make test" target to run pytest

This will create a virtualenv if required.

There is a bit of churn here reverting to autoconf 2.59 in generated
config.h.in and configure
This commit is contained in:
Matt Johnston
2021-10-18 14:24:32 +08:00
parent 65f6e48a06
commit 8b0d31ab20
5 changed files with 3020 additions and 4161 deletions

19
test/Makefile.in Normal file
View File

@@ -0,0 +1,19 @@
srcdir=@srcdir@
all: test
test: venv/bin/pytest fakekey
./venv/bin/pytest --hostkey=fakekey --dbclient=../dbclient --dropbear=../dropbear $(srcdir)
one: venv/bin/pytest fakekey
./venv/bin/pytest --hostkey=fakekey --dbclient=../dbclient --dropbear=../dropbear $(srcdir) -k exit
fakekey:
../dropbearkey -t ecdsa -f $@
venv/bin/pytest: $(srcdir)/requirements.txt
python3 -m venv init venv
./venv/bin/pip install --upgrade pip
./venv/bin/pip install -r $(srcdir)/requirements.txt
.PHONY: test