guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#55866] [PATCH 2/2] gnu: python-debugpy: Disable tests.


From: Lars-Dominik Braun
Subject: [bug#55866] [PATCH 2/2] gnu: python-debugpy: Disable tests.
Date: Thu, 9 Jun 2022 11:04:14 +0200

* gnu/packages/python-xyz.scm (python-debugpy)[arguments]: Respect
tests? in 'check phase and disable #:tests.
---
 gnu/packages/python-xyz.scm | 24 +++++++++++++-----------
 1 file changed, 13 insertions(+), 11 deletions(-)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 8de8d571e4..8e79ea01ae 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -12399,6 +12399,7 @@ (define-public python-debugpy
     (build-system python-build-system)
     (arguments
      (list
+      #:tests? #f ; Fail on systems with YAMA LSM’s ptrace scope > 0.
       #:phases
       #~(modify-phases %standard-phases
           (add-after 'unpack 'patch-sh-in-tests
@@ -12419,17 +12420,18 @@ (define-public python-debugpy
               (setenv "DEBUGPY_BUNDLING_DISABLED" "1")))
           (replace 'check
             (lambda* (#:key tests? #:allow-other-keys)
-              (invoke "pytest" "-vv"
-                      "-n" (number->string (parallel-job-count))
-                      "-k"
-                      (string-append
-                       ;; These tests cannot be run in parallel because their
-                       ;; test data would not be copied by xdist and lead to
-                       ;; import errors. (see:
-                       ;; https://github.com/microsoft/debugpy/issues/342 and
-                       ;; https://github.com/microsoft/debugpy/issues/880).
-                       "not test_custom_python_args "
-                       "and not test_autokill ")))))))
+              (when tests?
+                (invoke "pytest" "-vv"
+                        "-n" (number->string (parallel-job-count))
+                        "-k"
+                        (string-append
+                         ;; These tests cannot be run in parallel because their
+                         ;; test data would not be copied by xdist and lead to
+                         ;; import errors. (see:
+                         ;; https://github.com/microsoft/debugpy/issues/342 and
+                         ;; https://github.com/microsoft/debugpy/issues/880).
+                         "not test_custom_python_args "
+                         "and not test_autokill "))))))))
     (native-inputs
      ;; See: https://raw.githubusercontent.com/microsoft/debugpy/
      ;;      main/tests/requirements.txt.
-- 
2.35.1






reply via email to

[Prev in Thread] Current Thread [Next in Thread]