mirror of
https://github.com/LnL7/nix-darwin.git
synced 2024-12-15 17:51:01 +00:00
Merge pull request #755 from emilazy/fix-test-negations
tests: fix uses of `!`
This commit is contained in:
commit
829041cf10
6 changed files with 12 additions and 8 deletions
|
@ -19,6 +19,10 @@ let
|
|||
|
||||
makeTest = test:
|
||||
let
|
||||
testName =
|
||||
builtins.replaceStrings [ ".nix" ] [ "" ]
|
||||
(builtins.baseNameOf test);
|
||||
|
||||
configuration =
|
||||
{ config, lib, pkgs, ... }:
|
||||
with lib;
|
||||
|
@ -36,7 +40,7 @@ let
|
|||
};
|
||||
|
||||
config = {
|
||||
system.build.run-test = pkgs.runCommand "darwin-test"
|
||||
system.build.run-test = pkgs.runCommand "darwin-test-${testName}"
|
||||
{ allowSubstitutes = false; preferLocalBuild = true; }
|
||||
''
|
||||
#! ${pkgs.stdenv.shell}
|
||||
|
|
|
@ -14,6 +14,6 @@ in
|
|||
|
||||
echo checking nix-gc service in /Library/LaunchDaemons >&2
|
||||
grep "<string>org.nixos.nix-gc</string>" ${config.out}/Library/LaunchDaemons/org.nixos.nix-gc.plist
|
||||
! grep "<key>UserName</key>" ${config.out}/Library/LaunchDaemons/org.nixos.nix-gc.plist
|
||||
(! grep "<key>UserName</key>" ${config.out}/Library/LaunchDaemons/org.nixos.nix-gc.plist)
|
||||
'';
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
test = ''
|
||||
echo checking /bin/hello >&2
|
||||
! ${pkgs.hello}/bin/hello
|
||||
(! ${pkgs.hello}/bin/hello)
|
||||
'';
|
||||
}
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ in
|
|||
grep "&&" ${config.out}/Library/LaunchDaemons/org.nixos.nix-daemon.plist
|
||||
grep "exec ${nix}/bin/nix-daemon</string>" ${config.out}/Library/LaunchDaemons/org.nixos.nix-daemon.plist
|
||||
grep "<key>KeepAlive</key>" ${config.out}/Library/LaunchDaemons/org.nixos.nix-daemon.plist
|
||||
! grep "<key>Sockets</key>" ${config.out}/Library/LaunchDaemons/org.nixos.nix-daemon.plist
|
||||
(! grep "<key>Sockets</key>" ${config.out}/Library/LaunchDaemons/org.nixos.nix-daemon.plist)
|
||||
|
||||
echo checking NIX_SSL_CERT_FILE in nix-daemon service >&2
|
||||
grep "<key>NIX_SSL_CERT_FILE</key>" ${config.out}/Library/LaunchDaemons/org.nixos.nix-daemon.plist
|
||||
|
|
|
@ -15,11 +15,11 @@ in
|
|||
grep "<string>org.nixos.nix-gc</string>" ${config.out}/Library/LaunchDaemons/org.nixos.nix-gc.plist
|
||||
grep "<string>exec ${nix}/bin/nix-collect-garbage --delete-older-than 30d</string>" ${config.out}/Library/LaunchDaemons/org.nixos.nix-gc.plist
|
||||
grep "<key>UserName</key>" ${config.out}/Library/LaunchDaemons/org.nixos.nix-gc.plist
|
||||
! grep "<string>nixuser</string>" ${config.out}/Library/LaunchDaemons/org.nixos.nix-gc.plist
|
||||
grep "<string>nixuser</string>" ${config.out}/Library/LaunchDaemons/org.nixos.nix-gc.plist
|
||||
|
||||
! grep "<key>KeepAlive</key>" ${config.out}/Library/LaunchDaemons/org.nixos.nix-gc.plist
|
||||
(! grep "<key>KeepAlive</key>" ${config.out}/Library/LaunchDaemons/org.nixos.nix-gc.plist)
|
||||
|
||||
echo checking nix-gc validation >&2
|
||||
! grep "nix.gc.user = " ${config.out}/activate-user
|
||||
(! grep "nix.gc.user = " ${config.out}/activate-user)
|
||||
'';
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ in
|
|||
grep "<string>/bin/wait4path" ${config.out}/Library/LaunchDaemons/org.nixos.nix-daemon.plist
|
||||
grep "&&" ${config.out}/Library/LaunchDaemons/org.nixos.nix-daemon.plist
|
||||
grep "exec ${nix}/bin/nix-daemon</string>" ${config.out}/Library/LaunchDaemons/org.nixos.nix-daemon.plist
|
||||
! grep "<key>KeepAlive</key>" ${config.out}/Library/LaunchDaemons/org.nixos.nix-daemon.plist
|
||||
(! grep "<key>KeepAlive</key>" ${config.out}/Library/LaunchDaemons/org.nixos.nix-daemon.plist)
|
||||
grep "<key>Sockets</key>" ${config.out}/Library/LaunchDaemons/org.nixos.nix-daemon.plist
|
||||
grep "/nix/var/nix/daemon-socket/socket" ${config.out}/Library/LaunchDaemons/org.nixos.nix-daemon.plist
|
||||
'';
|
||||
|
|
Loading…
Reference in a new issue