From d5e5f99a880af93f37e524aeb90d39d291a8df95 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Fri, 16 Sep 2022 22:09:51 +0800 Subject: [PATCH 1/5] python3Packages.hs-dbus-signature: add pythonImportsCheck --- pkgs/development/python-modules/hs-dbus-signature/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/python-modules/hs-dbus-signature/default.nix b/pkgs/development/python-modules/hs-dbus-signature/default.nix index 7d071b75c3b1..657a1d8b24a6 100644 --- a/pkgs/development/python-modules/hs-dbus-signature/default.nix +++ b/pkgs/development/python-modules/hs-dbus-signature/default.nix @@ -19,6 +19,8 @@ buildPythonPackage rec { hypothesis ]; + pythonImportsCheck = [ "hs_dbus_signature" ]; + meta = with lib; { description = "A Hypothesis Strategy for Generating Arbitrary DBus Signatures"; homepage = "https://github.com/stratis-storage/hs-dbus-signature"; From 7e213e5510d2f300dd73168f9a3acf4393832115 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Fri, 16 Sep 2022 22:11:19 +0800 Subject: [PATCH 2/5] python3Packages.dbus-signature-pyparsing: add pythonImportsCheck --- .../python-modules/dbus-signature-pyparsing/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/python-modules/dbus-signature-pyparsing/default.nix b/pkgs/development/python-modules/dbus-signature-pyparsing/default.nix index 659fcc3ed59d..8b0eb3f3cf97 100644 --- a/pkgs/development/python-modules/dbus-signature-pyparsing/default.nix +++ b/pkgs/development/python-modules/dbus-signature-pyparsing/default.nix @@ -25,6 +25,8 @@ buildPythonPackage rec { hs-dbus-signature ]; + pythonImportsCheck = [ "dbus_signature_pyparsing" ]; + meta = with lib; { description = "A Parser for a D-Bus Signature"; homepage = "https://github.com/stratis-storage/dbus-signature-pyparsing"; From 5d5be01eb27972f070a513c0131b779500c4569b Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Fri, 16 Sep 2022 22:12:45 +0800 Subject: [PATCH 3/5] python3Packages.into-dbus-python: add pythonImportsCheck --- pkgs/development/python-modules/into-dbus-python/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/development/python-modules/into-dbus-python/default.nix b/pkgs/development/python-modules/into-dbus-python/default.nix index 1d893cd69692..5ef92cf216a5 100644 --- a/pkgs/development/python-modules/into-dbus-python/default.nix +++ b/pkgs/development/python-modules/into-dbus-python/default.nix @@ -23,12 +23,15 @@ buildPythonPackage rec { dbus-signature-pyparsing dbus-python ]; + checkInputs = [ pytestCheckHook hypothesis hs-dbus-signature ]; + pythonImportsCheck = [ "into_dbus_python" ]; + meta = with lib; { description = "A transformer to dbus-python types"; homepage = "https://github.com/stratis-storage/into-dbus-python"; From 207e9aa1b38f8d7d71bd2a451d689448ba09273e Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Fri, 16 Sep 2022 22:13:53 +0800 Subject: [PATCH 4/5] python3Packages.dbus-python-client-gen: add pythonImportsCheck --- .../python-modules/dbus-python-client-gen/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/development/python-modules/dbus-python-client-gen/default.nix b/pkgs/development/python-modules/dbus-python-client-gen/default.nix index 100144c152e4..02b973d145ce 100644 --- a/pkgs/development/python-modules/dbus-python-client-gen/default.nix +++ b/pkgs/development/python-modules/dbus-python-client-gen/default.nix @@ -21,10 +21,13 @@ buildPythonPackage rec { into-dbus-python dbus-python ]; + checkInputs = [ pytestCheckHook ]; + pythonImportsCheck = [ "dbus_python_client_gen" ]; + meta = with lib; { description = "A Python library for generating dbus-python client code"; homepage = "https://github.com/stratis-storage/dbus-python-client-gen"; From 0fa2f2148b05574bc860aaeea49c42f904e8423a Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Fri, 16 Sep 2022 22:28:13 +0800 Subject: [PATCH 5/5] stratis-cli: add pytestCheckHook and pythonImportsCheck --- pkgs/tools/filesystems/stratis-cli/default.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pkgs/tools/filesystems/stratis-cli/default.nix b/pkgs/tools/filesystems/stratis-cli/default.nix index 813ecfa22c6d..145d570b6a8c 100644 --- a/pkgs/tools/filesystems/stratis-cli/default.nix +++ b/pkgs/tools/filesystems/stratis-cli/default.nix @@ -25,6 +25,18 @@ python3Packages.buildPythonApplication rec { packaging ]; + checkInputs = with python3Packages; [ + pytestCheckHook + ]; + + disabledTestPaths = [ + # tests below require dbus daemon + "tests/whitebox/integration" + "tests/whitebox/monkey_patching" + ]; + + pythonImportsCheck = [ "stratis_cli" ]; + passthru.tests = nixosTests.stratis; meta = with lib; {