Commit b355be2d authored by Gregor Kleen's avatar Gregor Kleen Committed by Austin Seipp
Browse files

chrony: add nixos test for ptp_kvm

parent 48ecda09
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -126,6 +126,7 @@ in {
  cfssl = handleTestOn ["aarch64-linux" "x86_64-linux"] ./cfssl.nix {};
  charliecloud = handleTest ./charliecloud.nix {};
  chromium = (handleTestOn ["aarch64-linux" "x86_64-linux"] ./chromium.nix {}).stable or {};
  chrony-ptp = handleTestOn ["aarch64-linux" "x86_64-linux"] ./chrony-ptp.nix {};
  cinnamon = handleTest ./cinnamon.nix {};
  cjdns = handleTest ./cjdns.nix {};
  clickhouse = handleTest ./clickhouse.nix {};
+24 −0
Original line number Diff line number Diff line
import ./make-test-python.nix ({ lib, ... }:
{
  name = "chrony-ptp";

  nodes = {
    qemuGuest = { lib, ... }: {
      boot.kernelModules = [ "ptp_kvm" ];

      services.chrony = {
        enable = true;
        extraConfig = ''
          refclock PHC /dev/ptp_kvm poll 2 dpoll -2 offset 0 stratum 3
        '';
      };
    };
  };

  testScript = ''
    start_all()

    qemuGuest.wait_for_unit('multi-user.target')
    qemuGuest.succeed('systemctl is-active chronyd.service')
  '';
})