nixosTests.{qtile,qtile-extras}: Seperate to distint tests

Gurjaka 9200c874 29c8aa18

Changed files
+66 -10
nixos
pkgs
development
python-modules
qtile-extras
+2 -1
nixos/tests/all-tests.nix
···
qgis = handleTest ./qgis.nix { package = pkgs.qgis; };
qgis-ltr = handleTest ./qgis.nix { package = pkgs.qgis-ltr; };
qownnotes = runTest ./qownnotes.nix;
-
qtile = runTestOn [ "x86_64-linux" "aarch64-linux" ] ./qtile/default.nix;
+
qtile = runTestOn [ "x86_64-linux" "aarch64-linux" ] ./qtile.nix;
+
qtile-extras = runTestOn [ "x86_64-linux" "aarch64-linux" ] ./qtile-extras/default.nix;
quake3 = runTest ./quake3.nix;
quicktun = runTest ./quicktun.nix;
quickwit = runTest ./quickwit.nix;
+46
nixos/tests/qtile.nix
···
+
{ lib, ... }:
+
{
+
name = "qtile";
+
+
meta = {
+
maintainers = with lib.maintainers; [
+
sigmanificient
+
gurjaka
+
];
+
};
+
+
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 "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.send_key("meta_l-ret")
+
machine.wait_for_window(r"alice.*?machine")
+
machine.screenshot("terminal")
+
'';
+
}
nixos/tests/qtile/add-widget.patch nixos/tests/qtile-extras/add-widget.patch
+5 -2
nixos/tests/qtile/config.nix nixos/tests/qtile-extras/config.nix
···
-
{ stdenvNoCC, fetchurl }:
+
{
+
stdenvNoCC,
+
fetchurl,
+
}:
stdenvNoCC.mkDerivation {
-
name = "qtile-config";
+
name = "qtile-extras-config";
version = "0.0.1";
src = fetchurl {
+10 -6
nixos/tests/qtile/default.nix nixos/tests/qtile-extras/default.nix
···
{ lib, ... }:
{
-
name = "qtile";
+
name = "qtile-extras";
meta = {
-
maintainers = with lib.maintainers; [ sigmanificient ];
+
maintainers = with lib.maintainers; [
+
sigmanificient
+
gurjaka
+
];
};
nodes.machine =
-
{ pkgs, lib, ... }:
+
{
+
pkgs,
+
lib,
+
...
+
}:
let
# We create a custom Qtile configuration file that adds a widget from
# qtile-extras to the bar. This ensure that the qtile-extras package
# also works, and that extraPackages behave as expected.
-
config-deriv = pkgs.callPackage ./config.nix { };
in
{
···
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")
'';
}
+3 -1
pkgs/development/python-modules/qtile-extras/default.nix
···
requests,
setuptools-scm,
xorgserver,
+
nixosTests,
}:
-
buildPythonPackage rec {
pname = "qtile-extras";
version = "0.33.0";
···
'';
pythonImportsCheck = [ "qtile_extras" ];
+
+
passthru.tests.qtile-extras = nixosTests.qtile-extras;
meta = with lib; {
description = "Extra modules and widgets for the Qtile tiling window manager";