diff options
author | Liliana Marie Prikler <liliana.prikler@gmail.com> | 2023-08-26 07:08:03 +0200 |
---|---|---|
committer | Liliana Marie Prikler <liliana.prikler@gmail.com> | 2023-08-26 07:08:03 +0200 |
commit | 9d074e16c7a9879d67c348c7b2d70b725adfbdfa (patch) | |
tree | c4c8dc52508717b3b7aa7c988924a03aa6eb83d8 /tests/graph.scm | |
parent | ca7e310f7ac32354b2e693e9a0f783320952a8fc (diff) | |
parent | eeb71d778f149834015858467fbeeb1276d96d1d (diff) | |
download | guix-9d074e16c7a9879d67c348c7b2d70b725adfbdfa.tar.gz guix-9d074e16c7a9879d67c348c7b2d70b725adfbdfa.zip |
Merge branch 'master' into emacs-team
Diffstat (limited to 'tests/graph.scm')
-rw-r--r-- | tests/graph.scm | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/tests/graph.scm b/tests/graph.scm index a6186ff7e8..c8189366a1 100644 --- a/tests/graph.scm +++ b/tests/graph.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2015-2022 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2015-2023 Ludovic Courtès <ludo@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -377,7 +377,8 @@ edges." (((labels packages _ ...) ...) packages))))))))) -(test-assert "node-transitive-edges + node-back-edges" +(test-equal "node-transitive-edges + node-back-edges" + '() (run-with-store %store (let ((packages (fold-packages cons '())) (bootstrap? (lambda (package) @@ -386,17 +387,22 @@ edges." "bootstrap.scm"))) (trivial? (lambda (package) (eq? (package-build-system package) - trivial-build-system)))) + trivial-build-system))) + (system-specific? (lambda (package) + (memq #:system (package-arguments package))))) (mlet %store-monad ((edges (node-back-edges %bag-node-type packages))) (let* ((glibc (canonical-package glibc)) (dependents (node-transitive-edges (list glibc) edges)) (diff (lset-difference eq? packages dependents))) - ;; All the packages depend on libc, except bootstrap packages and - ;; some that use TRIVIAL-BUILD-SYSTEM. - (return (null? (remove (lambda (package) - (or (trivial? package) - (bootstrap? package))) - diff)))))))) + ;; All the packages depend on libc, except bootstrap packages, some + ;; packages that use TRIVIAL-BUILD-SYSTEM, and some that target a + ;; specific system and thus may depend on a different libc package + ;; object. + (return (remove (lambda (package) + (or (trivial? package) + (bootstrap? package) + (system-specific? package))) + diff))))))) (test-assert "node-transitive-edges, no duplicates" (run-with-store %store |