lol

sfxr-qt: add nixos test

+35
+1
nixos/tests/all-tests.nix
··· 468 468 seafile = handleTest ./seafile.nix {}; 469 469 searx = handleTest ./searx.nix {}; 470 470 service-runner = handleTest ./service-runner.nix {}; 471 + sfxr-qt = handleTest ./sfxr-qt.nix {}; 471 472 shadow = handleTest ./shadow.nix {}; 472 473 shadowsocks = handleTest ./shadowsocks {}; 473 474 shattered-pixel-dungeon = handleTest ./shattered-pixel-dungeon.nix {};
+32
nixos/tests/sfxr-qt.nix
··· 1 + import ./make-test-python.nix ({ pkgs, ... }: { 2 + name = "sfxr-qt"; 3 + meta = with pkgs.lib.maintainers; { 4 + maintainers = [ fgaz ]; 5 + }; 6 + 7 + machine = { config, pkgs, ... }: { 8 + imports = [ 9 + ./common/x11.nix 10 + ]; 11 + 12 + services.xserver.enable = true; 13 + sound.enable = true; 14 + environment.systemPackages = [ pkgs.sfxr-qt ]; 15 + }; 16 + 17 + enableOCR = true; 18 + 19 + testScript = 20 + '' 21 + machine.wait_for_x() 22 + # Add a dummy sound card, or the program won't start 23 + machine.execute("modprobe snd-dummy") 24 + 25 + machine.execute("sfxr-qt >&2 &") 26 + 27 + machine.wait_for_window(r"sfxr") 28 + machine.sleep(10) 29 + machine.wait_for_text("requency") 30 + machine.screenshot("screen") 31 + ''; 32 + })
+2
pkgs/applications/audio/sfxr-qt/default.nix
··· 9 9 , SDL 10 10 , python3 11 11 , callPackage 12 + , nixosTests 12 13 }: 13 14 14 15 mkDerivation rec { ··· 44 45 45 46 passthru.tests = { 46 47 export-square-wave = callPackage ./test-export-square-wave {}; 48 + sfxr-qt-starts = nixosTests.sfxr-qt; 47 49 }; 48 50 49 51 meta = with lib; {