mirror of
https://github.com/nix-community/home-manager.git
synced 2025-12-05 08:31:03 +01:00
deploy: 708074ae6d
This commit is contained in:
parent
32d90c00e7
commit
8a23e42609
1 changed files with 6 additions and 5 deletions
11
index.xhtml
11
index.xhtml
|
|
@ -933,14 +933,15 @@ the form of "golden tests" where, for example, a generated
|
||||||
configuration file is compared to a known correct file.</p><p>It is relatively easy to create tests by modeling the existing tests,
|
configuration file is compared to a known correct file.</p><p>It is relatively easy to create tests by modeling the existing tests,
|
||||||
found in the <code class="literal">tests</code> project directory. For a full reference to the
|
found in the <code class="literal">tests</code> project directory. For a full reference to the
|
||||||
functions available in test scripts, you can look at NMT’s
|
functions available in test scripts, you can look at NMT’s
|
||||||
<a class="link" href="https://git.sr.ht/~rycee/nmt/tree/master/item/bash-lib" target="_top">bash-lib</a>.</p><p>The full Home Manager test suite can be run by executing</p><pre><code class="programlisting shell">$ nix-shell --pure tests -A run.all
|
<a class="link" href="https://git.sr.ht/~rycee/nmt/tree/master/item/bash-lib" target="_top">bash-lib</a>.</p><p>The full Home Manager test suite can be run by executing</p><pre><code class="programlisting shell">$ nix-build --pure --option allow-import-from-derivation false tests -A build.all
|
||||||
</code></pre><p>in the project root. List all test cases through</p><pre><code class="programlisting shell">$ nix-shell --pure tests -A list
|
</code></pre><p>in the project root. List all test cases through</p><pre><code class="programlisting shell">$ nix-build --pure tests --option allow-import-from-derivation false -A list
|
||||||
</code></pre><p>and run an individual test, for example <code class="literal">alacritty-empty-settings</code>,
|
</code></pre><p>and run an individual test, for example <code class="literal">alacritty-empty-settings</code>,
|
||||||
through</p><pre><code class="programlisting shell">$ nix-shell --pure tests -A run.alacritty-empty-settings
|
through</p><pre><code class="programlisting shell">$ nix-build --pure tests --option allow-import-from-derivation false -A build.alacritty-empty-settings
|
||||||
</code></pre><p>However, those invocations will impurely source the system’s Nixpkgs,
|
</code></pre><p>However, those invocations will impurely source the system’s Nixpkgs,
|
||||||
and may cause failures. To run against the Nixpkgs from the <code class="literal">flake.lock</code> file,
|
and may cause failures. To run against the Nixpkgs from the <code class="literal">flake.lock</code> file,
|
||||||
use instead e.g.</p><pre><code class="programlisting shell">$ nix build --reference-lock-file flake.lock ./tests#test-all
|
use instead e.g.</p><pre><code class="programlisting shell">$ nix build --reference-lock-file flake.lock --option allow-import-from-derivation false ./tests#test-all
|
||||||
</code></pre><p>or</p><pre><code class="programlisting shell">$ nix build --reference-lock-file flake.lock ./tests#test-alacritty-empty-settings
|
</code></pre><p>or</p><pre><code class="programlisting shell">$ nix build --reference-lock-file flake.lock --option allow-import-from-derivation false ./tests#test-alacritty-empty-settings
|
||||||
|
</code></pre><p>Some tests may be marked with <code class="literal">enableLegacyIfd</code>, those may be run by run with e.g.</p><pre><code class="programlisting shell">$ nix-build --pure tests --arg enableLegacyIfd true -A build.mytest
|
||||||
</code></pre>
|
</code></pre>
|
||||||
</div>
|
</div>
|
||||||
</div><div class="part"> <div class="titlepage"> <div> <div> <h1 id="ch-3rd-party" class="title" >Third-Party Tools and Extensions </h1> </div> </div></div><div class="partintro"><p>Here is a collection of tools and extensions that relate to Home
|
</div><div class="part"> <div class="titlepage"> <div> <div> <h1 id="ch-3rd-party" class="title" >Third-Party Tools and Extensions </h1> </div> </div></div><div class="partintro"><p>Here is a collection of tools and extensions that relate to Home
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue