mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-28 14:22:50 +03:00
Merge pull request #202995 from tomfitzhenry/sgtpuzzles-test
nixos/tests/sgtpuzzles: init
This commit is contained in:
commit
0995aea49b
@ -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 {};
|
||||
|
34
nixos/tests/sgtpuzzles.nix
Normal file
34
nixos/tests/sgtpuzzles.nix
Normal 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")
|
||||
'';
|
||||
})
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user