From 5b85b1368f81b7eed8efef9d07ae8c077bac73c4 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Fri, 17 Mar 2023 07:04:22 -0300 Subject: Test for expected output of Postfix config files --- Makefile | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 9cdb2db..26893ea 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,20 @@ .POSIX: +.SUFFIXES: +.SUFFIXES: .in + +.in: + sed \ + -e "s|@HOSTNAME@|`hostname`|g" \ + < $< > $@ + if [ -x $< ]; then chmod +x $@; fi + + all: EuAndreh.key guix nix + guix: guix-packages guix-services guix-packages: @@ -12,10 +23,16 @@ guix-packages: -f src/org/euandre/queue.scm \ guix-services-local: - guix system -v3 -Lsrc/ -K build tests/local-system.scm + rm -f result-local + guix system -v3 -Lsrc/ -K -r result-local build tests/local/system.scm + cmp -s result-local/etc/postfix/master.cf tests/local/master.cf + cmp -s result-local/etc/postfix/main.cf tests/local/main.cf -guix-services-internet: - guix system -v3 -Lsrc/ -K build tests/internet-system.scm +guix-services-internet: tests/internet/main.cf + rm -f result-internet + guix system -v3 -Lsrc/ -K -r result-internet build tests/internet/system.scm + cmp -s result-internet/etc/postfix/master.cf tests/internet/master.cf + cmp -s result-internet/etc/postfix/main.cf tests/internet/main.cf guix-services: guix-services-local guix-services-internet @@ -30,7 +47,7 @@ check: clean: rm -rf \ - result + result* .paku/ deb/ tests/internet/main.cf public: -- cgit v1.2.3