forked from Disroot/gpg-lacre
Piotr F. Mieszkowski
2cf60dec40
Extract a function to calculate GPG commands to be executed and cover it with unit tests.
32 lines
588 B
Makefile
32 lines
588 B
Makefile
PYTHON = python2.7
|
|
|
|
.PHONY: test pre-clean clean
|
|
|
|
#
|
|
# Run a set of end-to-end tests.
|
|
#
|
|
# Test scenarios are described and configured by the test/e2e.ini
|
|
# file. Basically this is just a script that feeds GPG Mailgate with
|
|
# known input and checks whether output meets expectations.
|
|
#
|
|
test: test/tmp test/logs pre-clean
|
|
$(PYTHON) test/e2e_test.py
|
|
|
|
#
|
|
# Run unit tests
|
|
#
|
|
unittest:
|
|
$(PYTHON) -m unittest discover -s test
|
|
|
|
pre-clean:
|
|
rm -fv test/gpg-mailgate.conf
|
|
rm -f test/logs/*.log
|
|
|
|
test/tmp:
|
|
mkdir test/tmp
|
|
|
|
test/logs:
|
|
mkdir test/logs
|
|
|
|
clean: pre-clean
|
|
rm -rfv test/tmp test/logs
|