Unverified Commit 457564bb authored by Paul Haerle's avatar Paul Haerle Committed by GitHub
Browse files

nyxt: init nixos test (#427912)

parents 6b0b1559 1522cd7c
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1084,6 +1084,7 @@ in
  ntpd-rs = runTest ./ntpd-rs.nix;
  nvidia-container-toolkit = runTest ./nvidia-container-toolkit.nix;
  nvmetcfg = runTest ./nvmetcfg.nix;
  nyxt = runTest ./nyxt.nix;
  nzbget = runTest ./nzbget.nix;
  nzbhydra2 = runTest ./nzbhydra2.nix;
  ocis = runTest ./ocis.nix;

nixos/tests/nyxt.nix

0 → 100644
+35 −0
Original line number Diff line number Diff line
{
  pkgs,
  lib,
  ...
}:
{
  name = "nyxt";

  meta.maintainers = with lib.maintainers; [ ethancedwards8 ];

  nodes.machine = {
    imports = [
      # sets up x11 with autologin
      ./common/x11.nix
    ];

    environment.systemPackages = with pkgs; [ nyxt ];

    # not enough memory for the allocation
    virtualisation.memorySize = 2048;
  };

  enableOCR = true;

  testScript =
    { nodes, ... }:
    ''
      start_all()
      machine.wait_for_x()

      with subtest("Wait until Nyxt has finished loading the Valgrind docs page"):
        machine.execute("xterm -e 'nyxt file://${pkgs.valgrind.doc}/share/doc/valgrind/html/index.html' >&2 &");
        machine.wait_for_window("nyxt")
    '';
}
+2 −0
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@
  xclip,
  wl-clipboard,
  nix-update-script,
  nixosTests,
}:

stdenv.mkDerivation (finalAttrs: {
@@ -104,6 +105,7 @@ stdenv.mkDerivation (finalAttrs: {
  passthru = {
    tests.version = testers.testVersion { package = finalAttrs.finalPackage; };
    updateScript = nix-update-script { };
    tests = { inherit (nixosTests) nyxt; };
  };

  meta = with lib; {