···2233You can run tests using `nix-build`. For example, to run the test
44[`login.nix`](https://github.com/NixOS/nixpkgs/blob/master/nixos/tests/login.nix),
55-you just do:
55+you do:
6677```ShellSession
88-$ nix-build '<nixpkgs/nixos/tests/login.nix>'
99-```
1010-1111-or, if you don't want to rely on `NIX_PATH`:
1212-1313-```ShellSession
1414-$ cd /my/nixpkgs/nixos/tests
1515-$ nix-build login.nix
1616-…
1717-running the VM test script
1818-machine: QEMU running (pid 8841)
1919-…
2020-6 out of 6 tests succeeded
88+$ cd /my/git/clone/of/nixpkgs
99+$ nix-build -A nixosTests.login
2110```
22112312After building/downloading all required dependencies, this will perform
···44 You can run tests using <literal>nix-build</literal>. For example,
55 to run the test
66 <link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/nixos/tests/login.nix"><literal>login.nix</literal></link>,
77- you just do:
77+ you do:
88 </para>
99 <programlisting>
1010-$ nix-build '<nixpkgs/nixos/tests/login.nix>'
1111-</programlisting>
1212- <para>
1313- or, if you don’t want to rely on <literal>NIX_PATH</literal>:
1414- </para>
1515- <programlisting>
1616-$ cd /my/nixpkgs/nixos/tests
1717-$ nix-build login.nix
1818-…
1919-running the VM test script
2020-machine: QEMU running (pid 8841)
2121-…
2222-6 out of 6 tests succeeded
1010+$ cd /my/git/clone/of/nixpkgs
1111+$ nix-build -A nixosTests.login
2312</programlisting>
2413 <para>
2514 After building/downloading all required dependencies, this will