aboutsummaryrefslogtreecommitdiff
path: root/tests/run-tests.scm
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2022-03-04 00:48:52 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2022-03-04 13:08:39 +0100
commit45de89eb99acb2631f81dda72080245c5a17e729 (patch)
treea5386308f18e9bba16f9724f871c68b22239c946 /tests/run-tests.scm
parentExplicitly format unbound-variable errors. (diff)
downloadcalp-45de89eb99acb2631f81dda72080245c5a17e729.tar.gz
calp-45de89eb99acb2631f81dda72080245c5a17e729.tar.xz
Tests now use our local compiled files.
Previously there was a bunch of errors with the tests, where they tried to compile everything automatically, which usually went rather poorly due to it being in --debug mode.
Diffstat (limited to 'tests/run-tests.scm')
-rwxr-xr-xtests/run-tests.scm27
1 files changed, 16 insertions, 11 deletions
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)