Message ID | 17cedc45c05d54f39d47bac3bbcd51a2ebae5a39.1682452738.git.dev@jpoiret.xyz |
---|---|
State | New |
Headers | show |
Series | Fix tests to prepare for guix package upgrade | expand |
Hi Josselin, On Tue, 25 Apr 2023 at 22:16, Josselin Poiret via Guix-patches via <guix-patches@gnu.org> wrote: > * tests/guix-graph.sh: Change the expected path from emacs to libffi. `guix > graph --path` outputs only one possible path, and the one it outputs for this > case has changed. > --- > tests/guix-graph.sh | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tests/guix-graph.sh b/tests/guix-graph.sh > index 9824c6a65a..37ea0a7b8c 100644 > --- a/tests/guix-graph.sh > +++ b/tests/guix-graph.sh > @@ -87,7 +87,7 @@ guix graph --path emacs vim && false > path="\ > emacs > gnutls > -guile > +p11-kit > libffi" > test "`guix graph --path emacs libffi | cut -d '@' -f1`" = "$path" Hum, that’s annoying. Well, indeed “guix graph --path” returns one of the shortest paths. And this result depends on how the graph is built and then walked. That’s deterministic (should be!) but can depend on the Guix revision. Well, does it make sense to check the equality of such specific path? Maybe, instead the test could check some invariant property. For instance, that the length of the path between two packages must be the same as between the same packages but with a package transformation (replacement or else). Or some others. For example, that the length from A to C is equal to the length from A to B added to the length from B to C. WDYT? Cheers, simon
diff --git a/tests/guix-graph.sh b/tests/guix-graph.sh index 9824c6a65a..37ea0a7b8c 100644 --- a/tests/guix-graph.sh +++ b/tests/guix-graph.sh @@ -87,7 +87,7 @@ guix graph --path emacs vim && false path="\ emacs gnutls -guile +p11-kit libffi" test "`guix graph --path emacs libffi | cut -d '@' -f1`" = "$path"