aboutsummaryrefslogtreecommitdiff
path: root/tests/run-tests.scm
blob: 529878c7523d5ce48e9219511744d260ae88e071 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/usr/bin/guile \
-s
!#

(eval-when (compile load)
 (define here (dirname (current-filename))))

(add-to-load-path (format #f "~a/module"
                          (dirname here)))


(use-modules (ice-9 ftw)
             (ice-9 sandbox))

(define files
  (scandir here
           (lambda (name)
             (and (< 2 (string-length name))
                  (not (string=? name (basename (current-filename))))
                  (string=? "scm" (string-take-right name 3))))))

(setenv "TESTPATH"
        (format #f "~a/testdata" (dirname here)))

(use-modules (srfi srfi-64))

;; Load tests

(add-to-load-path here)

(test-begin "tests")
(for-each load-from-path files)
(test-end "tests")