@@ -1,36 +0,0 @@
1−<section xmlns="http://docbook.org/ns/docbook"
2− xmlns:xlink="http://www.w3.org/1999/xlink"
3− xmlns:xi="http://www.w3.org/2001/XInclude"
4− version="5.0"
5− xml:id="sec-running-nixos-tests">
6− <title>Running Tests</title>
7−
8− <para>
9− You can run tests using <command>nix-build</command>. For example, to run the
10− test
11− <filename
12−xlink:href="https://github.com/NixOS/nixpkgs/blob/master/nixos/tests/login.nix">login.nix</filename>,
13− you just do:
14−<screen>
15−<prompt>$ </prompt>nix-build '<nixpkgs/nixos/tests/login.nix>'
16−</screen>
17− or, if you don’t want to rely on <envar>NIX_PATH</envar>:
18−<screen>
19−<prompt>$ </prompt>cd /my/nixpkgs/nixos/tests
20−<prompt>$ </prompt>nix-build login.nix
21−…
22−running the VM test script
23−machine: QEMU running (pid 8841)
24−…
25−6 out of 6 tests succeeded
26−</screen>
27− After building/downloading all required dependencies, this will perform a
28− build that starts a QEMU/KVM virtual machine containing a NixOS system. The
29− virtual machine mounts the Nix store of the host; this makes VM creation very
30− fast, as no disk image needs to be created. Afterwards, you can view a
31− pretty-printed log of the test:
32−<screen>
33−<prompt>$ </prompt>firefox result/log.html
34−</screen>
35− </para>
36−</section>