summaryrefslogtreecommitdiff
path: root/gnu/tests
diff options
context:
space:
mode:
authorLudovic Courtès <[email protected]>2025-02-27 23:13:26 +0100
committerLudovic Courtès <[email protected]>2025-03-10 15:41:33 +0100
commit39c890cacf59fde6769e951d7928734411cfc5cd (patch)
tree9238cde87485a64b63e962bbec665d1a14be50cc /gnu/tests
parent9e07d889c4ebf80502661801ca7a9fb35f892158 (diff)
tests: Factorize ‘%hello-dependencies-manifest’.
* gnu/tests/base.scm (%hello-dependencies-manifest): Export. * gnu/tests/foreign.scm (%installation-tarball-manifest): Use it. Change-Id: Id92232f479ab5d1f0c48036b0546e3745aa63e52
Diffstat (limited to 'gnu/tests')
-rw-r--r--gnu/tests/base.scm4
-rw-r--r--gnu/tests/foreign.scm36
2 files changed, 6 insertions, 34 deletions
diff --git a/gnu/tests/base.scm b/gnu/tests/base.scm
index 38bd1e687f..f2122d7d0a 100644
--- a/gnu/tests/base.scm
+++ b/gnu/tests/base.scm
@@ -60,6 +60,8 @@
%test-root-unmount
%test-cleanup
%test-activation
+
+ %hello-dependencies-manifest
%test-guix-daemon))
(define %simple-os
@@ -998,7 +1000,7 @@ non-ASCII names from /tmp.")
(item (with-parameters ((%graft? #f))
(manifest-entry-item entry)))))
-(define %hello-dependencies-manifest ;TODO: Share with (gnu tests foreign).
+(define %hello-dependencies-manifest
;; Build dependencies of 'hello' needed to test 'guix build hello'.
(concatenate-manifests
(list (map-manifest-entries
diff --git a/gnu/tests/foreign.scm b/gnu/tests/foreign.scm
index a08622424a..9aba803c4d 100644
--- a/gnu/tests/foreign.scm
+++ b/gnu/tests/foreign.scm
@@ -26,6 +26,8 @@
#:autoload (guix store) (%store-prefix %store-monad %graft?)
#:use-module (gnu compression)
#:use-module (gnu tests)
+ #:use-module ((gnu tests base)
+ #:select (%hello-dependencies-manifest))
#:use-module (gnu packages base)
#:use-module (gnu packages bootstrap)
#:use-module (gnu packages guile)
@@ -140,39 +142,7 @@ system is expected to be on DEVICE."
;; Manifest of the Guix installation tarball.
(concatenate-manifests
(list (packages->manifest (list guix))
-
- ;; Include the dependencies of 'hello' in addition to 'guix' so that
- ;; we can test 'guix build hello'.
- (map-manifest-entries
- manifest-entry-without-grafts
- (package->development-manifest hello))
-
- ;; Add the source of 'hello'.
- (manifest
- (list (manifest-entry
- (name "hello-source")
- (version (package-version hello))
- (item (let ((file (origin-actual-file-name
- (package-source hello))))
- (computed-file
- "hello-source"
- #~(begin
- ;; Put the tarball in a subdirectory since
- ;; profile union crashes otherwise.
- (mkdir #$output)
- (mkdir (in-vicinity #$output "src"))
- (symlink #$(package-source hello)
- (in-vicinity #$output
- (string-append "src/"
- #$file))))))))))
-
- ;; Include 'guile-final', which is needed when building derivations
- ;; such as that of 'hello' but missing from the development manifest.
- ;; Add '%bootstrap-guile', used by 'guix install --bootstrap'.
- (map-manifest-entries
- manifest-entry-without-grafts
- (packages->manifest (list (canonical-package guile-3.0)
- %bootstrap-guile))))))
+ %hello-dependencies-manifest)))
(define %guix-install-script
;; The 'guix-install.sh' script.