summaryrefslogtreecommitdiffstats
path: root/nixos/tests
diff options
context:
space:
mode:
authorJonathan Ringer <jonringer117@gmail.com>2021-11-19 08:44:33 -0800
committerJonathan Ringer <jonringer117@gmail.com>2021-11-19 08:44:33 -0800
commit6ede9cd761fce7572706d2a05da73ec3c4edc5d7 (patch)
treed78fb59b6ab49f9f09da48aee2c249dcd7005d37 /nixos/tests
parent9d44a614de8958de1f02519fe031b81eb23bb16d (diff)
parentc0068424f7818d8f284cbf0ea7302417cc76e261 (diff)
Merge remote-tracking branch 'origin/master' into staging-next
Conflicts: pkgs/applications/audio/hybridreverb2/default.nix
Diffstat (limited to 'nixos/tests')
-rw-r--r--nixos/tests/all-tests.nix1
-rw-r--r--nixos/tests/libresprite.nix30
2 files changed, 31 insertions, 0 deletions
diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix
index a74792d3d2eb..cd13183ed0a3 100644
--- a/nixos/tests/all-tests.nix
+++ b/nixos/tests/all-tests.nix
@@ -230,6 +230,7 @@ in
leaps = handleTest ./leaps.nix {};
libinput = handleTest ./libinput.nix {};
libreddit = handleTest ./libreddit.nix {};
+ libresprite = handleTest ./libresprite.nix {};
libreswan = handleTest ./libreswan.nix {};
lidarr = handleTest ./lidarr.nix {};
lightdm = handleTest ./lightdm.nix {};
diff --git a/nixos/tests/libresprite.nix b/nixos/tests/libresprite.nix
new file mode 100644
index 000000000000..1a6210e3671a
--- /dev/null
+++ b/nixos/tests/libresprite.nix
@@ -0,0 +1,30 @@
+import ./make-test-python.nix ({ pkgs, ... }: {
+ name = "libresprite";
+ meta = with pkgs.lib.maintainers; {
+ maintainers = [ fgaz ];
+ };
+
+ machine = { config, pkgs, ... }: {
+ imports = [
+ ./common/x11.nix
+ ];
+
+ services.xserver.enable = true;
+ environment.systemPackages = [
+ pkgs.imagemagick
+ pkgs.libresprite
+ ];
+ };
+
+ enableOCR = true;
+
+ testScript =
+ ''
+ machine.wait_for_x()
+ machine.succeed("convert -font DejaVu-Sans +antialias label:'IT WORKS' image.png")
+ machine.execute("libresprite image.png >&2 &")
+ machine.wait_for_window("LibreSprite v${pkgs.libresprite.version}")
+ machine.wait_for_text("IT WORKS")
+ machine.screenshot("screen")
+ '';
+})