blob: af4d84109f105e39361f109464d538724666de0c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
|
.POSIX:
N = `nproc`
.SUFFIXES:
.SUFFIXES: .in .sentinel
.in:
sed \
-e "s|@HOSTNAME@|`hostname`|g" \
< $< > $@
if [ -x $< ]; then chmod +x $@; fi
test-config-files = \
tests/internet/etc/postfix/main.cf \
tests/internet/etc/dkimproxyout.conf \
tests/internet/etc/dovecot/dovecot.conf \
derived-assets = \
queue.scm.sentinel \
packages.scm.sentinel \
local.scm.sentinel \
internet.scm.sentinel \
maintainer.key.sentinel \
$(test-config-files) \
side-assets = \
queue.scm \
queue.scm-* \
dynamic.scm \
packages.scm \
local.scm \
internet.scm \
all: $(derived-assets)
all: maintainer.key.sentinel
queue.scm.sentinel: src/org/euandre/queue.scm
packages.scm.sentinel: src/org/euandre/queue.scm src/org/euandre/packages.scm
local.scm.sentinel: src/org/euandre/queue.scm tests/local/system.scm
internet.scm.sentinel: src/org/euandre/queue.scm src/org/euandre/packages.scm \
tests/internet/system.scm
queue.scm.sentinel packages.scm.sentinel: Makefile
rm -f `basename $@ .sentinel`*
guix build -c$N -v3 -Lsrc -r`basename $@ .sentinel` -Kf src/org/euandre/`basename $@ .sentinel`
touch $@
local.scm.sentinel internet.scm.sentinel: queue.scm.sentinel packages.scm.sentinel
rm -f `basename $@ .sentinel`*
guix build -c$N -v3 -Lsrc -r`basename $@ .sentinel` -Kf tests/`basename $@ .scm.sentinel`/system.scm
touch $@
maintainer.key.sentinel: meta.capim
ID="`awk '$$1 == ":email" && $$0=$$2' meta.capim | tr -d '"'`" && \
gpg --export --armour "$$ID" | ifnew $*
touch $@
local-files = \
/etc/postfix/master.cf \
/etc/postfix/main.cf \
internet-files = \
$(local-files) \
/etc/sasl2/smtpd.conf \
/etc/dkimproxyout.conf \
/etc/dovecot/dovecot.conf \
check-guix-static-local: local.scm.sentinel $(test-config-files)
for f in $(local-files); do \
diff -U5 local.scm"$$f" tests/local"$$f"; \
done
check-guix-static-internet: internet.scm.sentinel $(test-config-files)
for f in $(internet-files); do \
diff -U5 internet.scm"$$f" tests/internet"$$f"; \
done
check-guix-static: check-guix-static-local check-guix-static-internet
check-guix-dynamic:
rm -f dynamic.scm*
guix build -c$N -v3 -Lsrc -r dynamic.scm -Km tests/internet/tests.scm
check-guix: check-guix-static check-guix-dynamic
check-unit: check-guix
check-integration:
## Run all tests. Each test suite is isolated, so that a parallel
## build can run tests at the same time. The required artifacts
## are created if missing.
check: check-unit check-integration
## Remove *all* derived artifacts produced during the build.
## A dedicated test asserts that this is always true.
clean:
rm -rf $(derived-assets) $(side-assets)
ALWAYS:
|