Update tests/flakes/follow-paths.sh

Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
This commit is contained in:
Vertex 2023-08-15 10:10:27 +01:00 committed by GitHub
parent 37a509ca2d
commit 20d9c672d1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -150,6 +150,25 @@ nix flake lock $flakeFollowsA 2>&1 | grep "warning: input 'B' has an override fo
nix flake lock $flakeFollowsA 2>&1 | grep "warning: input 'B' has an override for a non-existent input 'invalid2'" nix flake lock $flakeFollowsA 2>&1 | grep "warning: input 'B' has an override for a non-existent input 'invalid2'"
# Now test follow path overloading # Now test follow path overloading
# This tests a lockfile checking regression https://github.com/NixOS/nix/pull/8819
#
# We construct the following graph, where p->q means p has input q.
# A double edge means that the edge gets overridden using `follows`.
#
# A
# / \
# / \
# v v
# B ==> C --- follows declared in A
# \\ /
# \\/ --- follows declared in B
# v
# D
#
# The message was
# error: input 'B/D' follows a non-existent input 'B/C/D'
#
# Note that for `B` to resolve its follow for `D`, it needs `C/D`, for which it needs to resolve the follow on `C` first.
flakeFollowsOverloadA=$TEST_ROOT/follows/overload/flakeA flakeFollowsOverloadA=$TEST_ROOT/follows/overload/flakeA
flakeFollowsOverloadB=$TEST_ROOT/follows/overload/flakeA/flakeB flakeFollowsOverloadB=$TEST_ROOT/follows/overload/flakeA/flakeB
flakeFollowsOverloadC=$TEST_ROOT/follows/overload/flakeA/flakeB/flakeC flakeFollowsOverloadC=$TEST_ROOT/follows/overload/flakeA/flakeB/flakeC