diff options
author | Francesco Gazzetta <fgaz@fgaz.me> | 2021-11-18 19:10:48 +0100 |
---|---|---|
committer | Francesco Gazzetta <fgaz@fgaz.me> | 2021-11-19 15:09:53 +0100 |
commit | f3ece9f26cb1ddd4f31359d6151852fa86818648 (patch) | |
tree | 030130779d9b9a97744ec995743406cd8b4082e1 /nixos | |
parent | 6ac64dc1c403ce6fce6c00a59a46dedfe0b12160 (diff) | |
download | nixpkgs-f3ece9f26cb1ddd4f31359d6151852fa86818648.tar nixpkgs-f3ece9f26cb1ddd4f31359d6151852fa86818648.tar.gz nixpkgs-f3ece9f26cb1ddd4f31359d6151852fa86818648.tar.bz2 nixpkgs-f3ece9f26cb1ddd4f31359d6151852fa86818648.tar.lz nixpkgs-f3ece9f26cb1ddd4f31359d6151852fa86818648.tar.xz nixpkgs-f3ece9f26cb1ddd4f31359d6151852fa86818648.tar.zst nixpkgs-f3ece9f26cb1ddd4f31359d6151852fa86818648.zip |
nixosTests.aseprite: init
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/tests/all-tests.nix | 1 | ||||
-rw-r--r-- | nixos/tests/libresprite.nix | 30 |
2 files changed, 31 insertions, 0 deletions
diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index a74792d3d2e..cd13183ed0a 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 00000000000..1a6210e3671 --- /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") + ''; +}) |