aboutsummaryrefslogtreecommitdiff
path: root/tests/nixos/coredumps/default.nix
blob: 3d0d62945a461e4cde30a6d0ca7d27f3a15acbd4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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; }"')
  '';
}