mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-29 06:45:54 +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 {};
|
searx = handleTest ./searx.nix {};
|
||||||
service-runner = handleTest ./service-runner.nix {};
|
service-runner = handleTest ./service-runner.nix {};
|
||||||
sfxr-qt = handleTest ./sfxr-qt.nix {};
|
sfxr-qt = handleTest ./sfxr-qt.nix {};
|
||||||
|
sgtpuzzles = handleTest ./sgtpuzzles.nix {};
|
||||||
shadow = handleTest ./shadow.nix {};
|
shadow = handleTest ./shadow.nix {};
|
||||||
shadowsocks = handleTest ./shadowsocks {};
|
shadowsocks = handleTest ./shadowsocks {};
|
||||||
shattered-pixel-dungeon = handleTest ./shattered-pixel-dungeon.nix {};
|
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
|
{ lib, stdenv, fetchurl, desktop-file-utils
|
||||||
, gtk3, libX11, cmake, imagemagick
|
, gtk3, libX11, cmake, imagemagick
|
||||||
, pkg-config, perl, wrapGAppsHook
|
, pkg-config, perl, wrapGAppsHook, nixosTests
|
||||||
, isMobile ? false
|
, isMobile ? false
|
||||||
}:
|
}:
|
||||||
|
|
||||||
@ -59,6 +59,8 @@ stdenv.mkDerivation rec {
|
|||||||
install -Dm644 ${sgt-puzzles-menu} -t $out/etc/xdg/menus/applications-merged/
|
install -Dm644 ${sgt-puzzles-menu} -t $out/etc/xdg/menus/applications-merged/
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
passthru.tests.sgtpuzzles = nixosTests.sgtpuzzles;
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Simon Tatham's portable puzzle collection";
|
description = "Simon Tatham's portable puzzle collection";
|
||||||
license = licenses.mit;
|
license = licenses.mit;
|
||||||
|
Loading…
Reference in New Issue
Block a user