blob: f9d939c54a181815a94d213d3e2eacbe14919628 (
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
|
.POSIX:
N = `nproc`
.SUFFIXES:
.SUFFIXES: .in
.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/dovecot2/dovecot2.conf \
derived-assets = \
queue.scm.sentinel \
packages.scm.sentinel \
papo.scm.sentinel \
local.scm.sentinel \
internet.scm.sentinel \
$(test-config-files) \
side-assets = \
queue.scm \
queue.scm-0 \
queue.scm-1 \
packages.scm \
papo.scm \
local.scm \
internet.scm \
all: $(derived-assets)
queue.scm.sentinel: src/org/euandre/queue.scm
packages.scm.sentinel: src/org/euandre/queue.scm src/org/euandre/packages.scm
papo.scm.sentinel: src/org/euandre/queue.scm src/org/euandre/packages.scm \
src/org/euandre/papo.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 papo.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 $@
local-files = \
/etc/postfix/master.cf \
/etc/postfix/main.cf \
internet-files = \
$(local-files) \
/etc/sasl2/smtpd.conf \
/etc/dkimproxyout.conf \
/etc/dovecot2/dovecot2.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-local:
check-guix-internet:
check-guix: check-guix-local check-guix-internet
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:
|