a6-rc-up-tree: handle blocked deps, exit 1 if nothing started

This commit is contained in:
Daniel Barlow
2024-07-08 21:13:49 +01:00
parent f0f6cc80d7
commit 7f9971512d
4 changed files with 49 additions and 13 deletions

View File

@@ -46,9 +46,19 @@ stdenv.mkDerivation {
# started controlled rdepends are running, so starting them is harmless
# descendants which depend on a _different_ controlled service, which is down, don't start
# descendants which depend on a _different_ controlled service,
# which is down, don't start:
# Given:
# - modeswitch is controlled
# - atz is controlled
# - atz => modeswitch
# - ifconfig => atz
# Then: if atz is down, ifconfig should not start when modeswitch is started
fennelrepl ./test.fnl ${./test-services} modeswitch
expect "modeswitch"
# descendants which depend on a _different_ controlled service, which is up, do start
ATZ=up fennelrepl ./test.fnl ${./test-services} modeswitch
expect "modeswitch atz ifconfig"
'';
}