From 8a23e42609b3b787f58d6e7e9eb3d5f4f310a74e Mon Sep 17 00:00:00 2001 From: khaneliman Date: Wed, 7 May 2025 15:35:11 +0000 Subject: [PATCH] deploy: 708074ae6db9e0468e4f48477f856e8c2d059795 --- index.xhtml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/index.xhtml b/index.xhtml index 6610e4eb8..1cb1f86fe 100644 --- a/index.xhtml +++ b/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.

It is relatively easy to create tests by modeling the existing tests, found in the tests project directory. For a full reference to the functions available in test scripts, you can look at NMT’s -bash-lib.

The full Home Manager test suite can be run by executing

$ nix-shell --pure tests -A run.all
-

in the project root. List all test cases through

$ nix-shell --pure tests -A list
+bash-lib.

The full Home Manager test suite can be run by executing

$ nix-build --pure --option allow-import-from-derivation false tests -A build.all
+

in the project root. List all test cases through

$ nix-build --pure tests --option allow-import-from-derivation false -A list
 

and run an individual test, for example alacritty-empty-settings, -through

$ nix-shell --pure tests -A run.alacritty-empty-settings
+through

$ nix-build --pure tests --option allow-import-from-derivation false -A build.alacritty-empty-settings
 

However, those invocations will impurely source the system’s Nixpkgs, and may cause failures. To run against the Nixpkgs from the flake.lock file, -use instead e.g.

$ nix build --reference-lock-file flake.lock ./tests#test-all
-

or

$ nix build --reference-lock-file flake.lock ./tests#test-alacritty-empty-settings
+use instead e.g.

$ nix build --reference-lock-file flake.lock --option allow-import-from-derivation false ./tests#test-all
+

or

$ nix build --reference-lock-file flake.lock --option allow-import-from-derivation false ./tests#test-alacritty-empty-settings
+

Some tests may be marked with enableLegacyIfd, those may be run by run with e.g.

$ nix-build --pure tests --arg enableLegacyIfd true -A build.mytest
 

Third-Party Tools and Extensions

Here is a collection of tools and extensions that relate to Home