aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Isaac2024-09-10 16:19:47 +0100
committerArun Isaac2024-09-10 16:47:44 +0100
commit2dfdf71009289d5d89a5143014b07535ef9427b0 (patch)
tree467269b32c3980e6583ab5c3ce6562e5613f2fb6
parentdfe38b09b4628d69ceb0840f721cf2a177bea3ce (diff)
downloadravanan-2dfdf71009289d5d89a5143014b07535ef9427b0.tar.gz
ravanan-2dfdf71009289d5d89a5143014b07535ef9427b0.tar.lz
ravanan-2dfdf71009289d5d89a5143014b07535ef9427b0.zip
Makefile: Add check target.
* Makefile (GUILE, tests): New variable. (check): New target. * guix.scm (ravanan)[arguments]: Enable tests.
-rw-r--r--.guix/ravanan-package.scm3
-rw-r--r--Makefile7
2 files changed, 8 insertions, 2 deletions
diff --git a/.guix/ravanan-package.scm b/.guix/ravanan-package.scm
index 02a366b..f3e88aa 100644
--- a/.guix/ravanan-package.scm
+++ b/.guix/ravanan-package.scm
@@ -40,8 +40,7 @@
#:select? (or (git-predicate (dirname (current-source-directory)))
(const #t))))
(arguments
- (list #:tests? #f
- #:make-flags #~(list (string-append "prefix=" #$output))
+ (list #:make-flags #~(list (string-append "prefix=" #$output))
#:modules `(((guix build guile-build-system)
#:select (target-guile-effective-version))
,@%gnu-build-system-modules)
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 \