about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorKira Bruneau <kira.bruneau@pm.me>2022-09-20 19:39:13 -0400
committerKira Bruneau <kira.bruneau@pm.me>2022-09-20 20:07:11 -0400
commit2a916b6c292f89a2073bff29e49c50d7fe9af2e5 (patch)
treea304ce3c93cfd1d993c3fafe8a66cef62e3b52a1 /nixos
parent216a21c638907d67b41d5ef7d4cb6ccbc4ab348e (diff)
downloadnixlib-2a916b6c292f89a2073bff29e49c50d7fe9af2e5.tar
nixlib-2a916b6c292f89a2073bff29e49c50d7fe9af2e5.tar.gz
nixlib-2a916b6c292f89a2073bff29e49c50d7fe9af2e5.tar.bz2
nixlib-2a916b6c292f89a2073bff29e49c50d7fe9af2e5.tar.lz
nixlib-2a916b6c292f89a2073bff29e49c50d7fe9af2e5.tar.xz
nixlib-2a916b6c292f89a2073bff29e49c50d7fe9af2e5.tar.zst
nixlib-2a916b6c292f89a2073bff29e49c50d7fe9af2e5.zip
nixos/xpadneo: add sanity test
Diffstat (limited to 'nixos')
-rw-r--r--nixos/tests/all-tests.nix1
-rw-r--r--nixos/tests/xpadneo.nix18
2 files changed, 19 insertions, 0 deletions
diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix
index e0121fe6b6b8..e4643b79add3 100644
--- a/nixos/tests/all-tests.nix
+++ b/nixos/tests/all-tests.nix
@@ -633,6 +633,7 @@ in {
   xfce = handleTest ./xfce.nix {};
   xmonad = handleTest ./xmonad.nix {};
   xmonad-xdg-autostart = handleTest ./xmonad-xdg-autostart.nix {};
+  xpadneo = handleTest ./xpadneo.nix {};
   xrdp = handleTest ./xrdp.nix {};
   xss-lock = handleTest ./xss-lock.nix {};
   xterm = handleTest ./xterm.nix {};
diff --git a/nixos/tests/xpadneo.nix b/nixos/tests/xpadneo.nix
new file mode 100644
index 000000000000..c7b72831fce8
--- /dev/null
+++ b/nixos/tests/xpadneo.nix
@@ -0,0 +1,18 @@
+import ./make-test-python.nix ({ lib, pkgs, ... }: {
+  name = "xpadneo";
+  meta.maintainers = with lib.maintainers; [ kira-bruneau ];
+
+  nodes = {
+    machine = {
+      config.hardware.xpadneo.enable = true;
+    };
+  };
+
+  # This is just a sanity check to make sure the module was
+  # loaded. We'd have to find some way to mock an xbox controller if
+  # we wanted more in-depth testing.
+  testScript = ''
+    machine.start();
+    machine.succeed("modinfo hid_xpadneo | grep 'version:\s\+${pkgs.linuxPackages.xpadneo.version}'")
+  '';
+})