diff --git a/tests/flakes-with-submodules.sh b/tests/flakes-with-submodules.sh index ce9e083483f..904c433f707 100644 --- a/tests/flakes-with-submodules.sh +++ b/tests/flakes-with-submodules.sh @@ -20,14 +20,9 @@ for repo in $flakeDir $nonFlakeDir $flakeWithSubmodules; do git -C $repo init git -C $repo config user.email "foobar@example.com" git -C $repo config user.name "Foobar" -done - -for dir in $nonFlakeDir $flakeDir; do -cat > $dir/README.md < $repo/README.md + git -C $repo add README.md + git -C $repo commit -m 'Initial' done cp config.nix $flakeDir @@ -81,6 +76,11 @@ cat > $flakeWithSubmodules/flake.nix < $flakeWithSubmodules/flake.nix < $flakeWithSubmodules/README.md # apply dirt echo FSUD > $flakeWithSubmodules/nonFlake/README.md [[ $(nix run $flakeWithSubmodules#cat-submodule-readme) == "FSUD" ]] +nix build -o $TEST_ROOT/result $flakeWithSubmodules#source-with-submodules +[[ $(cat $TEST_ROOT/result/nonFlake/README.md) == "FSUD" ]] # should work for flake as well echo FSUD > $flakeWithSubmodules/flake/README.md