From 2dfdf71009289d5d89a5143014b07535ef9427b0 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Tue, 10 Sep 2024 16:19:47 +0100 Subject: Makefile: Add check target. * Makefile (GUILE, tests): New variable. (check): New target. * guix.scm (ravanan)[arguments]: Enable tests. --- Makefile | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index ad99e81..1eaecfa 100644 --- a/Makefile +++ b/Makefile @@ -19,6 +19,7 @@ project = ravanan GUILD ?= guild +GUILE ?= guile NODE ?= node SED ?= sed @@ -36,6 +37,7 @@ sources = $(wildcard $(top_level_module_dir)/*.scm) \ $(config_file) objects = $(sources:.scm=.go) scripts = $(wildcard bin/*) +tests = $(wildcard tests/*.scm) $(wildcard tests/work/*.scm) scmdir = $(datarootdir)/guile/site/$(guile_effective_version) godir = $(libdir)/guile/$(guile_effective_version)/site-ccache @@ -50,6 +52,11 @@ all: $(objects) $(config_file) %.go: %.scm $(config_file) GUILE_AUTO_COMPILE=0 $(GUILD) compile -L . -o $@ $< +check: + for test in $(tests); do \ + $(GUILE) --no-auto-compile -L . $$test; \ + done + install: $(sources) $(objects) $(scripts) install -D $(scripts) --target-directory $(bindir) for source in $(sources); do \ -- cgit v1.2.3