nixosTests.domination: init

This commit is contained in:
Francesco Gazzetta 2021-11-13 23:00:20 +01:00
parent df177cf39b
commit df99f2326e
3 changed files with 32 additions and 0 deletions

View File

@ -109,6 +109,7 @@ in
docker-tools-overlay = handleTestOn ["x86_64-linux"] ./docker-tools-overlay.nix {};
documize = handleTest ./documize.nix {};
dokuwiki = handleTest ./dokuwiki.nix {};
domination = handleTest ./domination.nix {};
dovecot = handleTest ./dovecot.nix {};
ec2-config = (handleTestOn ["x86_64-linux"] ./ec2.nix {}).boot-ec2-config or {};
ec2-nixops = (handleTestOn ["x86_64-linux"] ./ec2.nix {}).boot-ec2-nixops or {};

View File

@ -0,0 +1,26 @@
import ./make-test-python.nix ({ pkgs, ... }: {
name = "domination";
meta = with pkgs.lib.maintainers; {
maintainers = [ fgaz ];
};
machine = { config, pkgs, ... }: {
imports = [
./common/x11.nix
];
services.xserver.enable = true;
environment.systemPackages = [ pkgs.domination ];
};
enableOCR = true;
testScript =
''
machine.wait_for_x()
machine.execute("domination >&2 &")
machine.wait_for_window("Menu")
machine.wait_for_text("New Game")
machine.screenshot("screen")
'';
})

View File

@ -6,6 +6,7 @@
, ant
, makeWrapper
, makeDesktopItem
, nixosTests
}:
let
@ -79,6 +80,10 @@ in stdenv.mkDerivation {
install -Dm644 build/game/resources/icon.png $out/share/pixmaps/domination.png
'';
passthru.tests = {
domination-starts = nixosTests.domination;
};
meta = with lib; {
homepage = "http://domination.sourceforge.net/";
downloadPage = "http://domination.sourceforge.net/download.shtml";