From 8803c45998da886be243ca6c8e5cb07650c57026 Mon Sep 17 00:00:00 2001 From: superherointj <5861043+superherointj@users.noreply.github.com> Date: Thu, 20 May 2021 14:49:22 -0300 Subject: [PATCH] virt-manager: add tests --- .../virtualization/virt-manager/default.nix | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/virtualization/virt-manager/default.nix b/pkgs/applications/virtualization/virt-manager/default.nix index f15a2e914966..4d74b5d66102 100644 --- a/pkgs/applications/virtualization/virt-manager/default.nix +++ b/pkgs/applications/virtualization/virt-manager/default.nix @@ -5,6 +5,7 @@ , gtksourceview4, docutils , spiceSupport ? true, spice-gtk ? null , cpio, e2fsprogs, findutils, gzip +, cdrtools }: with lib; @@ -53,8 +54,21 @@ python3Packages.buildPythonApplication rec { gappsWrapperArgs+=(--prefix PATH : "${makeBinPath [ cpio e2fsprogs file findutils gzip ]}") ''; - # Failed tests - doCheck = false; + checkInputs = with python3Packages; [ cpio cdrtools pytestCheckHook ]; + + disabledTestPaths = [ + "tests/test_cli.py" + "tests/test_disk.py" + "tests/test_checkprops.py" + ]; # Error logs: https://gist.github.com/superherointj/fee040872beaafaaa19b8bf8f3ff0be5 + + preCheck = '' + export HOME=. + ''; # <- Required for "tests/test_urldetect.py". + + postCheck = '' + $out/bin/virt-manager --version | grep -Fw ${version} > /dev/null + ''; meta = with lib; { homepage = "http://virt-manager.org";