e57inspector.tests: Add NixOS VM test

This commit is contained in:
Niklas Hambüchen
2026-05-08 13:57:04 +02:00
parent 7c536cd253
commit f3d20a1d74
3 changed files with 45 additions and 0 deletions

View File

@@ -491,6 +491,7 @@ in
drupal = runTest ./drupal.nix;
dublin-traceroute = runTest ./dublin-traceroute.nix;
dwl = runTestOn [ "x86_64-linux" "aarch64-linux" ] ./dwl.nix;
e57inspector = runTest ./e57inspector.nix;
early-mount-options = runTest ./early-mount-options.nix;
earlyoom = runTestOn [ "x86_64-linux" ] ./earlyoom.nix;
easytier = runTest ./easytier.nix;

View File

@@ -0,0 +1,38 @@
{ pkgs, ... }:
{
name = "e57inspector";
meta.maintainers = with pkgs.lib.maintainers; [
nh2
chpatrick
];
nodes.machine =
{ ... }:
{
imports = [
./common/x11.nix
];
services.xserver.enable = true;
environment.systemPackages = [
pkgs.e57inspector
pkgs.xdotool
];
};
testScript =
let
testFile = pkgs.fetchurl {
url = "https://raw.githubusercontent.com/asmaloney/libE57Format-test-data/bbcacec05d60f923869545c5eab33d94c390d50e/self/ColouredCubeFloat.e57";
hash = "sha256-bb95crNYvX3Qhkx4k6Sqe2GjOf1u4nxxswMfdjyXfTM=";
};
in
''
start_all()
machine.wait_for_x()
machine.execute("e57inspector ${testFile} >&2 &")
machine.wait_until_succeeds("xdotool search --pid $(pidof .e57inspector-wrapped)")
machine.screenshot("screen")
'';
}

View File

@@ -2,9 +2,11 @@
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
cmake,
qt6,
xercesc,
nixosTests,
}:
stdenv.mkDerivation (finalAttrs: {
@@ -60,6 +62,10 @@ stdenv.mkDerivation (finalAttrs: {
runHook postInstall
'';
passthru.tests = {
e57inspector = nixosTests.e57inspector;
};
meta = {
description = "Cross-platform E57 file viewer to list and view stored point clouds, images and metadata";
homepage = "https://github.com/sisakat/e57inspector";