From 0f9a7f5faf01de6b2a748c31f47ebf18788384f1 Mon Sep 17 00:00:00 2001 From: Isis Lovecruft Date: Mon, 3 Jun 2013 11:28:35 +0000 Subject: [PATCH] Redefine commands for running unittests in the Makefile. --- Makefile | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index 932f149..ac299af 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,8 @@ +SHELL=/bin/sh +TESTDIR=./gnupg/test +TESTHANDLE=$(TESTDIR)/test_gnupg.py +FILES=$(SHELL find ./gnupg/ -name "*.py" -printf "%p,") + .PHONY=all all: uninstall install test @@ -27,19 +32,22 @@ cleanup-build: mkdir buildnot rm -rf build* -test: cleanup-src cleanup-tests - which gpg - gpg --version - which gpg2 - gpg2 --version +test-before: cleanup-src cleanup-tests + which gpg && gpg --version + which gpg2 && gpg2 --version which gpg-agent which pinentry - which python - python --version - which pip - pip --version - pip list - python tests/test_gnupg.py parsers basic encodings genkey sign listkeys crypt keyrings import + which python && python --version + which pip && pip --version && pip list + +test: test-before + python $(TESTHANDLE) basic encodings parsers keyrings listkeys genkey \ + sign crypt + touch gnupg/test/placeholder.log + mv gnupg/test/*.log gnupg/test/logs/ + rm gnupg/test/logs/placeholder.log + touch gnupg/test/random_seed_is_sekritly_pi + rm gnupg/test/random_seed* install: python setup.py install --record installed-files.txt