forked from mirrors/nixpkgs
tests/virtualbox: Use antiquotes for log sockets.
We're simply using antiquotation, since it's been a while since these got introduced (in Nix 1.7). So we can use them because it makes the code much more readable. As usual, I made sure that I didn't accidentally change something in functionality: $ nix-instantiate nixos/tests/virtualbox.nix ... /nix/store/cldxyrxqvwpqm02cd3lvknnmj4qmblyn-vm-test-run-virtualbox.drv $ git stash pop ... $ nix-instantiate nixos/tests/virtualbox.nix ... /nix/store/cldxyrxqvwpqm02cd3lvknnmj4qmblyn-vm-test-run-virtualbox.drv $ Signed-off-by: aszlig <aszlig@redmoonstudios.org>
This commit is contained in:
parent
17f58275a0
commit
29f535761a
|
@ -171,27 +171,21 @@ import ./make-test.nix ({ pkgs, ... }: with pkgs.lib; let
|
|||
];
|
||||
in {
|
||||
machine = {
|
||||
systemd.sockets = listToAttrs (singleton {
|
||||
name = "vboxtestlog-${name}";
|
||||
value = {
|
||||
description = "VirtualBox Test Machine Log Socket";
|
||||
wantedBy = [ "sockets.target" ];
|
||||
before = [ "multi-user.target" ];
|
||||
socketConfig.ListenStream = "/run/virtualbox-log-${name}.sock";
|
||||
socketConfig.Accept = true;
|
||||
};
|
||||
});
|
||||
systemd.sockets."vboxtestlog-${name}" = {
|
||||
description = "VirtualBox Test Machine Log Socket";
|
||||
wantedBy = [ "sockets.target" ];
|
||||
before = [ "multi-user.target" ];
|
||||
socketConfig.ListenStream = "/run/virtualbox-log-${name}.sock";
|
||||
socketConfig.Accept = true;
|
||||
};
|
||||
|
||||
systemd.services = listToAttrs (singleton {
|
||||
name = "vboxtestlog-${name}@";
|
||||
value = {
|
||||
description = "VirtualBox Test Machine Log";
|
||||
serviceConfig.StandardInput = "socket";
|
||||
serviceConfig.StandardOutput = "syslog";
|
||||
serviceConfig.SyslogIdentifier = "GUEST-${name}";
|
||||
serviceConfig.ExecStart = "${pkgs.coreutils}/bin/cat";
|
||||
};
|
||||
});
|
||||
systemd.services."vboxtestlog-${name}@" = {
|
||||
description = "VirtualBox Test Machine Log";
|
||||
serviceConfig.StandardInput = "socket";
|
||||
serviceConfig.StandardOutput = "syslog";
|
||||
serviceConfig.SyslogIdentifier = "GUEST-${name}";
|
||||
serviceConfig.ExecStart = "${pkgs.coreutils}/bin/cat";
|
||||
};
|
||||
};
|
||||
|
||||
testSubs = ''
|
||||
|
|
Loading…
Reference in a new issue