r-build-system: Set test variables.

* guix/build/r-build-system.scm (check): Set environment variables to skip
tests that are not suitable for build machines.

Change-Id: Ife612252711247496ac342d606ecc3d1d69b60c9
This commit is contained in:
Ricardo Wurmus 2024-11-21 10:52:52 +01:00 committed by Andreas Enge
parent b4694bde38
commit cf471353b2
No known key found for this signature in database
GPG key ID: F7D5C9BF765C61E3

View file

@ -80,6 +80,10 @@ (define* (check #:key test-target test-types inputs outputs tests? #:allow-other
(testdir (string-append libdir pkg-name "/" test-target))
(site-path (string-append libdir ":" (generate-site-path inputs))))
(when (and tests? (file-exists? testdir))
;; Skip tests that should be skipped on CI systems.
(setenv "CI" "1")
(setenv "NOT_CRAN" "skip")
(setenv "IS_BIOC_BUILD_MACHINE" "true")
(setenv "R_LIBS_SITE" site-path)
(guard (c ((invoke-error? c)
;; Dump the test suite log to facilitate debugging.