3
0
Fork 0
forked from mirrors/nixpkgs

Fix the sshd check in the rebuildCD test

Also reduce the amount of memory.
This commit is contained in:
Eelco Dolstra 2013-07-09 16:12:34 +02:00
parent 5000d99149
commit fd14641ef5
2 changed files with 5 additions and 6 deletions

View file

@ -41,7 +41,7 @@ with pkgs.lib;
# Allow sshd to be started manually through "start sshd".
services.openssh.enable = true;
jobs.sshd.startOn = pkgs.lib.mkOverride 50 "";
systemd.services.sshd.wantedBy = mkOverride 50 [];
# Enable wpa_supplicant, but don't start it by default.
networking.wireless.enable = true;

View file

@ -326,13 +326,12 @@ in {
nodes = { };
testScript =
''
# damn, it's costly to evaluate nixos-rebuild (1G of ram)
my $machine = createMachine({ cdrom => glob("${iso}/iso/*.iso"), qemuFlags => '-m 1024' });
my $machine = createMachine({ cdrom => glob("${iso}/iso/*.iso"), qemuFlags => '-m 768' });
$machine->start;
# Enable sshd service.
$machine->succeed(
"sed -i 's,^}\$,jobs.sshd.startOn = pkgs.lib.mkOverride 0 \"startup\"; },' /etc/nixos/configuration.nix"
"sed -i 's,^}\$,systemd.services.sshd.wantedBy = pkgs.lib.mkOverride 0 [\"multi-user.target\"]; },' /etc/nixos/configuration.nix"
);
$machine->succeed("cat /etc/nixos/configuration.nix >&2");
@ -341,8 +340,8 @@ in {
$machine->succeed("nixos-rebuild test");
# Connect to it-self.
#$machine->waitForUnit("sshd");
#$machine->succeed("ssh root@127.0.0.1 echo hello");
$machine->waitForUnit("sshd");
$machine->waitForOpenPort(22);
$machine->shutdown;
'';