nixosTests.{qtile,qtile-extras}: Seperate to distint tests
This commit is contained in:
parent
29c8aa18b9
commit
9200c874c5
@ -1250,7 +1250,8 @@ in
|
||||
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;
|
||||
|
||||
@ -1,6 +1,9 @@
|
||||
{ stdenvNoCC, fetchurl }:
|
||||
{
|
||||
stdenvNoCC,
|
||||
fetchurl,
|
||||
}:
|
||||
stdenvNoCC.mkDerivation {
|
||||
name = "qtile-config";
|
||||
name = "qtile-extras-config";
|
||||
version = "0.0.1";
|
||||
|
||||
src = fetchurl {
|
||||
@ -1,18 +1,24 @@
|
||||
{ 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
|
||||
{
|
||||
@ -43,10 +49,8 @@
|
||||
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")
|
||||
'';
|
||||
}
|
||||
46
nixos/tests/qtile.nix
Normal file
46
nixos/tests/qtile.nix
Normal file
@ -0,0 +1,46 @@
|
||||
{ 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")
|
||||
'';
|
||||
}
|
||||
@ -17,8 +17,8 @@
|
||||
requests,
|
||||
setuptools-scm,
|
||||
xorgserver,
|
||||
nixosTests,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "qtile-extras";
|
||||
version = "0.33.0";
|
||||
@ -86,6 +86,8 @@ buildPythonPackage rec {
|
||||
|
||||
pythonImportsCheck = [ "qtile_extras" ];
|
||||
|
||||
passthru.tests.qtile-extras = nixosTests.qtile-extras;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Extra modules and widgets for the Qtile tiling window manager";
|
||||
homepage = "https://github.com/elParaguayo/qtile-extras";
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user