sfxr-qt: add nixos test
This commit is contained in:
parent
de3c63390d
commit
b9bc59d832
3 changed files with 35 additions and 0 deletions
|
@ -468,6 +468,7 @@ in
|
|||
seafile = handleTest ./seafile.nix {};
|
||||
searx = handleTest ./searx.nix {};
|
||||
service-runner = handleTest ./service-runner.nix {};
|
||||
sfxr-qt = handleTest ./sfxr-qt.nix {};
|
||||
shadow = handleTest ./shadow.nix {};
|
||||
shadowsocks = handleTest ./shadowsocks {};
|
||||
shattered-pixel-dungeon = handleTest ./shattered-pixel-dungeon.nix {};
|
||||
|
|
32
nixos/tests/sfxr-qt.nix
Normal file
32
nixos/tests/sfxr-qt.nix
Normal file
|
@ -0,0 +1,32 @@
|
|||
import ./make-test-python.nix ({ pkgs, ... }: {
|
||||
name = "sfxr-qt";
|
||||
meta = with pkgs.lib.maintainers; {
|
||||
maintainers = [ fgaz ];
|
||||
};
|
||||
|
||||
machine = { config, pkgs, ... }: {
|
||||
imports = [
|
||||
./common/x11.nix
|
||||
];
|
||||
|
||||
services.xserver.enable = true;
|
||||
sound.enable = true;
|
||||
environment.systemPackages = [ pkgs.sfxr-qt ];
|
||||
};
|
||||
|
||||
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("sfxr-qt >&2 &")
|
||||
|
||||
machine.wait_for_window(r"sfxr")
|
||||
machine.sleep(10)
|
||||
machine.wait_for_text("requency")
|
||||
machine.screenshot("screen")
|
||||
'';
|
||||
})
|
|
@ -9,6 +9,7 @@
|
|||
, SDL
|
||||
, python3
|
||||
, callPackage
|
||||
, nixosTests
|
||||
}:
|
||||
|
||||
mkDerivation rec {
|
||||
|
@ -44,6 +45,7 @@ mkDerivation rec {
|
|||
|
||||
passthru.tests = {
|
||||
export-square-wave = callPackage ./test-export-square-wave {};
|
||||
sfxr-qt-starts = nixosTests.sfxr-qt;
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
|
|
Loading…
Reference in a new issue