r-build-system: Fail the build on test errors.

* guix/build-system/r.scm (r-build): Accept optional TEST-TYPES argument and
pass it to the build phases.
* guix/build/r-build-system.scm (check): Exit R with the return value of
tools:::testInstalledPackage; stop the test suite on the first error; respect
TEST-TYPES argument; dump logs on test failure.

Change-Id: Ia83407ceb2ef2a92cfa02f3a3d661f54cf8c8b40
This commit is contained in:
Ricardo Wurmus 2024-11-14 14:30:22 +01:00
parent 9fe7e91373
commit 0f18c1e3fa
No known key found for this signature in database
GPG key ID: 197A5888235FACAC
2 changed files with 19 additions and 6 deletions

View file

@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2015-2023 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2015-2024 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2021 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
@ -107,6 +107,7 @@ release corresponding to NAME and VERSION."
source
(tests? #t)
(test-target "tests")
(test-types #f)
(configure-flags ''())
(phases '%standard-phases)
(outputs '("out"))
@ -128,6 +129,7 @@ release corresponding to NAME and VERSION."
#:system #$system
#:tests? #$tests?
#:test-target #$test-target
#:test-types #$test-types
#:phases #$phases
#:outputs #$(outputs->gexp outputs)
#:search-paths '#$(sexp->gexp