summary refs log tree commit diff
path: root/gnu/tests/web.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/tests/web.scm')
-rw-r--r--gnu/tests/web.scm38
1 files changed, 11 insertions, 27 deletions
diff --git a/gnu/tests/web.scm b/gnu/tests/web.scm
index 518c9c1ff3..dd55aedf05 100644
--- a/gnu/tests/web.scm
+++ b/gnu/tests/web.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2017, 2020 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2017, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2017, 2019 Christopher Baines <mail@cbaines.net>
 ;;; Copyright © 2017, 2018 Clément Lassieur <clement@lassieur.org>
 ;;; Copyright © 2018 Pierre-Antoine Rouby <pierre-antoine.rouby@inria.fr>
@@ -113,9 +113,7 @@ HTTP-PORT."
           (define marionette
             (make-marionette (list #$vm)))
 
-          (mkdir #$output)
-          (chdir #$output)
-
+          (test-runner-current (system-test-runner #$output))
           (test-begin #$name)
 
           (test-assert #$(string-append name " service running")
@@ -150,8 +148,7 @@ HTTP-PORT."
                       marionette)))
                  '())
 
-          (test-end)
-          (exit (= (test-runner-fail-count (test-runner-current)) 0)))))
+          (test-end))))
 
   (gexp->derivation (string-append name "-test") test))
 
@@ -309,9 +306,7 @@ HTTP-PORT, along with php-fpm."
           (define marionette
             (make-marionette (list #$vm)))
 
-          (mkdir #$output)
-          (chdir #$output)
-
+          (test-runner-current (system-test-runner #$output))
           (test-begin "php-fpm")
 
           (test-assert "php-fpm running"
@@ -350,9 +345,7 @@ HTTP-PORT, along with php-fpm."
                   (and matches
                        (match:substring matches 0))))))
 
-          (test-end)
-
-          (exit (= (test-runner-fail-count (test-runner-current)) 0)))))
+          (test-end))))
 
   (gexp->derivation "php-fpm-test" test))
 
@@ -394,9 +387,7 @@ HTTP-PORT, along with php-fpm."
           (define marionette
             (make-marionette (list #$vm)))
 
-          (mkdir #$output)
-          (chdir #$output)
-
+          (test-runner-current (system-test-runner #$output))
           (test-begin #$name)
 
           (test-assert "hpcguix-web running"
@@ -422,8 +413,7 @@ HTTP-PORT, along with php-fpm."
                #:times 10
                #:delay 5)))
 
-          (test-end)
-          (exit (= (test-runner-fail-count (test-runner-current)) 0)))))
+          (test-end))))
 
   (gexp->derivation (string-append name "-test") test))
 
@@ -486,9 +476,7 @@ HTTP-PORT."
             ;; port 8080 in the host.
             (make-marionette (list #$vm)))
 
-          (mkdir #$output)
-          (chdir #$output)
-
+          (test-runner-current (system-test-runner #$output))
           (test-begin "tailon")
 
           (test-assert "service running"
@@ -512,8 +500,7 @@ HTTP-PORT."
              #:times 10
              #:delay 5))
 
-          (test-end)
-          (exit (= (test-runner-fail-count (test-runner-current)) 0)))))
+          (test-end))))
 
   (gexp->derivation "tailon-test" test))
 
@@ -630,9 +617,7 @@ HTTP-PORT."
           (define marionette
             (make-marionette (list #$vm)))
 
-          (mkdir #$output)
-          (chdir #$output)
-
+          (test-runner-current (system-test-runner #$output))
           (test-begin "patchwork")
 
           (test-assert "patchwork-postgresql-user-and-service started"
@@ -667,8 +652,7 @@ HTTP-PORT."
              #:times 10
              #:delay 5))
 
-          (test-end)
-          (exit (= (test-runner-fail-count (test-runner-current)) 0)))))
+          (test-end))))
 
   (gexp->derivation "patchwork-test" test))