From bf0b7e5423866592df75a7271a2c67d886d2cd33 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 27 Mar 2020 22:03:40 +0100 Subject: [PATCH] Add test for circular flake dependencies --- tests/flakes.sh | 44 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/tests/flakes.sh b/tests/flakes.sh index bdcccb6d0..43dbc95e8 100644 --- a/tests/flakes.sh +++ b/tests/flakes.sh @@ -22,8 +22,10 @@ flake4Dir=$TEST_ROOT/flake4 flake5Dir=$TEST_ROOT/flake5 flake7Dir=$TEST_ROOT/flake7 nonFlakeDir=$TEST_ROOT/nonFlake +flakeA=$TEST_ROOT/flakeA +flakeB=$TEST_ROOT/flakeB -for repo in $flake1Dir $flake2Dir $flake3Dir $flake7Dir $nonFlakeDir; do +for repo in $flake1Dir $flake2Dir $flake3Dir $flake7Dir $nonFlakeDir $flakeA $flakeB; do rm -rf $repo $repo.tmp mkdir $repo git -C $repo init @@ -656,3 +658,43 @@ nix flake update $flake3Dir --update-input flake2/flake1 # Test 'nix flake list-inputs'. [[ $(nix flake list-inputs $flake3Dir | wc -l) == 5 ]] nix flake list-inputs $flake3Dir --json | jq . + +# Test circular flake dependencies. +cat > $flakeA/flake.nix < $flakeB/flake.nix <