1import ./make-test-python.nix (
2 { lib, ... }:
3 {
4 name = "watchdogd";
5 meta.maintainers = with lib.maintainers; [ vifino ];
6
7 nodes.machine =
8 { pkgs, ... }:
9 {
10 virtualisation.qemu.options = [
11 "-device i6300esb" # virtual watchdog timer
12 ];
13 boot.kernelModules = [ "i6300esb" ];
14 services.watchdogd.enable = true;
15 services.watchdogd.settings = {
16 supervisor.enabled = true;
17 };
18 };
19
20 testScript = ''
21 machine.wait_for_unit("watchdogd.service")
22
23 assert "i6300ESB" in machine.succeed("watchdogctl status")
24 machine.succeed("watchdogctl test")
25 '';
26 }
27)