# The flake's `checks` output. One file per check; this is only the wiring. # # unit -- pytest over tests/, against the nix/package.nix build # vm-basic -- nixosTest with a fake capture backend: module + wire contract # vm-hyprland -- nixosTest with the real compositor and grim # vm-sessions -- nixosTest with the real compositor and the session broker # vm-ipc -- the compositor's IPC sockets, and an event that arrives # vm-containers -- one output and one workspace per session # vm-pointer -- the lease, the driver, and a click the application saw # vm-stream-firewall -- the stream's port in the guest's own running firewall # # What the guests need lives in checks/lib: `test-tools.nix` for the fake # capture and the contract asserter, `session-tools.nix` for the event # subscriber and the pointer target, `session-machine.nix` for the guest the # three session checks share, and `session-prelude.nix` for their test-script # helpers. # # Run them ONE AT A TIME. Each boots a VM with a software-rendered compositor; # two at once on a two-core machine make the timing-sensitive assertions flake, # and a flaky green is worth less than a slow one. { pkgs, self, system, }: let hhstream = self.packages.${system}.hhstream; hhsModule = self.nixosModules.default; testTools = pkgs.callPackage ./lib/test-tools.nix { }; # The three session checks take the same five arguments; naming them once # keeps a new check from being wired up with a different compositor or a # different package than its neighbours. sessionArgs = { inherit hhstream hhsModule testTools; }; in { unit = pkgs.callPackage ./unit.nix { inherit hhstream; }; vm-basic = pkgs.callPackage ./vm-basic.nix { inherit hhstream hhsModule testTools; }; vm-hyprland = pkgs.callPackage ./vm-hyprland.nix { inherit hhstream hhsModule testTools; }; vm-sessions = pkgs.callPackage ./vm-sessions.nix { inherit hhstream hhsModule testTools; }; vm-ipc = pkgs.callPackage ./vm-ipc.nix sessionArgs; vm-containers = pkgs.callPackage ./vm-containers.nix sessionArgs; vm-pointer = pkgs.callPackage ./vm-pointer.nix sessionArgs; # Not a `sessionArgs` consumer: this one is about the module's own options, # not about the broker or the compositor (see the file's header). vm-stream-firewall = pkgs.callPackage ./vm-stream-firewall.nix { inherit hhstream hhsModule testTools; }; }