qtile: add passthru tests
This commit is contained in:
parent
06fc875337
commit
1cdb19472c
|
@ -772,6 +772,7 @@ in {
|
||||||
qgis = handleTest ./qgis.nix { qgisPackage = pkgs.qgis; };
|
qgis = handleTest ./qgis.nix { qgisPackage = pkgs.qgis; };
|
||||||
qgis-ltr = handleTest ./qgis.nix { qgisPackage = pkgs.qgis-ltr; };
|
qgis-ltr = handleTest ./qgis.nix { qgisPackage = pkgs.qgis-ltr; };
|
||||||
qownnotes = handleTest ./qownnotes.nix {};
|
qownnotes = handleTest ./qownnotes.nix {};
|
||||||
|
qtile = handleTest ./qtile.nix {};
|
||||||
quake3 = handleTest ./quake3.nix {};
|
quake3 = handleTest ./quake3.nix {};
|
||||||
quicktun = handleTest ./quicktun.nix {};
|
quicktun = handleTest ./quicktun.nix {};
|
||||||
quorum = handleTest ./quorum.nix {};
|
quorum = handleTest ./quorum.nix {};
|
||||||
|
|
34
nixos/tests/qtile.nix
Normal file
34
nixos/tests/qtile.nix
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
import ./make-test-python.nix ({ lib, ...} : {
|
||||||
|
name = "qtile";
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
maintainers = with lib.maintainers; [ sigmanificient ];
|
||||||
|
};
|
||||||
|
|
||||||
|
nodes.machine = { pkgs, lib, ... }: {
|
||||||
|
imports = [ ./common/x11.nix ./common/user-account.nix ];
|
||||||
|
test-support.displayManager.auto.user = "alice";
|
||||||
|
|
||||||
|
services.xserver.windowManager.qtile.enable = true;
|
||||||
|
services.displayManager.defaultSession = lib.mkForce "none+qtile";
|
||||||
|
|
||||||
|
environment.systemPackages = [ pkgs.kitty ];
|
||||||
|
};
|
||||||
|
|
||||||
|
testScript = ''
|
||||||
|
with subtest("ensure x starts"):
|
||||||
|
machine.wait_for_x()
|
||||||
|
machine.wait_for_file("/home/alice/.Xauthority")
|
||||||
|
machine.succeed("xauth merge ~alice/.Xauthority")
|
||||||
|
|
||||||
|
with subtest("ensure client is available"):
|
||||||
|
machine.succeed("qtile --version")
|
||||||
|
|
||||||
|
with subtest("ensure we can open a new terminal"):
|
||||||
|
machine.sleep(2)
|
||||||
|
machine.send_key("meta_l-ret")
|
||||||
|
machine.wait_for_window(r"alice.*?machine")
|
||||||
|
machine.sleep(2)
|
||||||
|
machine.screenshot("terminal")
|
||||||
|
'';
|
||||||
|
})
|
|
@ -28,6 +28,7 @@
|
||||||
, xcbutilwm
|
, xcbutilwm
|
||||||
, xcffib
|
, xcffib
|
||||||
, xkbcommon
|
, xkbcommon
|
||||||
|
, nixosTests
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
|
@ -89,7 +90,11 @@ buildPythonPackage rec {
|
||||||
xcbutilwm
|
xcbutilwm
|
||||||
];
|
];
|
||||||
|
|
||||||
doCheck = false; # Requires X server #TODO this can be worked out with the existing NixOS testing infrastructure.
|
doCheck = false;
|
||||||
|
passthru = {
|
||||||
|
tests.qtile = nixosTests.qtile;
|
||||||
|
providedSessions = [ "qtile" ];
|
||||||
|
};
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "http://www.qtile.org/";
|
homepage = "http://www.qtile.org/";
|
||||||
|
|
Loading…
Reference in New Issue
Block a user