summary refs log tree commit diff
diff options
context:
space:
mode:
authorRyan Burns <rtburns@protonmail.com>2021-09-27 19:32:34 -0700
committerRyan Burns <rtburns@protonmail.com>2021-09-27 19:32:34 -0700
commit8941dd6cc8348bb06d52749cb1f7292c8f47c290 (patch)
treef1166296a6ed188c497e5c0d4ddcee32fd9f39c5
parent54e1db21522a61ca771aeafbbd77c4a474e82f8e (diff)
downloadnixpkgs-8941dd6cc8348bb06d52749cb1f7292c8f47c290.tar
nixpkgs-8941dd6cc8348bb06d52749cb1f7292c8f47c290.tar.gz
nixpkgs-8941dd6cc8348bb06d52749cb1f7292c8f47c290.tar.bz2
nixpkgs-8941dd6cc8348bb06d52749cb1f7292c8f47c290.tar.lz
nixpkgs-8941dd6cc8348bb06d52749cb1f7292c8f47c290.tar.xz
nixpkgs-8941dd6cc8348bb06d52749cb1f7292c8f47c290.tar.zst
nixpkgs-8941dd6cc8348bb06d52749cb1f7292c8f47c290.zip
pythonPackages.sh: disable flaky fd_leak test
https://hydra.nixos.org/build/154671181/nixlog/1

* This was not actually an fd leak, but a failure
  to determine a stable baseline number of open fds.
* An fd leak in this package should not prevent us
  from building its many dependers.
-rw-r--r--pkgs/development/python-modules/sh/disable-broken-tests-darwin.patch25
1 files changed, 12 insertions, 13 deletions
diff --git a/pkgs/development/python-modules/sh/disable-broken-tests-darwin.patch b/pkgs/development/python-modules/sh/disable-broken-tests-darwin.patch
index c51490ce6a4..dfeb50db8d0 100644
--- a/pkgs/development/python-modules/sh/disable-broken-tests-darwin.patch
+++ b/pkgs/development/python-modules/sh/disable-broken-tests-darwin.patch
@@ -4,15 +4,9 @@ Date: Mon, 20 Jul 2020 19:51:20 +0200
 Subject: [PATCH] Disable tests that fail on Darwin (macOS) or with sandboxing
 
 Signed-off-by: Sirio Balmelli <sirio@b-ad.ch>
----
- test.py | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/test.py b/test.py
-index f8029c0..ba1d141 100644
 --- a/test.py
 +++ b/test.py
-@@ -404,6 +404,7 @@ exit(3)
+@@ -377,6 +377,7 @@ exit(3)
          self.assertEqual(sed(_in="one test three", e="s/test/two/").strip(),
                           "one two three")
  
@@ -20,7 +14,7 @@ index f8029c0..ba1d141 100644
      def test_ok_code(self):
          from sh import ls, ErrorReturnCode_1, ErrorReturnCode_2
  
-@@ -1004,6 +1005,7 @@ print(sys.argv[1])
+@@ -982,6 +983,7 @@ print(sys.argv[1])
          now = time.time()
          self.assertGreater(now - start, sleep_time)
  
@@ -28,7 +22,7 @@ index f8029c0..ba1d141 100644
      def test_background_exception(self):
          from sh import ls, ErrorReturnCode_1, ErrorReturnCode_2
          p = ls("/ofawjeofj", _bg=True, _bg_exc=False)  # should not raise
-@@ -1801,6 +1803,7 @@ exit(49)
+@@ -1779,6 +1781,7 @@ exit(49)
          p = python(py.name, _ok_code=49, _bg=True)
          self.assertEqual(49, p.exit_code)
  
@@ -36,7 +30,15 @@ index f8029c0..ba1d141 100644
      def test_cwd(self):
          from sh import pwd
          from os.path import realpath
-@@ -2899,6 +2902,7 @@ print("hi")
+@@ -2777,6 +2780,7 @@ print("cool")
+     # on osx.  so skip it for now if osx
+     @not_macos
+     @requires_progs("lsof")
++    @skipUnless(False, "Flaky on Hydra")
+     def test_no_fd_leak(self):
+         import sh
+         import os
+@@ -2879,6 +2883,7 @@ print("hi")
          python(py.name, _in=stdin)
  
      @requires_utf8
@@ -44,6 +46,3 @@ index f8029c0..ba1d141 100644
      def test_unicode_path(self):
          from sh import Command
  
--- 
-2.27.0
-