summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathieu Lirzin <mthl@gnu.org>2015-10-26 23:47:24 +0100
committerMathieu Lirzin <mthl@gnu.org>2016-04-03 14:19:09 +0200
commita9edb211e733b8b34e67ec3b4450567e9376986f (patch)
tree9f441abf268b24b2deb928d7880aa974e434672f
parente25f017422899c3e43cf42e254f46053bf4c4243 (diff)
build: Add a Guile custom test driver using SRFI-64.
Before that '.log' files for scheme tests were fragmented and not included in test-suite.log. This unifies the semantics of SRFI-64 API with Automake test suite. * build-aux/test-driver.scm: New file. * Makefile.am (SCM_LOG_DRIVER, AM_SCM_LOG_DRIVER_FLAGS): New variables. (SCM_LOG_COMPILER, AM_SCM_LOG_FLAGS): Delete variables. (AM_TESTS_ENVIRONMENT): Set GUILE_AUTO_COMPILE to 0. * test-env.in: Silence guix-daemon. * doc/guix.texi (Running the Test Suite): Describe how to display the detailed results. Bug reports require only 'test-suite.log' file. * tests/base32.scm, tests/build-utils.scm, tests/builders.scm, tests/challenge.scm, tests/cpan.scm, tests/cpio.scm, tests/cran.scm, tests/cve.scm, tests/derivations.scm, tests/elpa.scm, tests/file-systems.scm, tests/gem.scm, tests/gexp.scm, tests/gnu-maintenance.scm, tests/grafts.scm, tests/graph.scm, tests/gremlin.scm, tests/hackage.scm, tests/hash.scm, tests/import-utils.scm, tests/lint.scm, tests/monads.scm, tests/nar.scm, tests/packages.scm, tests/pk-crypto.scm, tests/pki.scm, tests/profiles.scm, tests/publish.scm, tests/pypi.scm, tests/records.scm, tests/scripts-build.scm, tests/scripts.scm, tests/services.scm, tests/sets.scm, tests/size.scm, tests/snix.scm, tests/store.scm, tests/substitute.scm, tests/syscalls.scm, tests/system.scm, tests/ui.scm, tests/union.scm, tests/upstream.scm, tests/utils.scm: Don't exit at the end of test groups. * tests/containers.scm: Likewise. Use 'test-skip' instead of exiting with error code 77.
-rw-r--r--Makefile.am7
-rw-r--r--build-aux/test-driver.scm189
-rw-r--r--doc/guix.texi16
-rw-r--r--test-env.in4
-rw-r--r--tests/base32.scm3
-rw-r--r--tests/build-utils.scm3
-rw-r--r--tests/builders.scm3
-rw-r--r--tests/challenge.scm3
-rw-r--r--tests/containers.scm9
-rw-r--r--tests/cpan.scm3
-rw-r--r--tests/cpio.scm3
-rw-r--r--tests/cran.scm3
-rw-r--r--tests/cve.scm3
-rw-r--r--tests/derivations.scm3
-rw-r--r--tests/elpa.scm3
-rw-r--r--tests/file-systems.scm3
-rw-r--r--tests/gem.scm3
-rw-r--r--tests/gexp.scm3
-rw-r--r--tests/gnu-maintenance.scm3
-rw-r--r--tests/grafts.scm3
-rw-r--r--tests/graph.scm3
-rw-r--r--tests/gremlin.scm3
-rw-r--r--tests/hackage.scm3
-rw-r--r--tests/hash.scm3
-rw-r--r--tests/import-utils.scm3
-rw-r--r--tests/lint.scm3
-rw-r--r--tests/monads.scm3
-rw-r--r--tests/nar.scm3
-rw-r--r--tests/packages.scm3
-rw-r--r--tests/pk-crypto.scm3
-rw-r--r--tests/pki.scm3
-rw-r--r--tests/profiles.scm3
-rw-r--r--tests/publish.scm3
-rw-r--r--tests/pypi.scm3
-rw-r--r--tests/records.scm3
-rw-r--r--tests/scripts-build.scm3
-rw-r--r--tests/scripts.scm3
-rw-r--r--tests/services.scm3
-rw-r--r--tests/sets.scm3
-rw-r--r--tests/size.scm3
-rw-r--r--tests/snix.scm3
-rw-r--r--tests/store.scm3
-rw-r--r--tests/substitute.scm3
-rw-r--r--tests/syscalls.scm3
-rw-r--r--tests/system.scm3
-rw-r--r--tests/ui.scm3
-rw-r--r--tests/union.scm3
-rw-r--r--tests/upstream.scm3
-rw-r--r--tests/utils.scm3
49 files changed, 211 insertions, 146 deletions
diff --git a/Makefile.am b/Makefile.am
index 06700def934..4b665a628a8 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -293,10 +293,11 @@ endif BUILD_DAEMON
293 293
294TESTS = $(SCM_TESTS) $(SH_TESTS) 294TESTS = $(SCM_TESTS) $(SH_TESTS)
295 295
296AM_TESTS_ENVIRONMENT = abs_top_srcdir="$(abs_top_srcdir)" 296AM_TESTS_ENVIRONMENT = abs_top_srcdir="$(abs_top_srcdir)" GUILE_AUTO_COMPILE=0
297 297
298SCM_LOG_COMPILER = $(top_builddir)/test-env $(GUILE) 298SCM_LOG_DRIVER = $(top_builddir)/test-env $(GUILE) --no-auto-compile \
299AM_SCM_LOG_FLAGS = --no-auto-compile -L "$(top_srcdir)" 299 -e main $(top_srcdir)/build-aux/test-driver.scm
300AM_SCM_LOG_DRIVER_FLAGS = --brief=yes
300 301
301SH_LOG_COMPILER = $(top_builddir)/test-env $(SHELL) 302SH_LOG_COMPILER = $(top_builddir)/test-env $(SHELL)
302AM_SH_LOG_FLAGS = -x -e 303AM_SH_LOG_FLAGS = -x -e
diff --git a/build-aux/test-driver.scm b/build-aux/test-driver.scm
new file mode 100644
index 00000000000..e9cc2cb24c9
--- /dev/null
+++ b/build-aux/test-driver.scm
@@ -0,0 +1,189 @@
1;;;; test-driver.scm - Guile test driver for Automake testsuite harness
2
3(define script-version "2016-04-03.12") ;UTC
4
5;;; Copyright © 2015, 2016 Mathieu Lirzin <mthl@gnu.org>
6;;;
7;;; This program is free software; you can redistribute it and/or modify it
8;;; under the terms of the GNU General Public License as published by
9;;; the Free Software Foundation; either version 3 of the License, or (at
10;;; your option) any later version.
11;;;
12;;; This program is distributed in the hope that it will be useful, but
13;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15;;; GNU General Public License for more details.
16;;;
17;;; You should have received a copy of the GNU General Public License
18;;; along with this program. If not, see <http://www.gnu.org/licenses/>.
19
20;;;; Commentary:
21;;;
22;;; This script provides a Guile test driver using the SRFI-64 Scheme API for
23;;; test suites. SRFI-64 is distributed with Guile since version 2.0.9.
24;;;
25;;;; Code:
26
27(use-modules (ice-9 getopt-long)
28 (ice-9 pretty-print)
29 (srfi srfi-26)
30 (srfi srfi-64))
31
32(define (show-help)
33 (display "Usage:
34 test-driver --test-name=NAME --log-file=PATH --trs-file=PATH
35 [--expect-failure={yes|no}] [--color-tests={yes|no}]
36 [--enable-hard-errors={yes|no}] [--brief={yes|no}}] [--]
37 TEST-SCRIPT [TEST-SCRIPT-ARGUMENTS]
38The '--test-name', '--log-file' and '--trs-file' options are mandatory.\n"))
39
40(define %options
41 '((test-name (value #t))
42 (log-file (value #t))
43 (trs-file (value #t))
44 (color-tests (value #t))
45 (expect-failure (value #t)) ;XXX: not implemented yet
46 (enable-hard-errors (value #t)) ;not implemented in SRFI-64
47 (brief (value #t))
48 (help (single-char #\h) (value #f))
49 (version (single-char #\V) (value #f))))
50
51(define (option->boolean options key)
52 "Return #t if the value associated with KEY in OPTIONS is \"yes\"."
53 (and=> (option-ref options key #f) (cut string=? <> "yes")))
54
55(define* (test-display field value #:optional (port (current-output-port))
56 #:key pretty?)
57 "Display \"FIELD: VALUE\\n\" on PORT."
58 (if pretty?
59 (begin
60 (format port "~A:~%" field)
61 (pretty-print value port #:per-line-prefix "+ "))
62 (format port "~A: ~A~%" field value)))
63
64(define* (result->string symbol #:key colorize?)
65 "Return SYMBOL as an upper case string. Use colors when COLORIZE is #t."
66 (let ((result (string-upcase (symbol->string symbol))))
67 (if colorize?
68 (string-append (case symbol
69 ((pass) "") ;green
70 ((xfail) "") ;light green
71 ((skip) "") ;blue
72 ((fail xpass) "") ;red
73 ((error) "")) ;magenta
74 result
75 "") ;no color
76 result)))
77
78(define* (test-runner-gnu test-name #:key color? brief? out-port trs-port)
79 "Return an custom SRFI-64 test runner. TEST-NAME is a string specifying the
80file name of the current the test. COLOR? specifies whether to use colors,
81and BRIEF?, well, you know. OUT-PORT and TRS-PORT must be output ports. The
82current output port is supposed to be redirected to a '.log' file."
83
84 (define (test-on-test-begin-gnu runner)
85 ;; Procedure called at the start of an individual test case, before the
86 ;; test expression (and expected value) are evaluated.
87 (let ((result (cute assq-ref (test-result-alist runner) <>)))
88 (test-display "test-name" (result 'test-name))
89 (test-display "location"
90 (string-append (result 'source-file) ":"
91 (number->string (result 'source-line))))
92 (test-display "source" (result 'source-form) #:pretty? #t)))
93
94 (define (test-on-test-end-gnu runner)
95 ;; Procedure called at the end of an individual test case, when the result
96 ;; of the test is available.
97 (let* ((results (test-result-alist runner))
98 (result? (cut assq <> results))
99 (result (cut assq-ref results <>)))
100 (unless brief?
101 ;; Display the result of each test case on the console.
102 (test-display
103 (result->string (test-result-kind runner) #:colorize? color?)
104 (string-append test-name " - " (test-runner-test-name runner))
105 out-port))
106 (when (result? 'expected-value)
107 (test-display "expected-value" (result 'expected-value)))
108 (when (result? 'expected-error)
109 (test-display "expected-error" (result 'expected-error) #:pretty? #t))
110 (when (result? 'actual-value)
111 (test-display "actual-value" (result 'actual-value)))
112 (when (result? 'actual-error)
113 (test-display "actual-error" (result 'actual-error) #:pretty? #t))
114 (test-display "result" (result->string (result 'result-kind)))
115 (newline)
116 (test-display ":test-result"
117 (string-append (result->string (test-result-kind runner))
118 " " (test-runner-test-name runner))
119 trs-port)))
120
121 (define (test-on-group-end-gnu runner)
122 ;; Procedure called by a 'test-end', including at the end of a test-group.
123 (let ((fail (or (positive? (test-runner-fail-count runner))
124 (positive? (test-runner-xpass-count runner))))
125 (skip (or (positive? (test-runner-skip-count runner))
126 (positive? (test-runner-xfail-count runner)))))
127 ;; XXX: The global results need some refinements for XPASS.
128 (test-display ":global-test-result"
129 (if fail "FAIL" (if skip "SKIP" "PASS"))
130 trs-port)
131 (test-display ":recheck"
132 (if fail "yes" "no")
133 trs-port)
134 (test-display ":copy-in-global-log"
135 (if (or fail skip) "yes" "no")
136 trs-port)
137 (when brief?
138 ;; Display the global test group result on the console.
139 (test-display (result->string (if fail 'fail (if skip 'skip 'pass))
140 #:colorize? color?)
141 test-name
142 out-port))
143 #f))
144
145 (let ((runner (test-runner-null)))
146 (test-runner-on-test-begin! runner test-on-test-begin-gnu)
147 (test-runner-on-test-end! runner test-on-test-end-gnu)
148 (test-runner-on-group-end! runner test-on-group-end-gnu)
149 (test-runner-on-bad-end-name! runner test-on-bad-end-name-simple)
150 runner))
151
152
153;;;
154;;; Entry point.
155;;;
156
157(define (main . args)
158 (let* ((opts (getopt-long (command-line) %options))
159 (option (cut option-ref opts <> <>)))
160 (cond
161 ((option 'help #f) (show-help))
162 ((option 'version #f) (format #t "test-driver.scm ~A" script-version))
163 (else
164 (let ((log (open-file (option 'log-file "") "w0"))
165 (trs (open-file (option 'trs-file "") "wl"))
166 (out (duplicate-port (current-output-port) "wl")))
167 (redirect-port log (current-output-port))
168 (redirect-port log (current-warning-port))
169 (redirect-port log (current-error-port))
170 (test-with-runner
171 (test-runner-gnu (option 'test-name #f)
172 #:color? (option->boolean opts 'color-tests)
173 #:brief? (option->boolean opts 'brief)
174 #:out-port out #:trs-port trs)
175 (load-from-path (option 'test-name #f)))
176 (close-port log)
177 (close-port trs)
178 (close-port out))))
179 (exit 0)))
180
181;;; Local Variables:
182;;; eval: (add-hook 'write-file-functions 'time-stamp)
183;;; time-stamp-start: "(define script-version \""
184;;; time-stamp-format: "%:y-%02m-%02d.%02H"
185;;; time-stamp-time-zone: "UTC"
186;;; time-stamp-end: "\") ;UTC"
187;;; End:
188
189;;;; test-driver.scm ends here.
diff --git a/doc/guix.texi b/doc/guix.texi
index c5b13e0572a..a34d547f7cf 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -596,12 +596,18 @@ It is also possible to run a subset of the tests by defining the
596make check TESTS="tests/store.scm tests/cpio.scm" 596make check TESTS="tests/store.scm tests/cpio.scm"
597@end example 597@end example
598 598
599By default, tests results are displayed at a file level. In order to
600see the details of every individual test cases, it is possible to define
601the @code{SCM_LOG_DRIVER_FLAGS} makefile variable as in this example:
602
603@example
604make check TESTS="tests/base64.scm" SCM_LOG_DRIVER_FLAGS="--brief=no"
605@end example
606
599Upon failure, please email @email{bug-guix@@gnu.org} and attach the 607Upon failure, please email @email{bug-guix@@gnu.org} and attach the
600@file{test-suite.log} file. When @file{tests/@var{something}.scm} 608@file{test-suite.log} file. Please specify the Guix version being used
601fails, please also attach the @file{@var{something}.log} file available 609as well as version numbers of the dependencies (@pxref{Requirements}) in
602in the top-level build directory. Please specify the Guix version being 610your message.
603used as well as version numbers of the dependencies
604(@pxref{Requirements}) in your message.
605 611
606@node Setting Up the Daemon 612@node Setting Up the Daemon
607@section Setting Up the Daemon 613@section Setting Up the Daemon
diff --git a/test-env.in b/test-env.in
index 799a62276f3..c3f60f7283b 100644
--- a/test-env.in
+++ b/test-env.in
@@ -31,6 +31,10 @@ unset CDPATH
31 31
32if [ -x "@abs_top_builddir@/guix-daemon" ] 32if [ -x "@abs_top_builddir@/guix-daemon" ]
33then 33then
34 # Silence the daemon's output, which is often useless, as well as that of
35 # Bash (such as "Terminated" messages when 'guix-daemon' is killed.)
36 exec 2> /dev/null
37
34 NIX_STORE_DIR="@GUIX_TEST_ROOT@/store" 38 NIX_STORE_DIR="@GUIX_TEST_ROOT@/store"
35 39
36 # Do that because store.scm calls `canonicalize-path' on it. 40 # Do that because store.scm calls `canonicalize-path' on it.
diff --git a/tests/base32.scm b/tests/base32.scm
index dcd926f4b8b..194f8da96b5 100644
--- a/tests/base32.scm
+++ b/tests/base32.scm
@@ -101,6 +101,3 @@
101 l)))) 101 l))))
102 102
103(test-end) 103(test-end)
104
105
106(exit (= (test-runner-fail-count (test-runner-current)) 0))
diff --git a/tests/build-utils.scm b/tests/build-utils.scm
index b0a4d1584a9..cc96738e367 100644
--- a/tests/build-utils.scm
+++ b/tests/build-utils.scm
@@ -141,6 +141,3 @@
141 (equal? str "hello world\n"))))) 141 (equal? str "hello world\n")))))
142 142
143(test-end) 143(test-end)
144
145
146(exit (= (test-runner-fail-count (test-runner-current)) 0))
diff --git a/tests/builders.scm b/tests/builders.scm
index a7c3e428305..bb9e0fa85b4 100644
--- a/tests/builders.scm
+++ b/tests/builders.scm
@@ -113,6 +113,3 @@
113 (file-exists? (string-append out "/bin/hello"))))) 113 (file-exists? (string-append out "/bin/hello")))))
114 114
115(test-end "builders") 115(test-end "builders")
116
117
118(exit (= (test-runner-fail-count (test-runner-current)) 0))
diff --git a/tests/challenge.scm b/tests/challenge.scm
index e53cacd3335..9505042a453 100644
--- a/tests/challenge.scm
+++ b/tests/challenge.scm
@@ -106,9 +106,6 @@
106 106
107(test-end) 107(test-end)
108 108
109
110(exit (= (test-runner-fail-count (test-runner-current)) 0))
111
112;;; Local Variables: 109;;; Local Variables:
113;;; eval: (put 'with-derivation-narinfo* 'scheme-indent-function 2) 110;;; eval: (put 'with-derivation-narinfo* 'scheme-indent-function 2)
114;;; End: 111;;; End:
diff --git a/tests/containers.scm b/tests/containers.scm
index 12982a64f7a..c11cdd1ce55 100644
--- a/tests/containers.scm
+++ b/tests/containers.scm
@@ -26,14 +26,14 @@
26(define (assert-exit x) 26(define (assert-exit x)
27 (primitive-exit (if x 0 1))) 27 (primitive-exit (if x 0 1)))
28 28
29(test-begin "containers")
30
29;; Skip these tests unless user namespaces are available and the setgroups 31;; Skip these tests unless user namespaces are available and the setgroups
30;; file (introduced in Linux 3.19 to address a security issue) exists. 32;; file (introduced in Linux 3.19 to address a security issue) exists.
31(unless (and (user-namespace-supported?) 33(unless (and (user-namespace-supported?)
32 (unprivileged-user-namespace-supported?) 34 (unprivileged-user-namespace-supported?)
33 (setgroups-supported?)) 35 (setgroups-supported?))
34 (exit 77)) 36 (test-skip 7))
35
36(test-begin "containers")
37 37
38(test-assert "call-with-container, exit with 0 when there is no error" 38(test-assert "call-with-container, exit with 0 when there is no error"
39 (zero? 39 (zero?
@@ -142,6 +142,3 @@
142 (zero? result))))))) 142 (zero? result)))))))
143 143
144(test-end) 144(test-end)
145
146
147(exit (= (test-runner-fail-count (test-runner-current)) 0))
diff --git a/tests/cpan.scm b/tests/cpan.scm
index 583684104da..5d56f0bd2b4 100644
--- a/tests/cpan.scm
+++ b/tests/cpan.scm
@@ -98,6 +98,3 @@
98 (pk 'fail x #f))))) 98 (pk 'fail x #f)))))
99 99
100(test-end "cpan") 100(test-end "cpan")
101
102
103(exit (= (test-runner-fail-count (test-runner-current)) 0))
diff --git a/tests/cpio.scm b/tests/cpio.scm
index cf65f9808d9..516de0655b3 100644
--- a/tests/cpio.scm
+++ b/tests/cpio.scm
@@ -79,6 +79,3 @@
79 (stat:size (stat file)))))))))))))) 79 (stat:size (stat file))))))))))))))
80 80
81(test-end "cpio") 81(test-end "cpio")
82
83
84(exit (= (test-runner-fail-count (test-runner-current)) 0))
diff --git a/tests/cran.scm b/tests/cran.scm
index 83d2e7f5547..896c5af06ce 100644
--- a/tests/cran.scm
+++ b/tests/cran.scm
@@ -131,6 +131,3 @@ lines. And: this line continues the description.")
131 (pk 'fail x #f)))))) 131 (pk 'fail x #f))))))
132 132
133(test-end "cran") 133(test-end "cran")
134
135
136(exit (= (test-runner-fail-count (test-runner-current)) 0))
diff --git a/tests/cve.scm b/tests/cve.scm
index 26bc560e52d..26e710ce707 100644
--- a/tests/cve.scm
+++ b/tests/cve.scm
@@ -64,6 +64,3 @@
64 (lookup "openoffice.org" "2.3.0")))) 64 (lookup "openoffice.org" "2.3.0"))))
65 65
66(test-end "cve") 66(test-end "cve")
67
68
69(exit (= (test-runner-fail-count (test-runner-current)) 0))
diff --git a/tests/derivations.scm b/tests/derivations.scm
index a52142e0f1d..cb7196e2a9a 100644
--- a/tests/derivations.scm
+++ b/tests/derivations.scm
@@ -1008,6 +1008,3 @@
1008 (call-with-input-file out get-string-all)))) 1008 (call-with-input-file out get-string-all))))
1009 1009
1010(test-end) 1010(test-end)
1011
1012
1013(exit (= (test-runner-fail-count (test-runner-current)) 0))
diff --git a/tests/elpa.scm b/tests/elpa.scm
index e8adde3f079..46c6ac2d757 100644
--- a/tests/elpa.scm
+++ b/tests/elpa.scm
@@ -104,6 +104,3 @@ information about package NAME. (Function 'elpa-package-info'.)"
104 (eval-test-with-elpa "auctex")) 104 (eval-test-with-elpa "auctex"))
105 105
106(test-end "elpa") 106(test-end "elpa")
107
108
109(exit (= (test-runner-fail-count (test-runner-current)) 0))
diff --git a/tests/file-systems.scm b/tests/file-systems.scm
index c36509b2b03..aed27e89c25 100644
--- a/tests/file-systems.scm
+++ b/tests/file-systems.scm
@@ -51,6 +51,3 @@
51 (equal? form '(uuid "foobar")))))) 51 (equal? form '(uuid "foobar"))))))
52 52
53(test-end) 53(test-end)
54
55
56(exit (= (test-runner-fail-count (test-runner-current)) 0))
diff --git a/tests/gem.scm b/tests/gem.scm
index ebce8098404..0b37c701426 100644
--- a/tests/gem.scm
+++ b/tests/gem.scm
@@ -77,6 +77,3 @@
77 (pk 'fail x #f))))) 77 (pk 'fail x #f)))))
78 78
79(test-end "gem") 79(test-end "gem")
80
81
82(exit (= (test-runner-fail-count (test-runner-current)) 0))
diff --git a/tests/gexp.scm b/tests/gexp.scm
index 75b907abeea..db0ffd2fdd6 100644
--- a/tests/gexp.scm
+++ b/tests/gexp.scm
@@ -784,9 +784,6 @@
784 784
785(test-end "gexp") 785(test-end "gexp")
786 786
787
788(exit (= (test-runner-fail-count (test-runner-current)) 0))
789
790;; Local Variables: 787;; Local Variables:
791;; eval: (put 'test-assertm 'scheme-indent-function 1) 788;; eval: (put 'test-assertm 'scheme-indent-function 1)
792;; End: 789;; End:
diff --git a/tests/gnu-maintenance.scm b/tests/gnu-maintenance.scm
index e7296137dce..4f2f1ae9439 100644
--- a/tests/gnu-maintenance.scm
+++ b/tests/gnu-maintenance.scm
@@ -39,6 +39,3 @@
39 ("gnutls" "gnutls-3.2.18-w32.zip"))))) 39 ("gnutls" "gnutls-3.2.18-w32.zip")))))
40 40
41(test-end) 41(test-end)
42
43
44(exit (= (test-runner-fail-count (test-runner-current)) 0))
diff --git a/tests/grafts.scm b/tests/grafts.scm
index 4bc33709d61..afed704cdec 100644
--- a/tests/grafts.scm
+++ b/tests/grafts.scm
@@ -159,6 +159,3 @@
159 (string=? (readlink two) one)))))) 159 (string=? (readlink two) one))))))
160 160
161(test-end) 161(test-end)
162
163
164(exit (= (test-runner-fail-count (test-runner-current)) 0))
diff --git a/tests/graph.scm b/tests/graph.scm
index 4205b9b8c78..32317195d71 100644
--- a/tests/graph.scm
+++ b/tests/graph.scm
@@ -276,6 +276,3 @@ edges."
276 (list p1a p1b p0))))))) 276 (list p1a p1b p0)))))))
277 277
278(test-end "graph") 278(test-end "graph")
279
280
281(exit (= (test-runner-fail-count (test-runner-current)) 0))
diff --git a/tests/gremlin.scm b/tests/gremlin.scm
index dc9f78c21a5..2885554967b 100644
--- a/tests/gremlin.scm
+++ b/tests/gremlin.scm
@@ -64,6 +64,3 @@
64 "ORIGIN/foo"))) 64 "ORIGIN/foo")))
65 65
66(test-end "gremlin") 66(test-end "gremlin")
67
68
69(exit (= (test-runner-fail-count (test-runner-current)) 0))
diff --git a/tests/hackage.scm b/tests/hackage.scm
index b608ccd8663..d1ebe374055 100644
--- a/tests/hackage.scm
+++ b/tests/hackage.scm
@@ -160,6 +160,3 @@ library
160 (x (pk 'fail x #f)))) 160 (x (pk 'fail x #f))))
161 161
162(test-end "hackage") 162(test-end "hackage")
163
164
165(exit (= (test-runner-fail-count (test-runner-current)) 0))
diff --git a/tests/hash.scm b/tests/hash.scm
index 9bcd69440b3..80395499716 100644
--- a/tests/hash.scm
+++ b/tests/hash.scm
@@ -126,6 +126,3 @@ In Guile <= 2.0.9, CBIPs were always fully buffered, so the
126 (list hello hash world)))) 126 (list hello hash world))))
127 127
128(test-end) 128(test-end)
129
130
131(exit (= (test-runner-fail-count (test-runner-current)) 0))
diff --git a/tests/import-utils.scm b/tests/import-utils.scm
index 08365816d40..3b11875c4a7 100644
--- a/tests/import-utils.scm
+++ b/tests/import-utils.scm
@@ -34,6 +34,3 @@
34 (beautify-description "A function to establish world peace")) 34 (beautify-description "A function to establish world peace"))
35 35
36(test-end "import-utils") 36(test-end "import-utils")
37
38
39(exit (= (test-runner-fail-count (test-runner-current)) 0))
diff --git a/tests/lint.scm b/tests/lint.scm
index 54be50d1c1d..4f0196491d2 100644
--- a/tests/lint.scm
+++ b/tests/lint.scm
@@ -581,9 +581,6 @@ requests."
581 581
582(test-end "lint") 582(test-end "lint")
583 583
584
585(exit (= (test-runner-fail-count (test-runner-current)) 0))
586
587;; Local Variables: 584;; Local Variables:
588;; eval: (put 'with-http-server 'scheme-indent-function 1) 585;; eval: (put 'with-http-server 'scheme-indent-function 1)
589;; eval: (put 'with-warnings 'scheme-indent-function 0) 586;; eval: (put 'with-warnings 'scheme-indent-function 0)
diff --git a/tests/monads.scm b/tests/monads.scm
index 4112bcb6cfb..18bf4119bed 100644
--- a/tests/monads.scm
+++ b/tests/monads.scm
@@ -258,6 +258,3 @@
258 '()))) 258 '())))
259 259
260(test-end "monads") 260(test-end "monads")
261
262
263(exit (= (test-runner-fail-count (test-runner-current)) 0))
diff --git a/tests/nar.scm b/tests/nar.scm
index e24a638db98..9796980e350 100644
--- a/tests/nar.scm
+++ b/tests/nar.scm
@@ -320,9 +320,6 @@
320 320
321(test-end "nar") 321(test-end "nar")
322 322
323
324(exit (= (test-runner-fail-count (test-runner-current)) 0))
325
326;;; Local Variables: 323;;; Local Variables:
327;;; eval: (put 'with-file-tree 'scheme-indent-function 2) 324;;; eval: (put 'with-file-tree 'scheme-indent-function 2)
328;;; End: 325;;; End:
diff --git a/tests/packages.scm b/tests/packages.scm
index 823ede1f25a..94e8150b750 100644
--- a/tests/packages.scm
+++ b/tests/packages.scm
@@ -799,9 +799,6 @@
799 799
800(test-end "packages") 800(test-end "packages")
801 801
802
803(exit (= (test-runner-fail-count (test-runner-current)) 0))
804
805;;; Local Variables: 802;;; Local Variables:
806;;; eval: (put 'dummy-package 'scheme-indent-function 1) 803;;; eval: (put 'dummy-package 'scheme-indent-function 1)
807;;; End: 804;;; End:
diff --git a/tests/pk-crypto.scm b/tests/pk-crypto.scm
index f5008f32480..5024a15a43a 100644
--- a/tests/pk-crypto.scm
+++ b/tests/pk-crypto.scm
@@ -287,6 +287,3 @@
287 (canonical-sexp->sexp (sexp->canonical-sexp sexp)))) 287 (canonical-sexp->sexp (sexp->canonical-sexp sexp))))
288 288
289(test-end) 289(test-end)
290
291
292(exit (= (test-runner-fail-count (test-runner-current)) 0))
diff --git a/tests/pki.scm b/tests/pki.scm
index 51f2119466a..876ad98d736 100644
--- a/tests/pki.scm
+++ b/tests/pki.scm
@@ -119,6 +119,3 @@
119 (corrupt-signature 'c)))) 119 (corrupt-signature 'c))))
120 120
121(test-end) 121(test-end)
122
123
124(exit (= (test-runner-fail-count (test-runner-current)) 0))
diff --git a/tests/profiles.scm b/tests/profiles.scm
index 6714dfcaa76..fc1dfd2bfcc 100644
--- a/tests/profiles.scm
+++ b/tests/profiles.scm
@@ -320,9 +320,6 @@
320 320
321(test-end "profiles") 321(test-end "profiles")
322 322
323
324(exit (= (test-runner-fail-count (test-runner-current)) 0))
325
326;;; Local Variables: 323;;; Local Variables:
327;;; eval: (put 'dummy-package 'scheme-indent-function 1) 324;;; eval: (put 'dummy-package 'scheme-indent-function 1)
328;;; End: 325;;; End:
diff --git a/tests/publish.scm b/tests/publish.scm
index 6c710fe0a7b..6645286f5a8 100644
--- a/tests/publish.scm
+++ b/tests/publish.scm
@@ -121,6 +121,3 @@ References: ~a~%"
121 (response-code (http-get (publish-uri (string-append "/nar/invalid")))))) 121 (response-code (http-get (publish-uri (string-append "/nar/invalid"))))))
122 122
123(test-end "publish") 123(test-end "publish")
124
125
126(exit (= (test-runner-fail-count (test-runner-current)) 0))
diff --git a/tests/pypi.scm b/tests/pypi.scm
index cf351a542fc..e463467c411 100644
--- a/tests/pypi.scm
+++ b/tests/pypi.scm
@@ -106,6 +106,3 @@ baz > 13.37")
106 (pk 'fail x #f))))) 106 (pk 'fail x #f)))))
107 107
108(test-end "pypi") 108(test-end "pypi")
109
110
111(exit (= (test-runner-fail-count (test-runner-current)) 0))
diff --git a/tests/records.scm b/tests/records.scm
index 800ed038277..c6f85d4a81d 100644
--- a/tests/records.scm
+++ b/tests/records.scm
@@ -305,6 +305,3 @@ Description: 1st line,
305 '("a"))) 305 '("a")))
306 306
307(test-end) 307(test-end)
308
309
310(exit (= (test-runner-fail-count (test-runner-current)) 0))
diff --git a/tests/scripts-build.scm b/tests/scripts-build.scm
index cf9770e9520..e48c8da264c 100644
--- a/tests/scripts-build.scm
+++ b/tests/scripts-build.scm
@@ -103,6 +103,3 @@
103 (eq? dep findutils))))))))))) 103 (eq? dep findutils)))))))))))
104 104
105(test-end) 105(test-end)
106
107
108(exit (= (test-runner-fail-count (test-runner-current)) 0))
diff --git a/tests/scripts.scm b/tests/scripts.scm
index 3bf41aed4d8..39017109533 100644
--- a/tests/scripts.scm
+++ b/tests/scripts.scm
@@ -64,9 +64,6 @@
64 64
65(test-end "scripts") 65(test-end "scripts")
66 66
67
68(exit (= (test-runner-fail-count (test-runner-current)) 0))
69
70;;; Local Variables: 67;;; Local Variables:
71;;; eval: (put 'with-environment-variable 'scheme-indent-function 2) 68;;; eval: (put 'with-environment-variable 'scheme-indent-function 2)
72;;; End: 69;;; End:
diff --git a/tests/services.scm b/tests/services.scm
index 36355490775..477a197160c 100644
--- a/tests/services.scm
+++ b/tests/services.scm
@@ -119,6 +119,3 @@
119 (null? (e s3))))) 119 (null? (e s3)))))
120 120
121(test-end) 121(test-end)
122
123
124(exit (= (test-runner-fail-count (test-runner-current)) 0))
diff --git a/tests/sets.scm b/tests/sets.scm
index 0a895917653..cdb7efe1725 100644
--- a/tests/sets.scm
+++ b/tests/sets.scm
@@ -47,6 +47,3 @@
47 (set-contains? s3 b)))) 47 (set-contains? s3 b))))
48 48
49(test-end) 49(test-end)
50
51
52(exit (= (test-runner-fail-count (test-runner-current)) 0))
diff --git a/tests/size.scm b/tests/size.scm
index a1106045f84..fcd590283dc 100644
--- a/tests/size.scm
+++ b/tests/size.scm
@@ -88,9 +88,6 @@
88 88
89(test-end "size") 89(test-end "size")
90 90
91
92(exit (= (test-runner-fail-count (test-runner-current)) 0))
93
94;;; Local Variables: 91;;; Local Variables:
95;;; eval: (put 'match* 'scheme-indent-function 1) 92;;; eval: (put 'match* 'scheme-indent-function 1)
96;;; End: 93;;; End:
diff --git a/tests/snix.scm b/tests/snix.scm
index a66b2c7b60f..4c31e3389d9 100644
--- a/tests/snix.scm
+++ b/tests/snix.scm
@@ -71,6 +71,3 @@
71 (pk 'fail x #f)))) 71 (pk 'fail x #f))))
72 72
73(test-end "snix") 73(test-end "snix")
74
75
76(exit (= (test-runner-fail-count (test-runner-current)) 0))
diff --git a/tests/store.scm b/tests/store.scm
index f7db7df9665..eeadcb94f89 100644
--- a/tests/store.scm
+++ b/tests/store.scm
@@ -911,6 +911,3 @@
911 (path-info-deriver (query-path-info %store o)))))) 911 (path-info-deriver (query-path-info %store o))))))
912 912
913(test-end "store") 913(test-end "store")
914
915
916(exit (= (test-runner-fail-count (test-runner-current)) 0))
diff --git a/tests/substitute.scm b/tests/substitute.scm
index 9d907e7abf0..69b272f2bb4 100644
--- a/tests/substitute.scm
+++ b/tests/substitute.scm
@@ -275,9 +275,6 @@ a file for NARINFO."
275 275
276(test-end "substitute") 276(test-end "substitute")
277 277
278
279(exit (= (test-runner-fail-count (test-runner-current)) 0))
280
281;;; Local Variables: 278;;; Local Variables:
282;;; eval: (put 'with-narinfo 'scheme-indent-function 1) 279;;; eval: (put 'with-narinfo 'scheme-indent-function 1)
283;;; eval: (put 'test-quit 'scheme-indent-function 2) 280;;; eval: (put 'test-quit 'scheme-indent-function 2)
diff --git a/tests/syscalls.scm b/tests/syscalls.scm
index feeb74c11b5..8e24184fe2e 100644
--- a/tests/syscalls.scm
+++ b/tests/syscalls.scm
@@ -245,6 +245,3 @@
245 (lo (interface-address lo))))))) 245 (lo (interface-address lo)))))))
246 246
247(test-end) 247(test-end)
248
249
250(exit (= (test-runner-fail-count (test-runner-current)) 0))
diff --git a/tests/system.scm b/tests/system.scm
index 7e016a610b6..b935bd07ebc 100644
--- a/tests/system.scm
+++ b/tests/system.scm
@@ -72,6 +72,3 @@
72 (eq? gnu (operating-system-store-file-system os)))) 72 (eq? gnu (operating-system-store-file-system os))))
73 73
74(test-end) 74(test-end)
75
76
77(exit (= (test-runner-fail-count (test-runner-current)) 0))
diff --git a/tests/ui.scm b/tests/ui.scm
index f28e623ccfe..51577acb76f 100644
--- a/tests/ui.scm
+++ b/tests/ui.scm
@@ -250,6 +250,3 @@ Second line" 24))
250 (show-manifest-transaction store m t))))))))) 250 (show-manifest-transaction store m t)))))))))
251 251
252(test-end "ui") 252(test-end "ui")
253
254
255(exit (= (test-runner-fail-count (test-runner-current)) 0))
diff --git a/tests/union.scm b/tests/union.scm
index 22ba67ce995..cccf3971815 100644
--- a/tests/union.scm
+++ b/tests/union.scm
@@ -125,6 +125,3 @@
125 (eq? 'directory (stat:type (lstat "bin")))))))) 125 (eq? 'directory (stat:type (lstat "bin"))))))))
126 126
127(test-end) 127(test-end)
128
129
130(exit (= (test-runner-fail-count (test-runner-current)) 0))
diff --git a/tests/upstream.scm b/tests/upstream.scm
index eb18dd61931..6c86abe8179 100644
--- a/tests/upstream.scm
+++ b/tests/upstream.scm
@@ -44,6 +44,3 @@
44 '("ftp://example.org/foo-1.tar.xz.sig")))))) 44 '("ftp://example.org/foo-1.tar.xz.sig"))))))
45 45
46(test-end) 46(test-end)
47
48
49(exit (= (test-runner-fail-count (test-runner-current)) 0))
diff --git a/tests/utils.scm b/tests/utils.scm
index 67b37244511..6b7725554fa 100644
--- a/tests/utils.scm
+++ b/tests/utils.scm
@@ -336,6 +336,3 @@
336(test-end) 336(test-end)
337 337
338(false-if-exception (delete-file temp-file)) 338(false-if-exception (delete-file temp-file))
339
340
341(exit (= (test-runner-fail-count (test-runner-current)) 0))