diff options
author | midnightveil <midnight@trainwit.ch> | 2024-05-10 15:25:12 +1000 |
---|---|---|
committer | Jade Lovelace <lix@jade.fyi> | 2024-05-16 17:11:21 -0700 |
commit | 5b7dcb3005ed38d4634f228f01852ae18b2d9cd4 (patch) | |
tree | a254515d74a24144865ae37ef468306b2e112a85 /tests/nixos/util.nix | |
parent | 9322a1cbe775a32c7019a91236d9e37037b9241a (diff) |
Allow enabling core dumps from builds for nix & child processes
Fixes https://git.lix.systems/lix-project/lix/issues/268
Change-Id: I3f1b0ddf064f891cca8b53229c5c31c74cea3d9f
Diffstat (limited to 'tests/nixos/util.nix')
-rw-r--r-- | tests/nixos/util.nix | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/nixos/util.nix b/tests/nixos/util.nix index 0c51cc075..1b8b4223c 100644 --- a/tests/nixos/util.nix +++ b/tests/nixos/util.nix @@ -1,5 +1,6 @@ { - mkNixBuildTest = { name, expressionFile, extraMachineConfig ? {} }: + mkNixBuildTest = + { name, expressionFile, extraMachineConfig ? {}, testScriptPre ? "", testScriptPost ? "" }: { lib, pkgs, ... }: { inherit name; @@ -17,7 +18,11 @@ testScript = { nodes }: '' start_all() + ${testScriptPre} + machine.succeed('nix-build --expr "let pkgs = import <nixpkgs> {}; in pkgs.callPackage ${expressionFile} {}"') + + ${testScriptPost} ''; }; } |