diff options
Diffstat (limited to 'tests/nixos/coredumps/default.nix')
-rw-r--r-- | tests/nixos/coredumps/default.nix | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/nixos/coredumps/default.nix b/tests/nixos/coredumps/default.nix new file mode 100644 index 000000000..3d0d62945 --- /dev/null +++ b/tests/nixos/coredumps/default.nix @@ -0,0 +1,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; }"') + ''; +} |