From f42a0c193528b74777faef18683a8794d7cbb848 Mon Sep 17 00:00:00 2001 From: Josef Friedrich Date: Mon, 12 Sep 2016 17:49:46 +0200 Subject: [PATCH] Improve 'make clean' (#323) Remove also all temporary test files. A new test can be started without reclone the repository. --- Makefile | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 8a57f039..93441c23 100644 --- a/Makefile +++ b/Makefile @@ -80,6 +80,7 @@ run: sleep 20 fixtures: + cp config/postfix-accounts.cf config/postfix-accounts.cf.bak # Setup sieve & create filtering folder (INBOX/spam) docker cp "`pwd`/test/config/sieve/dovecot.sieve" mail:/var/mail/localhost.localdomain/user1/.dovecot.sieve docker exec mail /bin/sh -c "maildirmake.dovecot /var/mail/localhost.localdomain/user1/.INBOX.spam" @@ -105,4 +106,21 @@ tests: clean: # Remove running test containers - docker rm -f mail mail_pop3 mail_smtponly mail_fail2ban mail_fetchmail fail-auth-mailer mail_disabled_amavis mail_disabled_clamav mail_manual_ssl + -docker rm -f \ + mail \ + mail_pop3 \ + mail_smtponly \ + mail_fail2ban \ + mail_fetchmail \ + fail-auth-mailer \ + mail_disabled_amavis \ + mail_disabled_clamav \ + mail_manual_ssl + @if [ -f config/postfix-accounts.cf.bak ]; then\ + rm -f config/postfix-accounts.cf ;\ + mv config/postfix-accounts.cf.bak config/postfix-accounts.cf ;\ + fi + -rm -rf test/onedir \ + test/config/empty \ + test/config/without-accounts \ + test/config/without-virtual