summaryrefslogtreecommitdiff
path: root/tests/graph.scm
AgeCommit message (Collapse)Author
2023-08-21tests: Adjust 'node-back-edges' test for 'bag' to system-dependent glibc.Ludovic Courtès
Fixes a regression introduced in 560cb51e7b37e2c6f6fe4b72a3781185c57fdf83, which would lead this test on x86_64-linux to return a DIFF with two packages, nhc98 and dev86 (both have #:system "i686-linux" and thus depend on a different glibc object; why other system-specific packages such as 'wine' aren't reported is unclear). * tests/graph.scm ("node-transitive-edges + node-back-edges"): Use 'test-equal'. Define 'system-specific?' and use it.
2023-04-07gnu: Purge pre-1.3.0 deprecated packages.Bruno Victal
* gnu/packages/bioinformatics.scm (deeptools): Remove variable. * gnu/packages/efi.scm (efi_analyzer): Ditto. * gnu/packages/guile.scm (guile-2.2/bug-fix, guile-json): Ditto. * gnu/packages/image.scm (libjpeg): Ditto. * gnu/packages/kde.scm (kdevplatform): Ditto * gnu/packages/linphone.scm (linphoneqt): Ditto. * gnu/packages/maths.scm (blis-sandybridge, blis-haswell, blis-knl): Ditto. * gnu/packages/mpi.scm (hwloc-2.0): Ditto. * gnu/packages/music.scm (python-abjad, zlfo): Ditto. * gnu/packages/perl.scm (perl-base, perl-parent): Ditto. * gnu/packages/tryton.scm (python-trytond): Ditto. * gnu/packages/video.scm (gnome-mpv): Ditto. * tests/graph.scm: Use guile-json-1. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-10-22Remove now unnecessary uses of (guix grafts).Ludovic Courtès
These modules would use (guix grafts) just to access '%graft?' and related bindings, which are now in (guix store). * gnu/ci.scm, guix/gexp.scm, guix/lint.scm, guix/scripts.scm, guix/scripts/archive.scm, guix/scripts/build.scm, guix/scripts/challenge.scm, guix/scripts/deploy.scm, guix/scripts/environment.scm, guix/scripts/home.scm, guix/scripts/pack.scm, guix/scripts/package.scm, guix/scripts/pull.scm, guix/scripts/size.scm, guix/scripts/system.scm, guix/scripts/weather.scm, tests/builders.scm, tests/channels.scm, tests/cpan.scm, tests/derivations.scm, tests/gexp.scm, tests/graph.scm, tests/guix-daemon.sh, tests/monads.scm, tests/pack.scm, tests/packages.scm, tests/profiles.scm, tests/system.scm: Remove #:use-module (guix grafts).
2022-07-01tests: Adjust 'guix graph' test to latest OCaml changes.Ludovic Courtès
* tests/graph.scm ("reverse bag DAG"): Adjust to latest OCaml changes by looking at dune/ocaml-camomile/ocaml-utop.
2022-02-05tests: Assert that cyclic graphs can be produced.Liliana Marie Prikler
* tests/graph.scm ("package DAG, oops it was a cycle"): New test.
2021-09-21graph: Add '--max-depth'.Ludovic Courtès
* guix/graph.scm (export-graph): Add #:max-depth and honor it, adding 'depths' argument to 'loop'. * guix/scripts/graph.scm (%options, show-help): Add '--max-depth'. (%default-options): Add 'max-depth'. (guix-graph): Pass #:max-depth to 'export-graph'. * tests/graph.scm ("package DAG, limited depth"): New test. * doc/guix.texi (Invoking guix graph): Document it.
2020-10-20graph: Adjust test for recent OCaml changes.Ludovic Courtès
This is a followup to 339177956affdc471832750a3805b74356487e93. * tests/graph.scm ("reverse bag DAG"): Look for "ocaml4.07-dune" rather than "dune".
2020-05-22packages: Introduce <content-hash> and use it in <origin>.Ludovic Courtès
* guix/packages.scm (<content-hash>): New record type. (define-content-hash-constructor, build-content-hash) (content-hash): New macros. (print-content-hash): New procedure. (<origin>): Rename constructor to '%origin'. [sha256]: Remove field. [hash]: New field. Adjust users. (origin-compatibility-helper, origin): New macros. (origin-sha256): New deprecated procedure. (origin->derivation): Adjust accordingly. * tests/packages.scm ("package-source-derivation, origin, sha512"): New test. * guix/tests.scm: Hide (gcrypt hash) 'sha256' for proper syntax matching. * tests/challenge.scm: Add #:prefix for (gcrypt hash) and adjust users. * tests/derivations.scm: Likewise. * tests/store.scm: Likewise. * tests/graph.scm ("bag DAG, including origins"): Provide 'sha256' field with the right length. * gnu/packages/aspell.scm (aspell-dictionary) (aspell-dict-ca, aspell-dict-it): Use 'hash' and 'content-hash' for proper syntax matching. * gnu/packages/bash.scm (bash-patch): Rename 'sha256' to 'sha256-bv'. * gnu/packages/bootstrap.scm (bootstrap-executable): Rename 'sha256' to 'bv'. * gnu/packages/readline.scm (readline-patch): Likewise. * gnu/packages/virtualization.scm (qemu-patch): Rename 'sha256' to 'sha256-bv'. * guix/import/utils.scm: Hide (gcrypt hash) 'sha256'.
2020-05-11graph: Add 'shortest-path'.Ludovic Courtès
* guix/graph.scm (shortest-path): New procedure. * tests/graph.scm ("shortest-path, packages + derivations") ("shortest-path, reverse packages") ("shortest-path, references"): New tests.
2020-05-11graph: reference/referrer node types work with graph traversal.Ludovic Courtès
The graph traversal procedures in (guix graph) assume that nodes can be compared with 'eq?', which was not the case for nodes of %REFERENCE-NODE-TYPE and %REFERRER-NODE-TYPE (strings). * guix/scripts/graph.scm (intern): New procedure. (ensure-store-items, references*) (%reference-node-type, non-derivation-referrers) (%referrer-node-type): Use it on all store items. * tests/graph.scm ("node-transitive-edges, references"): New test.
2020-02-05tests: Adjust reverse-bag graph test to recent OCaml changes.Ludovic Courtès
This is a followup to 87858bc526a9d577760f55d05a51cb56630f845b. Partly fixes <https://bugs.gnu.org/39374>. Reported by Ellen Papsch <ellen.papsch@wine-logistix.de>. * tests/graph.scm ("reverse bag DAG"): Adjust test to latest OCaml changes.
2019-03-23Merge branch 'staging' into core-updatesMarius Bakke
2019-03-23graph: Add the 'reverse-bag' graph.Ludovic Courtès
Suggested by Julien Lepiller. * guix/scripts/graph.scm (%reverse-bag-node-type): New variable. (%node-types): Add it. * tests/graph.scm ("reverse bag DAG"): New test. * doc/guix.texi (Invoking guix graph): Document it.
2018-09-22bootstrap: %bootstrap-inputs: Wrap input lists into thunks.Jan Nieuwenhuizen
* gnu/packages/bootstrap.scm (%bootstrap-inputs): Change to procedure. Update users; prepares for Mes bootstrap. * gnu/packages/commencement.scm (%boot0-inputs, %boot1-inputs, %boot2-inputs, %boot3-inputs, %boot4-inputs, %boot5-inputs, %boot-6-inputs): Change to procedure. Update users. * tests/builders.scm (%bootstrap-inputs, %bootstrap-search-paths): Make a procedure, filter on package?. Update users.
2018-06-06tests: Adjust graph test.Ludovic Courtès
This is a followup to 301a4249064227bc4883e4e5b638e85a65925ba0, which added a dependency to sed. * tests/graph.scm ("node-edges"): Use 'hello', not 'sed', as the example of a package without any dependency.
2018-05-08guix: Separate the package name and version with "@", not "-".Chris Marusich
* guix/packages.scm (package-full-name): By default, use "@" to separate the package name and package version. Add an optional delimiter argument so that there is still a way to explicitly use a different delimiter. * gnu/packages/commencement.scm (gcc-boot0) <unpack-gmp&co>: Adjust accordingly. * tests/graph.scm: Adjust accordingly. * tests/profiles.scm: Adjust accordingly. * NEWS: Mention the change. Fixes: <https://bugs.gnu.org/31088>. Reported by Pierre Neidhardt <ambrevar@gmail.com>.
2018-03-27graph: Add "module" node type.Ludovic Courtès
* guix/scripts/graph.scm (module-from-package) (source-module-dependencies*): New procedures. (%module-node-type): New variable. (%node-types): Add it. * guix/modules.scm (source-module-dependencies): Export. * tests/graph.scm ("module graph"): New test. * doc/guix.texi (Invoking guix graph): Document it.
2017-12-17graph: Adjust test for glibc:static among the implicit inputs.Ludovic Courtès
Fixes <https://bugs.gnu.org/29612>. Reported by Chris Marusich <cmmarusich@gmail.com>. This is a followup to 6dff905e51202bbdebbad8811b6509584d12a796. * tests/graph.scm ("bag-emerged DAG"): Adjust for glibc:static among IMPLICIT.
2017-01-04graph: Add '%reverse-package-node-type'.Ludovic Courtès
* guix/scripts/graph.scm (%reverse-package-node-type): New variable. (%node-types): Add it. * tests/graph.scm ("reverse package DAG"): New test. * doc/guix.texi (Invoking guix refresh): Add cross-reference to "Invoking guix graph". (Invoking guix graph): Document 'reverse-package'.
2016-12-14graph: Backend must have name and description.Ricardo Wurmus
* guix/graph.scm (<graph-backend>): Add fields "name" and "description". (%graphviz-backend): Provide values for name and description. (export-graph): Ignore name and description when matching backends. (graph-backend-name, graph-backend-description): New procedures. * tests/graph.scm (make-recording-backend): Initialize name and description fields of test graph-backend.
2016-10-15graph: Add '%referrer-node-type'.Ludovic Courtès
* guix/scripts/graph.scm (ensure-store-items): New procedure. (%reference-node-type)[convert]: Use it. (non-derivation-referrers): New procedure. (%referrer-node-type): New variable. (%node-types): Add it. * tests/graph.scm ("referrer DAG"): New test. * doc/guix.texi (Invoking guix graph): Document it.
2016-05-24graph: Add 'node-reachable-count'.Ludovic Courtès
* guix/graph.scm (node-reachable-count): New procedure. * tests/graph.scm ("node-reachable-count"): New test.
2016-04-03build: Add a Guile custom test driver using SRFI-64.Mathieu Lirzin
Before that '.log' files for scheme tests were fragmented and not included in test-suite.log. This unifies the semantics of SRFI-64 API with Automake test suite. * build-aux/test-driver.scm: New file. * Makefile.am (SCM_LOG_DRIVER, AM_SCM_LOG_DRIVER_FLAGS): New variables. (SCM_LOG_COMPILER, AM_SCM_LOG_FLAGS): Delete variables. (AM_TESTS_ENVIRONMENT): Set GUILE_AUTO_COMPILE to 0. * test-env.in: Silence guix-daemon. * doc/guix.texi (Running the Test Suite): Describe how to display the detailed results. Bug reports require only 'test-suite.log' file. * tests/base32.scm, tests/build-utils.scm, tests/builders.scm, tests/challenge.scm, tests/cpan.scm, tests/cpio.scm, tests/cran.scm, tests/cve.scm, tests/derivations.scm, tests/elpa.scm, tests/file-systems.scm, tests/gem.scm, tests/gexp.scm, tests/gnu-maintenance.scm, tests/grafts.scm, tests/graph.scm, tests/gremlin.scm, tests/hackage.scm, tests/hash.scm, tests/import-utils.scm, tests/lint.scm, tests/monads.scm, tests/nar.scm, tests/packages.scm, tests/pk-crypto.scm, tests/pki.scm, tests/profiles.scm, tests/publish.scm, tests/pypi.scm, tests/records.scm, tests/scripts-build.scm, tests/scripts.scm, tests/services.scm, tests/sets.scm, tests/size.scm, tests/snix.scm, tests/store.scm, tests/substitute.scm, tests/syscalls.scm, tests/system.scm, tests/ui.scm, tests/union.scm, tests/upstream.scm, tests/utils.scm: Don't exit at the end of test groups. * tests/containers.scm: Likewise. Use 'test-skip' instead of exiting with error code 77.
2016-03-06tests: Disable grafting by default for most tests.Ludovic Courtès
This allows tests to run as expected even in the presence of replacements among the bootstrap packages, such as Perl (commit d8173f21f7b4e3cb83541b8fa70621d2b6d4ce1c). * tests/cpan.scm: Add (%graft? #f). * tests/derivations.scm: Likewise. * tests/graph.scm: Likewise. * tests/monads.scm: Likewise. * tests/profiles.scm: Likewise. * tests/gexp.scm: Likewise. ("gexp->derivation vs. grafts"): Explicitly reenable grafting before, and disable it after, using 'set-grafting'.
2016-01-13tests: Use sed instead of grep as a package with no dependencies.Ludovic Courtès
* tests/graph.scm ("node-edges"): Choose SED instead of GREP as the example.
2016-01-02graph: %BAG-WITH-ORIGINS-NODE-TYPE includes the origin's guile.Ludovic Courtès
Before that it would include #f for most origins since that the default value of 'origin-patch-guile'. * guix/scripts/graph.scm (bag-node-edges): When 'origin-patch-guile' returns #f, use (default-guile). * tests/graph.scm ("bag DAG, including origins"): Check for an edge from O to (default-guile).
2016-01-02graph: %BAG-EMERGED-NODE-TYPE filters out origins.Ludovic Courtès
Fixes <http://bugs.gnu.org/22280>. Reported by Leo Famulari <leo@famulari.name>. * guix/scripts/graph.scm (%bag-emerged-node-type)[edges]: Mimic %BAG-NODE-TYPE. This is a followup to 38b92da.
2015-12-13graph: Add synthetic test.Ludovic Courtès
* tests/graph.scm ("node-transitive-edges, no duplicates"): New test.
2015-11-23graph: Add '%bag-with-origins-node-type'.Ludovic Courtès
* guix/scripts/graph.scm (bag-node-edges): Remove 'filter' call. Add case for 'origin'. (%bag-node-type)[edges]: Add filtering here. (%bag-with-origins-node-type): New variable. (%node-types): Add it. * tests/graph.scm ("bag DAG, including origins"): New test. * tests/guix-graph.sh: Add 'bag-with-origins'. * doc/guix.texi (Invoking guix graph): Document it.
2015-11-21graph: Add procedures to query a node's edges.Ludovic Courtès
* guix/graph.scm (%node-edges, node-edges, node-back-edges) (node-transitive-edges): New procedures. * tests/graph.scm ("node-edges") ("node-transitive-edges + node-back-edges"): New tests.
2015-11-21Add (guix graph).Ludovic Courtès
* guix/scripts/graph.scm (<node-type>, <graph-backend>, emit-prologue) (emit-epilogue, emit-node, emit-edge, %graphviz-backend, export-graph): Move to... * guix/graph.scm: ... here. New file. * guix/scripts/system.scm, tests/graph.scm: Use it. * Makefile.am (MODULES): Add it.
2015-08-27Add 'guix graph'.Ludovic Courtès
* guix/scripts/graph.scm, tests/graph.scm, tests/guix-graph.sh, doc/images/coreutils-bag-graph.dot, doc/images/coreutils-graph.dot: New files. * Makefile.am (MODULES): Add guix/scripts/graph.scm. (SH_TESTS): Add tests/guix-graph.sh. (SCM_TESTS): Add tests/graph.scm. * doc.am (DOT_FILES, DOT_VECTOR_GRAPHICS): New variables. (EXTRA_DIST): Use them. (dist_infoimage_DATA): Use $(DOT_FILES). (pdf-local, info-local, ps-local): Likewise. * doc/guix.texi (Packages with Multiple Outputs): Add cross-reference to 'guix graph'. (Invoking guix gc): Likewise. (Invoking guix graph): New section.