From 5a638b0cbd674bde8da2b284aaed17ebb3a61b0f Mon Sep 17 00:00:00 2001 From: Raito Bezarius Date: Thu, 3 Aug 2023 17:40:10 +0200 Subject: [PATCH] python3Packages.systemd: ignore tests that uses a direct system open call for /etc/machine-id systemd recommends anyway to ignore them too. --- pkgs/development/python-modules/systemd/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/systemd/default.nix b/pkgs/development/python-modules/systemd/default.nix index a0599b01781b..da81905fca37 100644 --- a/pkgs/development/python-modules/systemd/default.nix +++ b/pkgs/development/python-modules/systemd/default.nix @@ -36,7 +36,9 @@ buildPythonPackage rec { export NIX_REDIRECTS=/etc/machine-id=$(realpath machine-id) \ LD_PRELOAD=${libredirect}/lib/libredirect.so - pytest $out/${python.sitePackages}/systemd + # Those tests assume /etc/machine-id to be available + # But our redirection technique does not work apparently + pytest $out/${python.sitePackages}/systemd -k 'not test_get_machine and not test_get_machine_app_specific and not test_reader_this_machine' ''; pythonImportsCheck = [