.POSIX: N = `nproc` .SUFFIXES: .SUFFIXES: .in .sentinel .in: sed \ -e "s|@HOSTNAME@|`hostname`|g" \ < $< > $@ if [ -x $< ]; then chmod +x $@; fi all: include deps.mk test-config-files-local = \ test-config-files-internet = \ test-config-files = \ $(test-config-files-local) \ $(test-config-files-internet) \ derived-assets = \ packages.scm.sentinel \ local.scm.sentinel \ internet.scm.sentinel \ maintainer.key.sentinel \ $(test-config-files) \ side-assets = \ dynamic.scm \ packages.scm \ local.scm \ internet.scm \ tests/cert/ \ all: $(derived-assets) $(test-config-files): Makefile deps.mk local.scm.sentinel: tests/local/system.scm internet.scm.sentinel: tests/internet/system.scm packages.scm.sentinel: src/org/euandre/packages.scm Makefile deps.mk rm -f packages.scm guix build -c$N -v3 -Lsrc -r packages.scm -Kf src/org/euandre/packages.scm touch $@ local.scm.sentinel internet.scm.sentinel: packages.scm.sentinel rm -f $* guix build -c$N -v3 -Lsrc -r $* -Kf tests/`basename $* .scm`/system.scm touch $@ maintainer.key.sentinel: email.txt gpg --export --armour "`cat email.txt`" | ifnew $* touch $@ check-guile: guix repl -L src/ tests/unit.scm check-unit: check-guile local-files = \ internet-files = \ $(local-files) \ check-guix-static-local: local.scm.sentinel $(test-config-files-local) 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-internet) 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/tests.scm check-guix: check-guix-static check-guix-dynamic check-integration: check-guix ## 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: