diff --git a/nixos/tests/angrr.nix b/nixos/tests/angrr.nix index e4bca782a1ac..2c2baefd8e86 100644 --- a/nixos/tests/angrr.nix +++ b/nixos/tests/angrr.nix @@ -32,38 +32,38 @@ # Creates some auto gc roots # Use /run/current-system so that we do not need to build anything new - machine.succeed("nix build /run/current-system --out-link /tmp/root-auto-gc-root-1") - machine.succeed("nix build /run/current-system --out-link /tmp/root-auto-gc-root-2") - machine.succeed("su normal --command 'nix build /run/current-system --out-link /tmp/user-auto-gc-root-1'") - machine.succeed("su normal --command 'nix build /run/current-system --out-link /tmp/user-auto-gc-root-2'") + machine.succeed("nix build /run/current-system --out-link /tmp/result-root-auto-gc-root-1") + machine.succeed("nix build /run/current-system --out-link /tmp/result-root-auto-gc-root-2") + machine.succeed("su normal --command 'nix build /run/current-system --out-link /tmp/result-user-auto-gc-root-1'") + machine.succeed("su normal --command 'nix build /run/current-system --out-link /tmp/result-user-auto-gc-root-2'") machine.systemctl("start nix-gc.service") # Not auto gc root will be removed - machine.succeed("readlink /tmp/root-auto-gc-root-1") - machine.succeed("readlink /tmp/root-auto-gc-root-2") - machine.succeed("readlink /tmp/user-auto-gc-root-1") - machine.succeed("readlink /tmp/user-auto-gc-root-2") + machine.succeed("readlink /tmp/result-root-auto-gc-root-1") + machine.succeed("readlink /tmp/result-root-auto-gc-root-2") + machine.succeed("readlink /tmp/result-user-auto-gc-root-1") + machine.succeed("readlink /tmp/result-user-auto-gc-root-2") # Change time to 8 days after (greater than 7d) machine.succeed("date -s '8 days'") # Touch GC roots `-2` - machine.succeed("touch /tmp/root-auto-gc-root-2 --no-dereference") - machine.succeed("touch /tmp/user-auto-gc-root-2 --no-dereference") + machine.succeed("touch /tmp/result-root-auto-gc-root-2 --no-dereference") + machine.succeed("touch /tmp/result-user-auto-gc-root-2 --no-dereference") machine.systemctl("start nix-gc.service") # Only GC roots `-1` are removed - machine.succeed("test ! -f /tmp/root-auto-gc-root-1") - machine.succeed("readlink /tmp/root-auto-gc-root-2") - machine.succeed("test ! -f /tmp/user-auto-gc-root-1") - machine.succeed("readlink /tmp/user-auto-gc-root-2") + machine.succeed("test ! -e /tmp/result-root-auto-gc-root-1") + machine.succeed("readlink /tmp/result-root-auto-gc-root-2") + machine.succeed("test ! -e /tmp/result-user-auto-gc-root-1") + machine.succeed("readlink /tmp/result-user-auto-gc-root-2") # Change time again machine.succeed("date -s '8 days'") machine.systemctl("start nix-gc.service") # All auto GC roots are removed - machine.succeed("test ! -f /tmp/root-auto-gc-root-2") - machine.succeed("test ! -f /tmp/user-auto-gc-root-2") + machine.succeed("test ! -e /tmp/result-root-auto-gc-root-2") + machine.succeed("test ! -e /tmp/result-user-auto-gc-root-2") # Direnv integration test machine.succeed("mkdir /tmp/test-direnv") @@ -74,7 +74,7 @@ # The root will be removed if we does not use the direnv recently machine.succeed("date -s '8 days'") machine.systemctl("start nix-gc.service") - machine.succeed("test ! -f /tmp/test-direnv/.direnv/gc-root") + machine.succeed("test ! -e /tmp/test-direnv/.direnv/gc-root") # Recreate the root machine.succeed("nix build /run/current-system --out-link /tmp/test-direnv/.direnv/gc-root")