mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-06-05 21:03:40 +00:00
e57inspector.tests: Add NixOS VM test
This commit is contained in:
@@ -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;
|
||||
|
||||
38
nixos/tests/e57inspector.nix
Normal file
38
nixos/tests/e57inspector.nix
Normal 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")
|
||||
'';
|
||||
}
|
||||
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user