Merge pull request #202995 from tomfitzhenry/sgtpuzzles-test

nixos/tests/sgtpuzzles: init

Changed files
+38 -1
nixos
pkgs
games
sgt-puzzles
+1
nixos/tests/all-tests.nix
···
searx = handleTest ./searx.nix {};
service-runner = handleTest ./service-runner.nix {};
sfxr-qt = handleTest ./sfxr-qt.nix {};
+
sgtpuzzles = handleTest ./sgtpuzzles.nix {};
shadow = handleTest ./shadow.nix {};
shadowsocks = handleTest ./shadowsocks {};
shattered-pixel-dungeon = handleTest ./shattered-pixel-dungeon.nix {};
+34
nixos/tests/sgtpuzzles.nix
···
+
import ./make-test-python.nix ({ pkgs, ...} :
+
{
+
name = "sgtpuzzles";
+
meta = with pkgs.lib.maintainers; {
+
maintainers = [ tomfitzhenry ];
+
};
+
+
nodes.machine = { ... }:
+
+
{
+
imports = [
+
./common/x11.nix
+
];
+
+
services.xserver.enable = true;
+
environment.systemPackages = with pkgs; [
+
sgtpuzzles
+
];
+
};
+
+
enableOCR = true;
+
+
testScript = { nodes, ... }:
+
''
+
start_all()
+
machine.wait_for_x()
+
+
machine.execute("mines >&2 &")
+
+
machine.wait_for_window("Mines")
+
machine.wait_for_text("Marked")
+
machine.screenshot("mines")
+
'';
+
})
+3 -1
pkgs/games/sgt-puzzles/default.nix
···
{ lib, stdenv, fetchurl, desktop-file-utils
, gtk3, libX11, cmake, imagemagick
-
, pkg-config, perl, wrapGAppsHook
+
, pkg-config, perl, wrapGAppsHook, nixosTests
, isMobile ? false
}:
···
install -Dm644 ${sgt-puzzles-menu} -t $out/etc/xdg/menus/applications-merged/
'';
+
+
passthru.tests.sgtpuzzles = nixosTests.sgtpuzzles;
meta = with lib; {
description = "Simon Tatham's portable puzzle collection";