diff options
-rw-r--r-- | Makefile | 8 | ||||
-rwxr-xr-x | tests/run-tests.scm | 27 |
2 files changed, 21 insertions, 14 deletions
@@ -13,7 +13,7 @@ GUILE_C_FLAGS = -Lmodule \ -Wmacro-use-before-definition -Warity-mismatch \ -Wduplicate-case-datum -Wbad-case-datum -all: $(GO_FILES) README static +all: go_files README static static: $(MAKE) -C static @@ -23,8 +23,10 @@ obj/%.go: module/%.scm @echo guild compile $< @guild compile $(GUILE_C_FLAGS) -o $@ $< +go_files: $(GO_FILES) + clean: - $(MAKE) -C static clean + -$(MAKE) -C static clean -rm -r obj install: all @@ -40,7 +42,7 @@ install: all README: README.in ./main text < README.in | sed "s/<<today>>/`date -I`/" > README -test: +test: go_files tests/run-tests.scm $(MAKE) coverage diff --git a/tests/run-tests.scm b/tests/run-tests.scm index 5aecdebb..dbe6dede 100755 --- a/tests/run-tests.scm +++ b/tests/run-tests.scm @@ -1,5 +1,13 @@ -#!/usr/bin/guile \ ---debug -s +#!/usr/bin/bash + +here=$(dirname $(realpath $0)) +export GUILE_LOAD_PATH=$(dirname $here)/module +export GUILE_LOAD_COMPILED_PATH=$(dirname $here)/obj +export GUILE_AUTO_COMPILE=0 + +make -C $(dirname $here) go_files + +exec guile --debug -s "$0" "$@" !# ;;; Commentary: @@ -32,9 +40,14 @@ ;; 2.2, anywhere for Guile 3.0). ;;; Code: -(eval-when (compile load) +(eval-when (compile load eval) (define here (dirname (current-filename)))) +(add-to-load-path (format #f "~a/module" (dirname here))) +(set! %load-compiled-path (cons (format #f "~a/obj" (dirname here)) + %load-compiled-path)) + + (use-modules (srfi srfi-64)) (define (µs x) @@ -100,16 +113,8 @@ runner) -;; (test-runner-current my-test-runner) (test-runner-factory construct-test-runner) - -(format #t "current filename = ~a~%" here) - - -(add-to-load-path (format #f "~a/module" - (dirname here))) - (use-modules (ice-9 ftw) (ice-9 sandbox) (ice-9 getopt-long) |