lix/tests/nixos/coredumps/default.nix
2024-05-16 17:11:21 -07:00

15 lines
490 B
Nix

let
inherit (import ../util.nix) mkNixBuildTest;
in mkNixBuildTest rec {
name = "coredumps";
extraMachineConfig = { pkgs, ... }: {
boot.kernel.sysctl."kernel.core_pattern" = "core";
};
expressionFile = ./package.nix;
testScriptPost = ''
# do a test, but this time with coredumps enabled.
machine.succeed('nix-build --option enable-core-dumps true --expr "let pkgs = import <nixpkgs> {}; in pkgs.callPackage ${expressionFile} { shouldBePresent = true; }"')
'';
}