!8 [sync] PR-6: enable test and disable test_show_coalesce_eth in VM
From: @openeuler-sync-bot Reviewed-by: @zengwefeng,@yanan-rock Signed-off-by: @zengwefeng,@yanan-rock
This commit is contained in:
commit
20fd52a808
27
disable-test_show_coalesce_eth-in-VM.patch
Normal file
27
disable-test_show_coalesce_eth-in-VM.patch
Normal file
@ -0,0 +1,27 @@
|
||||
From 868d740cd4033c87b1d00acd92eac231d98752a5 Mon Sep 17 00:00:00 2001
|
||||
From: hexiujun <hexiujun1@huawei.com>
|
||||
Date: Thu, 12 Mar 2020 16:15:22 +0800
|
||||
Subject: [PATCH] disable test_show_coalesce_eth in VM
|
||||
|
||||
---
|
||||
tests/test_scripts.py | 4 +---
|
||||
1 file changed, 1 insertion(+), 3 deletions(-)
|
||||
|
||||
diff --git a/tests/test_scripts.py b/tests/test_scripts.py
|
||||
index 6db3aac..1d91203 100755
|
||||
--- a/tests/test_scripts.py
|
||||
+++ b/tests/test_scripts.py
|
||||
@@ -108,9 +108,7 @@ generic receive offload: on
|
||||
for expected_start, line in zip(expected_lines_start, lines):
|
||||
self.assertTrue(line.startswith(expected_start))
|
||||
|
||||
- @unittest.skipIf('TRAVIS' in os.environ and os.environ['TRAVIS'] == 'true',
|
||||
- 'Skipping this test on Travis CI because show '
|
||||
- 'coalesce is not supported on ethernet device in VM.')
|
||||
+ @unittest.skip('show coalesce is not supported on ethernet device in VM.')
|
||||
def test_show_coalesce_eth(self):
|
||||
self.assertIsNone(peth.show_coalesce(device))
|
||||
expected_lines_start = ['Coalesce parameters for',
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,15 +1,15 @@
|
||||
%bcond_with tests
|
||||
Name: python-ethtool
|
||||
Version: 0.14
|
||||
Release: 3
|
||||
Release: 5
|
||||
Summary: Python bindings for the ethtool kernel interface
|
||||
|
||||
License: GPLv2
|
||||
URL: https://pypi.org/project/ethtool/
|
||||
Source0: https://files.pythonhosted.org/packages/81/41/e6cb9026374771e3bdb4c0fe8ac0c51c693a14b4f72f26275da15f7a4d8b/ethtool-%{version}.tar.gz
|
||||
|
||||
Patch9000: disable-test_show_coalesce_eth-in-VM.patch
|
||||
BuildRequires: python2-devel python3-devel python2-setuptools
|
||||
BuildRequires: gcc libnl3-devel python3-setuptools
|
||||
BuildRequires: gcc libnl3-devel python3-setuptools net-tools
|
||||
|
||||
%description
|
||||
Python bindings for the ethtool kernel interface. The Python ethtool
|
||||
@ -41,7 +41,6 @@ driver, and hardware settings.
|
||||
rm -rf ethtool.egg-info
|
||||
|
||||
cp -a . %{py3dir}
|
||||
find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!/usr/bin/python|#!%{__python3}|'
|
||||
|
||||
%build
|
||||
%py2_build
|
||||
@ -52,6 +51,8 @@ popd
|
||||
|
||||
%install
|
||||
%py2_install
|
||||
rm %{buildroot}%{_bindir}/pifconfig
|
||||
rm %{buildroot}%{_bindir}/pethtool
|
||||
|
||||
pushd %{py3dir}
|
||||
%py3_install
|
||||
@ -64,7 +65,6 @@ install -d %{buildroot}%{_mandir}/man8/
|
||||
install -p man/*.8.* %{buildroot}%{_mandir}/man8/
|
||||
rm -rf tests/test_scripts.py
|
||||
|
||||
%if %{with tests}
|
||||
%check
|
||||
export PYTHONPATH=%{buildroot}%{python2_sitearch}
|
||||
%{__python2} tests/parse_ifconfig.py -v
|
||||
@ -75,7 +75,6 @@ export PYTHONPATH=%{buildroot}%{python3_sitearch}
|
||||
%{__python3} tests/parse_ifconfig.py -v
|
||||
%{__python3} -m unittest discover -v
|
||||
popd
|
||||
%endif
|
||||
|
||||
%files -n python2-ethtool
|
||||
%doc README.rst
|
||||
@ -96,6 +95,12 @@ popd
|
||||
%doc %{_mandir}/man*
|
||||
|
||||
%changelog
|
||||
* Thu Feb 18 2021 jinzhimin <jinzhimin2@huawei.com> - 0.14-5
|
||||
- enable test
|
||||
|
||||
* Thu Feb 18 2021 jinzhimin <jinzhimin2@huawei.com> - 0.14-4
|
||||
- disable test_show_coalesce_eth in VM
|
||||
|
||||
* Fri Aug 21 2020 fanjiachen <fanjiachen3@huawei.com> - 0.14-3
|
||||
- Type:rebuild
|
||||
- ID:NA
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user