pt2-clone: add nixos test
This commit is contained in:
parent
411e09d83c
commit
4436c0151e
|
@ -285,6 +285,7 @@ in
|
|||
prosody = handleTest ./xmpp/prosody.nix {};
|
||||
prosodyMysql = handleTest ./xmpp/prosody-mysql.nix {};
|
||||
proxy = handleTest ./proxy.nix {};
|
||||
pt2-clone = handleTest ./pt2-clone.nix {};
|
||||
qboot = handleTestOn ["x86_64-linux" "i686-linux"] ./qboot.nix {};
|
||||
quagga = handleTest ./quagga.nix {};
|
||||
quorum = handleTest ./quorum.nix {};
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
import ./make-test-python.nix ({ pkgs, ... }: {
|
||||
name = "pt2-clone";
|
||||
meta = with pkgs.stdenv.lib.maintainers; {
|
||||
maintainers = [ fgaz ];
|
||||
};
|
||||
|
||||
machine = { config, pkgs, ... }: {
|
||||
imports = [
|
||||
./common/x11.nix
|
||||
];
|
||||
|
||||
services.xserver.enable = true;
|
||||
sound.enable = true;
|
||||
environment.systemPackages = [ pkgs.pt2-clone ];
|
||||
};
|
||||
|
||||
enableOCR = true;
|
||||
|
||||
testScript =
|
||||
''
|
||||
machine.wait_for_x()
|
||||
# Add a dummy sound card, or the program won't start
|
||||
machine.execute("modprobe snd-dummy")
|
||||
|
||||
machine.execute("pt2-clone &")
|
||||
|
||||
machine.wait_for_window(r"ProTracker")
|
||||
machine.sleep(5)
|
||||
# One of the few words that actually get recognized
|
||||
if "LENGTH" not in machine.get_screen_text():
|
||||
raise Exception("Program did not start successfully")
|
||||
machine.screenshot("screen")
|
||||
'';
|
||||
})
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
{ stdenv
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
, nixosTests
|
||||
, alsaLib
|
||||
, SDL2
|
||||
}:
|
||||
|
@ -19,6 +20,10 @@ stdenv.mkDerivation rec {
|
|||
nativeBuildInputs = [ cmake ];
|
||||
buildInputs = [ SDL2 ] ++ stdenv.lib.optional stdenv.isLinux alsaLib;
|
||||
|
||||
passthru.tests = {
|
||||
pt2-clone-opens = nixosTests.pt2-clone;
|
||||
};
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "A highly accurate clone of the classic ProTracker 2.3D software for Amiga";
|
||||
homepage = "https://16-bits.org/pt2.php";
|
||||
|
|
Loading…
Reference in New Issue