3
0
Fork 0
forked from mirrors/nixpkgs

* Fix indentation.

svn path=/nixos/trunk/; revision=24254
This commit is contained in:
Eelco Dolstra 2010-10-12 22:03:50 +00:00
parent fa04ae9738
commit 52a8a529b3

View file

@ -302,37 +302,31 @@ in {
{ inherit iso; { inherit iso;
nodes = { }; nodes = { };
testScript = testScript =
'' ''
# damn, it's costly to evaluate nixos-rebuild (1G of ram) # damn, it's costly to evaluate nixos-rebuild (1G of ram)
my $machine = Machine->new({ cdrom => glob("${iso}/iso/*.iso"), qemuFlags => '${qemuNICFlags 1 1} -m 1024' }); my $machine = Machine->new({ cdrom => glob("${iso}/iso/*.iso"), qemuFlags => '${qemuNICFlags 1 1} -m 1024' });
$machine->start; $machine->start;
# Make sure that we get a login prompt etc. # Make sure that we don't try to download anything.
$machine->mustSucceed("echo hello"); $machine->stopJob("dhclient");
$machine->waitForJob("tty1"); $machine->mustSucceed("rm /etc/resolv.conf");
$machine->waitForJob("rogue");
$machine->waitForJob("nixos-manual");
# Make sure that we don't try to download anything. # Enable sshd service.
$machine->stopJob("dhclient"); $machine->mustSucceed(
$machine->mustSucceed("rm /etc/resolv.conf"); "sed -i 's,^}\$,jobs.sshd.startOn = pkgs.lib.mkOverride 0 \"startup\"; },' /etc/nixos/configuration.nix"
);
# Enable sshd service. my $cfg = $machine->mustSucceed("cat /etc/nixos/configuration.nix");
$machine->mustSucceed( print STDERR "New CD config:\n$cfg\n";
"sed -i 's,^}\$,jobs.sshd.startOn = pkgs.lib.mkOverride 0 \"startup\"; },' /etc/nixos/configuration.nix"
);
my $cfg = $machine->mustSucceed("cat /etc/nixos/configuration.nix"); # Apply the new CD configuration.
print STDERR "New CD config:\n$cfg\n"; $machine->mustSucceed("nixos-rebuild test --no-pull");
# Apply the new CD configuration. # Connect to it-self.
$machine->mustSucceed("nixos-rebuild test --no-pull"); #$machine->waitForJob("sshd");
#$machine->mustSucceed("ssh root@127.0.0.1 echo hello");
# Connect to it-self. $machine->shutdown;
#$machine->waitForJob("sshd"); '';
#$machine->mustSucceed("ssh root@127.0.0.1 echo hello");
$machine->shutdown;
'';
}; };
} }