* Test swapfile creation.
svn path=/nixos/trunk/; revision=34479
This commit is contained in:
parent
15d44498f9
commit
97b81d7e6e
@ -4,7 +4,11 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
machine = { config, pkgs, ... }: { };
|
machine =
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
{ swapDevices = pkgs.lib.mkOverride 0
|
||||||
|
[ { device = "/root/swapfile"; size = 128; } ];
|
||||||
|
};
|
||||||
|
|
||||||
testScript =
|
testScript =
|
||||||
''
|
''
|
||||||
@ -23,6 +27,12 @@
|
|||||||
subtest "gmp", sub {
|
subtest "gmp", sub {
|
||||||
$machine->succeed("expr 1 + 2");
|
$machine->succeed("expr 1 + 2");
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Test that the swap file got created.
|
||||||
|
subtest "swapfile", sub {
|
||||||
|
$machine->waitUntilSucceeds("cat /proc/swaps | grep /root/swapfile");
|
||||||
|
$machine->succeed("ls -l /root/swapfile | grep 134217728");
|
||||||
|
};
|
||||||
'';
|
'';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user