summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMatt Johnston <matt@codeconstruct.com.au>2021-10-18 14:24:32 +0800
committerMatt Johnston <matt@codeconstruct.com.au>2021-10-18 14:24:32 +0800
commit5338a1d314ca3b67d8ac42d80fc32f8c0f1de9c6 (patch)
tree773962134cb9de52f24f1faed25e4b1188d91592 /test
parent32d498cec3bd943bf01b83fe8ac90efe08663b96 (diff)
downloaddropbear-5338a1d314ca3b67d8ac42d80fc32f8c0f1de9c6.tar.gz
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
Diffstat (limited to 'test')
-rw-r--r--test/Makefile.in19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/Makefile.in b/test/Makefile.in
new file mode 100644
index 0000000..441ac41
--- /dev/null
+++ b/test/Makefile.in
@@ -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