1 |
commit: d6bffad1ce3873c8ac86c664b90651cfbcfe4d01 |
2 |
Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Feb 2 23:37:45 2019 +0000 |
4 |
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Feb 2 23:42:21 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d6bffad1 |
7 |
|
8 |
dev-python/python-ethtool: add tests |
9 |
|
10 |
Package-Manager: Portage-2.3.59, Repoman-2.3.12 |
11 |
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org> |
12 |
|
13 |
.../python-ethtool/files/test-skip-wg-dev.patch | 29 ++++++++++++++++++++++ |
14 |
.../python-ethtool/python-ethtool-0.14.ebuild | 6 +++++ |
15 |
2 files changed, 35 insertions(+) |
16 |
|
17 |
diff --git a/dev-python/python-ethtool/files/test-skip-wg-dev.patch b/dev-python/python-ethtool/files/test-skip-wg-dev.patch |
18 |
new file mode 100644 |
19 |
index 00000000000..435a81ae494 |
20 |
--- /dev/null |
21 |
+++ b/dev-python/python-ethtool/files/test-skip-wg-dev.patch |
22 |
@@ -0,0 +1,29 @@ |
23 |
+From aa18c4a046ed2b508a87161f886e07c6d3716dd3 Mon Sep 17 00:00:00 2001 |
24 |
+From: Georgy Yakovlev <gyakovlev@g.o> |
25 |
+Date: Sat, 2 Feb 2019 14:00:52 -0800 |
26 |
+Subject: [PATCH] tests/test_ethtool.py: skip test_get_active_devices for wg |
27 |
+ |
28 |
+wg is a wireguard interface and this test fails with |
29 |
+OSError: [Errno 95] Operation not supported |
30 |
+--- |
31 |
+ tests/test_ethtool.py | 4 ++-- |
32 |
+ 1 file changed, 2 insertions(+), 2 deletions(-) |
33 |
+ |
34 |
+diff --git a/tests/test_ethtool.py b/tests/test_ethtool.py |
35 |
+index 6162cd3..0ff78b1 100755 |
36 |
+--- a/tests/test_ethtool.py |
37 |
++++ b/tests/test_ethtool.py |
38 |
+@@ -254,8 +254,8 @@ class EthtoolTests(unittest.TestCase): |
39 |
+ |
40 |
+ def test_get_active_devices(self): |
41 |
+ for devname in ethtool.get_active_devices(): |
42 |
+- # Skip these test on tun devices |
43 |
+- if devname.startswith('tun'): |
44 |
++ # Skip these test on tun and wg devices |
45 |
++ if devname.startswith('tun') or devname.startswith('wg'): |
46 |
+ continue |
47 |
+ self._functions_accepting_devnames(devname) |
48 |
+ |
49 |
+-- |
50 |
+2.20.1 |
51 |
+ |
52 |
|
53 |
diff --git a/dev-python/python-ethtool/python-ethtool-0.14.ebuild b/dev-python/python-ethtool/python-ethtool-0.14.ebuild |
54 |
index 3fa5a7bf371..508b2ec1fed 100644 |
55 |
--- a/dev-python/python-ethtool/python-ethtool-0.14.ebuild |
56 |
+++ b/dev-python/python-ethtool/python-ethtool-0.14.ebuild |
57 |
@@ -21,3 +21,9 @@ KEYWORDS="~amd64" |
58 |
DEPEND="dev-libs/libnl:3" |
59 |
RDEPEND="${DEPEND}" |
60 |
BDEPEND="dev-python/setuptools[${PYTHON_USEDEP}]" |
61 |
+ |
62 |
+PATCHES=( "${FILESDIR}"/test-skip-wg-dev.patch ) |
63 |
+ |
64 |
+python_test() { |
65 |
+ esetup.py test || die "Tests failed with ${EPYTHON}" |
66 |
+} |