Merge pull request #202995 from tomfitzhenry/sgtpuzzles-test

nixos/tests/sgtpuzzles: init
This commit is contained in:
Francesco Gazzetta 2023-03-19 14:11:29 +00:00 committed by GitHub
commit 0995aea49b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 38 additions and 1 deletions

View File

@ -611,6 +611,7 @@ in {
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 {};

View File

@ -0,0 +1,34 @@
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")
'';
})

View File

@ -1,6 +1,6 @@
{ lib, stdenv, fetchurl, desktop-file-utils
, gtk3, libX11, cmake, imagemagick
, pkg-config, perl, wrapGAppsHook
, pkg-config, perl, wrapGAppsHook, nixosTests
, isMobile ? false
}:
@ -59,6 +59,8 @@ stdenv.mkDerivation rec {
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";
license = licenses.mit;