|
|
|
@ -410,7 +410,7 @@ $ qemu-system-x86_64 -kernel ./kernel/bzImage -initrd ./initrd/initrd -hda /dev/ |
|
|
|
|
crashes). It will first build or download all the dependencies of |
|
|
|
|
the test (e.g., all packages needed to run a NixOS VM). The test |
|
|
|
|
is defined in <link |
|
|
|
|
xlink:href="https://svn.nixos.org/repos/nix/nixos/trunk/tests/nfs.nix"> |
|
|
|
|
xlink:href="https://nixos.org/repos/nix/nixos/trunk/tests/nfs.nix"> |
|
|
|
|
<filename>tests/nfs.nix</filename></link>. If the test succeeds, |
|
|
|
|
<command>nix-build</command> will place a symlink |
|
|
|
|
<filename>./result</filename> in the current directory pointing at |
|
|
|
@ -483,7 +483,7 @@ $ qemu-system-x86_64 -kernel ./kernel/bzImage -initrd ./initrd/initrd -hda /dev/ |
|
|
|
|
<para> |
|
|
|
|
The actual Nix programming interface to VM testing is in NixOS, |
|
|
|
|
under <link |
|
|
|
|
xlink:href="https://svn.nixos.org/repos/nix/nixos/trunk/lib/testing.nix"> |
|
|
|
|
xlink:href="https://nixos.org/repos/nix/nixos/trunk/lib/testing.nix"> |
|
|
|
|
<filename>lib/testing.nix</filename></link>. This file defines a |
|
|
|
|
function which takes an attribute set containing a |
|
|
|
|
<literal>nixpkgs</literal> attribute (the path to a Nixpkgs |
|
|
|
@ -496,7 +496,7 @@ $ qemu-system-x86_64 -kernel ./kernel/bzImage -initrd ./initrd/initrd -hda /dev/ |
|
|
|
|
<para> |
|
|
|
|
The <literal>makeTest</literal> function takes a function similar to |
|
|
|
|
that found in <link |
|
|
|
|
xlink:href="https://svn.nixos.org/repos/nix/nixos/trunk/tests/nfs.nix"> |
|
|
|
|
xlink:href="https://nixos.org/repos/nix/nixos/trunk/tests/nfs.nix"> |
|
|
|
|
<filename>tests/nfs.nix</filename></link> (discussed above). It |
|
|
|
|
returns an attribute set containing (among others): |
|
|
|
|
|
|
|
|
|