From 5b7dcb3005ed38d4634f228f01852ae18b2d9cd4 Mon Sep 17 00:00:00 2001 From: midnightveil Date: Fri, 10 May 2024 15:25:12 +1000 Subject: Allow enabling core dumps from builds for nix & child processes Fixes https://git.lix.systems/lix-project/lix/issues/268 Change-Id: I3f1b0ddf064f891cca8b53229c5c31c74cea3d9f --- tests/nixos/util.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'tests/nixos/util.nix') 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 {}; in pkgs.callPackage ${expressionFile} {}"') + + ${testScriptPost} ''; }; } -- cgit v1.2.3