Merge pull request #202728 from fgaz/warzone2100/4.3.2

warzone2100: 4.3.1 -> 4.3.2, add nixos test
This commit is contained in:
Francesco Gazzetta 2022-11-26 08:54:21 +00:00 committed by GitHub
commit e518978869
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 31 additions and 2 deletions

View file

@ -689,6 +689,7 @@ in {
virtualbox = handleTestOn ["x86_64-linux"] ./virtualbox.nix {};
vscodium = discoverTests (import ./vscodium.nix);
vsftpd = handleTest ./vsftpd.nix {};
warzone2100 = handleTest ./warzone2100.nix {};
wasabibackend = handleTest ./wasabibackend.nix {};
wiki-js = handleTest ./wiki-js.nix {};
wine = handleTest ./wine.nix {};

View file

@ -0,0 +1,26 @@
import ./make-test-python.nix ({ pkgs, ... }: {
name = "warzone2100";
meta = with pkgs.lib.maintainers; {
maintainers = [ fgaz ];
};
nodes.machine = { config, pkgs, ... }: {
imports = [
./common/x11.nix
];
services.xserver.enable = true;
environment.systemPackages = [ pkgs.warzone2100 ];
};
enableOCR = true;
testScript =
''
machine.wait_for_x()
machine.execute("warzone2100 >&2 &")
machine.wait_for_window("Warzone 2100")
machine.wait_for_text(r"(Single Player|Multi Player|Tutorial|Options|Quit Game)")
machine.screenshot("screen")
'';
})

View file

@ -29,6 +29,7 @@
, testers
, warzone2100
, nixosTests
, withVideos ? false
}:
@ -43,11 +44,11 @@ in
stdenv.mkDerivation rec {
inherit pname;
version = "4.3.1";
version = "4.3.2";
src = fetchurl {
url = "mirror://sourceforge/${pname}/releases/${version}/${pname}_src.tar.xz";
sha256 = "sha256-GdHe8DskEd0G1E388z8GGOtjTqHTMBpFSxf1MNATGN0=";
sha256 = "sha256-RcpHk+p9Adu9zkd2J54hspeolZr/xsBsY8eUHLGY0xw=";
};
buildInputs = [
@ -111,6 +112,7 @@ stdenv.mkDerivation rec {
# The command always exits with code 1
command = "(warzone2100 --version || [ $? -eq 1 ])";
};
nixosTest = nixosTests.warzone2100;
};
meta = with lib; {