[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
07/07: tests: Adjust to cope with glibc graft.
From: |
guix-commits |
Subject: |
07/07: tests: Adjust to cope with glibc graft. |
Date: |
Fri, 27 Oct 2023 19:35:08 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit ff1146fb4f7254a8f644f89d7af6b4b566528603
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Sat Oct 28 01:30:37 2023 +0200
tests: Adjust to cope with glibc graft.
This is a followup to 1328c4cca531318e3ed90c6aecb522a5b22a4bcc, which
led to failures for tests that were not prepared to cope with that.
* tests/guix-environment-container.sh (hello_drv_nested): Pass “-E
GUIX_BUILD_OPTIONS” so ‘--no-grafts’ is passed.
* tests/guix-pack.sh (GUIX_BUILD_OPTIONS): Add ‘--no-grafts’.
* tests/transformations.scm ("options->transformation, with-graft"):
Skip when ‘glibc-final’ has a replacement.
Change-Id: Ia65c9aeb06f524252815b8290a5ca7bf97ee8136
---
tests/guix-environment-container.sh | 2 +-
tests/guix-pack.sh | 4 +++-
tests/transformations.scm | 5 +++++
3 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/tests/guix-environment-container.sh
b/tests/guix-environment-container.sh
index a3bc1ab572..09704f751c 100644
--- a/tests/guix-environment-container.sh
+++ b/tests/guix-environment-container.sh
@@ -270,5 +270,5 @@ guix build hello -d
env="$(type -P pre-inst-env)"
guix shell -C -D guix -- "$env" guix build hello -d && false # cannot work
hello_drv="$(guix build hello -d)"
-hello_drv_nested="$(cd "$(dirname env)" && guix shell --bootstrap -CW -D guix
-- "$env" guix build hello -d)"
+hello_drv_nested="$(cd "$(dirname env)" && guix shell --bootstrap -E
GUIX_BUILD_OPTIONS -CW -D guix -- "$env" guix build hello -d)"
test "$hello_drv" = "$hello_drv_nested"
diff --git a/tests/guix-pack.sh b/tests/guix-pack.sh
index 4042e54aeb..3204e821cf 100644
--- a/tests/guix-pack.sh
+++ b/tests/guix-pack.sh
@@ -30,7 +30,9 @@ fi
guix pack --version
# Use --no-substitutes because we need to verify we can do this ourselves.
-GUIX_BUILD_OPTIONS="--no-substitutes"
+# Use --no-grafts to avoid interference--e.g., --dry-run passing even when
+# given an unsupported package.
+GUIX_BUILD_OPTIONS="--no-substitutes --no-grafts"
export GUIX_BUILD_OPTIONS
test_directory="`mktemp -d`"
diff --git a/tests/transformations.scm b/tests/transformations.scm
index 704818b9ed..755211d65d 100644
--- a/tests/transformations.scm
+++ b/tests/transformations.scm
@@ -187,6 +187,11 @@
(string=? (package-full-name dep)
(package-full-name findutils)))))))))))
+;; The following test requires grafting enabled, but it becomes extremely
+;; expensive if there's a graft on glibc or other package deep in the graph.
+(when (package-replacement (@ (gnu packages commencement) glibc-final))
+ (test-skip 1))
+
(test-assert "options->transformation, with-graft"
(let* ((p (dummy-package "guix.scm"
(inputs `(("foo" ,grep)
- branch master updated (2de3004267 -> ff1146fb4f), guix-commits, 2023/10/27
- 05/07: environment: Parameterize ‘%graft?’ early on., guix-commits, 2023/10/27
- 02/07: environment: Honor ‘-s’ for guile-for-build., guix-commits, 2023/10/27
- 04/07: profiles: Hooks honor the #:system parameter of ‘profile-derivation’., guix-commits, 2023/10/27
- 01/07: grafts: Fix corner case involving multiple-output derivations., guix-commits, 2023/10/27
- 03/07: packages: Add ‘system’ parameter for ‘set-guile-for-build’., guix-commits, 2023/10/27
- 06/07: environment: Fix typo in error messages., guix-commits, 2023/10/27
- 07/07: tests: Adjust to cope with glibc graft.,
guix-commits <=