me
/
guix
Archived
1
0
Fork 0

tests: Adjust 'guix graph' test to latest OCaml changes.

* tests/graph.scm ("reverse bag DAG"): Adjust to latest OCaml changes by
looking at dune/ocaml-camomile/ocaml-utop.
master
Ludovic Courtès 2022-07-01 23:25:59 +02:00
parent 4ff12d1de7
commit bee2c369fa
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 12 additions and 12 deletions

View File

@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU ;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2015-2022 Ludovic Courtès <ludo@gnu.org>
;;; ;;;
;;; This file is part of GNU Guix. ;;; This file is part of GNU Guix.
;;; ;;;
@ -244,10 +244,10 @@ edges."
edges))))))))) edges)))))))))
(test-assert "reverse bag DAG" (test-assert "reverse bag DAG"
(let-values (((dune bap ocaml-base) (let-values (((dune camomile utop)
(values (specification->package "ocaml4.07-dune") (values (specification->package "dune")
(specification->package "bap") (specification->package "ocaml-camomile")
(specification->package "ocaml4.07-base"))) (specification->package "ocaml-utop")))
((backend nodes+edges) (make-recording-backend))) ((backend nodes+edges) (make-recording-backend)))
(run-with-store %store (run-with-store %store
(export-graph (list dune) 'port (export-graph (list dune) 'port
@ -256,17 +256,17 @@ edges."
(run-with-store %store (run-with-store %store
(mlet %store-monad ((dune-drv (package->derivation dune)) (mlet %store-monad ((dune-drv (package->derivation dune))
(bap-drv (package->derivation bap)) (camomile-drv (package->derivation camomile))
(ocaml-base-drv (package->derivation ocaml-base))) (utop-drv (package->derivation utop)))
;; OCAML-BASE uses 'dune-build-system' so DUNE is a direct dependency. ;; CAMOMILE uses 'dune-build-system' so DUNE is a direct dependency.
;; BAP is much higher in the stack but it should be there. ;; UTOP is much higher in the stack but it should be there.
(let-values (((nodes edges) (nodes+edges))) (let-values (((nodes edges) (nodes+edges)))
(return (return
(and (member `(,(derivation-file-name bap-drv) (and (member `(,(derivation-file-name camomile-drv)
,(package-full-name bap)) ,(package-full-name camomile))
nodes) nodes)
(->bool (member (map derivation-file-name (->bool (member (map derivation-file-name
(list dune-drv ocaml-base-drv)) (list dune-drv utop-drv))
edges))))))))) edges)))))))))
(test-assert "derivation DAG" (test-assert "derivation DAG"