summaryrefslogtreecommitdiff
path: root/build-aux
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2020-03-03 12:35:46 +0100
committerLudovic Courtès <ludo@gnu.org>2020-03-05 16:33:37 +0100
commitdd1ee160be8ba4e211432c08e161c24901cd670e (patch)
tree9fcfcaf101d37372ed56986cf0339919c6fb250b /build-aux
parentd37b5a1b58824dafbe6f32b1c183661c147c660c (diff)
downloadpatches-dd1ee160be8ba4e211432c08e161c24901cd670e.tar
patches-dd1ee160be8ba4e211432c08e161c24901cd670e.tar.gz
tests: "make check-system" no longer interns source upfront.
* gnu/ci.scm (channel-build-system)[build, lower]: Honor #:source. (channel-source->package): New procedure. (system-test-jobs): Remove 'instance' and call to 'checkout->channel-instance'. Use 'channel-source->package'. * build-aux/run-system-tests.scm (tests-for-channel-instance): Rename to... (tests-for-current-guix): ... this. Change 'instance' to 'source'. (run-system-tests): Use 'local-file' instead of 'interned-file' for SOURCE.
Diffstat (limited to 'build-aux')
-rw-r--r--build-aux/run-system-tests.scm17
1 files changed, 8 insertions, 9 deletions
diff --git a/build-aux/run-system-tests.scm b/build-aux/run-system-tests.scm
index b0cb3bd2bf..a4c019ab0b 100644
--- a/build-aux/run-system-tests.scm
+++ b/build-aux/run-system-tests.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2016, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2016, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -19,7 +19,8 @@
(define-module (run-system-tests)
#:use-module (gnu tests)
#:use-module (gnu packages package-management)
- #:use-module ((gnu ci) #:select (channel-instance->package))
+ #:use-module ((gnu ci) #:select (channel-source->package))
+ #:use-module (guix gexp)
#:use-module (guix store)
#:use-module ((guix status) #:select (with-status-verbosity))
#:use-module (guix monads)
@@ -51,15 +52,15 @@
lst)
(lift1 reverse %store-monad))))
-(define (tests-for-channel-instance instance)
- "Return a list of tests for perform, using Guix from INSTANCE, a channel
+(define (tests-for-current-guix source)
+ "Return a list of tests for perform, using Guix built from SOURCE, a channel
instance."
;; Honor the 'TESTS' environment variable so that one can select a subset
;; of tests to run in the usual way:
;;
;; make check-system TESTS=installed-os
(parameterize ((current-guix-package
- (channel-instance->package instance)))
+ (channel-source->package source)))
(match (getenv "TESTS")
(#f
(all-system-tests))
@@ -80,14 +81,12 @@ instance."
;; Intern SOURCE so that 'build-from-source' in (guix channels) sees
;; "fresh" file names and thus doesn't find itself loading .go files
;; from ~/.cache/guile when it loads 'build-aux/build-self.scm'.
- ;; XXX: It would be best to not do it upfront because we may need it.
- (mlet* %store-monad ((source (interned-file source "guix-source"
+ (mlet* %store-monad ((source -> (local-file source "guix-source"
#:recursive? #t
#:select?
(or (git-predicate source)
(const #t))))
- (instance -> (checkout->channel-instance source))
- (tests -> (tests-for-channel-instance instance))
+ (tests -> (tests-for-current-guix source))
(drv (mapm %store-monad system-test-value tests))
(out -> (map derivation->output-path drv)))
(format (current-error-port) "Running ~a system tests...~%"