nixos/doc/running-nixos-tests: Simplify running instructions with nixosTests
This commit is contained in:
parent
6e2f753989
commit
537f456373
@ -2,22 +2,11 @@
|
|||||||
|
|
||||||
You can run tests using `nix-build`. For example, to run the test
|
You can run tests using `nix-build`. For example, to run the test
|
||||||
[`login.nix`](https://github.com/NixOS/nixpkgs/blob/master/nixos/tests/login.nix),
|
[`login.nix`](https://github.com/NixOS/nixpkgs/blob/master/nixos/tests/login.nix),
|
||||||
you just do:
|
you do:
|
||||||
|
|
||||||
```ShellSession
|
```ShellSession
|
||||||
$ nix-build '<nixpkgs/nixos/tests/login.nix>'
|
$ cd /my/git/clone/of/nixpkgs
|
||||||
```
|
$ nix-build -A nixosTests.login
|
||||||
|
|
||||||
or, if you don't want to rely on `NIX_PATH`:
|
|
||||||
|
|
||||||
```ShellSession
|
|
||||||
$ cd /my/nixpkgs/nixos/tests
|
|
||||||
$ nix-build login.nix
|
|
||||||
…
|
|
||||||
running the VM test script
|
|
||||||
machine: QEMU running (pid 8841)
|
|
||||||
…
|
|
||||||
6 out of 6 tests succeeded
|
|
||||||
```
|
```
|
||||||
|
|
||||||
After building/downloading all required dependencies, this will perform
|
After building/downloading all required dependencies, this will perform
|
||||||
|
@ -4,22 +4,11 @@
|
|||||||
You can run tests using <literal>nix-build</literal>. For example,
|
You can run tests using <literal>nix-build</literal>. For example,
|
||||||
to run the test
|
to run the test
|
||||||
<link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/nixos/tests/login.nix"><literal>login.nix</literal></link>,
|
<link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/nixos/tests/login.nix"><literal>login.nix</literal></link>,
|
||||||
you just do:
|
you do:
|
||||||
</para>
|
</para>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
$ nix-build '<nixpkgs/nixos/tests/login.nix>'
|
$ cd /my/git/clone/of/nixpkgs
|
||||||
</programlisting>
|
$ nix-build -A nixosTests.login
|
||||||
<para>
|
|
||||||
or, if you don’t want to rely on <literal>NIX_PATH</literal>:
|
|
||||||
</para>
|
|
||||||
<programlisting>
|
|
||||||
$ cd /my/nixpkgs/nixos/tests
|
|
||||||
$ nix-build login.nix
|
|
||||||
…
|
|
||||||
running the VM test script
|
|
||||||
machine: QEMU running (pid 8841)
|
|
||||||
…
|
|
||||||
6 out of 6 tests succeeded
|
|
||||||
</programlisting>
|
</programlisting>
|
||||||
<para>
|
<para>
|
||||||
After building/downloading all required dependencies, this will
|
After building/downloading all required dependencies, this will
|
||||||
|
Loading…
Reference in New Issue
Block a user