diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2020-09-16 09:32:48 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2020-09-16 09:32:48 +0100 |
commit | 9ee6d97c2883d42f204a533a8bc1f4562df778fb (patch) | |
tree | b690ddc0ca30f1472887edbb0b8313629bfcbbb2 /dev-python/sh/files | |
parent | b17a3ef12038de50228bade1f05502c74e135321 (diff) |
gentoo resync : 16.09.2020
Diffstat (limited to 'dev-python/sh/files')
-rw-r--r-- | dev-python/sh/files/sh-1.14.0-fix-sleep-test.patch | 33 | ||||
-rw-r--r-- | dev-python/sh/files/sh-1.14.0-skip-unreliable-test.patch | 8 |
2 files changed, 41 insertions, 0 deletions
diff --git a/dev-python/sh/files/sh-1.14.0-fix-sleep-test.patch b/dev-python/sh/files/sh-1.14.0-fix-sleep-test.patch new file mode 100644 index 000000000000..28d1ec9847fd --- /dev/null +++ b/dev-python/sh/files/sh-1.14.0-fix-sleep-test.patch @@ -0,0 +1,33 @@ +From 83b189de4f461ed0370b0472f1938d3162ed00c7 Mon Sep 17 00:00:00 2001 +From: David Runge <dave@sleepmap.de> +Date: Tue, 1 Sep 2020 23:18:13 +0200 +Subject: [PATCH] Remove hardcoded path for sleep executable + +test.py: +In test_timeout the path for the sleep executable has been hardcoded to +be /bin/sleep. However, on operating systems such as Arch Linux, Fedora +or Solaris the executable resides in /usr/bin/sleep due to a /usr merge +(e.g. see + https://www.freedesktop.org/wiki/Software/systemd/TheCaseForTheUsrMerge/). +By only checking for the name of the executable and its parameter the +test becomes more generic and thus can run on any (Unix-like) operating +system (given that `sleep` is in PATH). + +Fixes #539 +--- + test.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/test.py b/test.py +index f8029c04..142fcc0d 100644 +--- a/test.py ++++ b/test.py +@@ -2014,7 +2014,7 @@ def test_timeout(self): + try: + sh.sleep(sleep_for, _timeout=timeout).wait() + except sh.TimeoutException as e: +- self.assertEqual(e.full_cmd, '/bin/sleep 3') ++ assert 'sleep 3' in e.full_cmd + else: + self.fail("no timeout exception") + elapsed = time() - started diff --git a/dev-python/sh/files/sh-1.14.0-skip-unreliable-test.patch b/dev-python/sh/files/sh-1.14.0-skip-unreliable-test.patch new file mode 100644 index 000000000000..ea79229459ec --- /dev/null +++ b/dev-python/sh/files/sh-1.14.0-skip-unreliable-test.patch @@ -0,0 +1,8 @@ +diff --git a/test.py b/test.py +index a4b9915..fb2ffdd 100644 +--- a/test.py ++++ b/test.py +@@ -2799,2 +2799,3 @@ print("cool") + @requires_progs("lsof") ++ @unittest.skip("Test seems to be unreliable") + def test_no_fd_leak(self): |