!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:
openeuler-ci-bot 2021-05-22 18:44:57 +08:00 committed by Gitee
commit 20fd52a808
2 changed files with 38 additions and 6 deletions

View 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

View File

@ -1,15 +1,15 @@
%bcond_with tests
Name: python-ethtool Name: python-ethtool
Version: 0.14 Version: 0.14
Release: 3 Release: 5
Summary: Python bindings for the ethtool kernel interface Summary: Python bindings for the ethtool kernel interface
License: GPLv2 License: GPLv2
URL: https://pypi.org/project/ethtool/ URL: https://pypi.org/project/ethtool/
Source0: https://files.pythonhosted.org/packages/81/41/e6cb9026374771e3bdb4c0fe8ac0c51c693a14b4f72f26275da15f7a4d8b/ethtool-%{version}.tar.gz 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: python2-devel python3-devel python2-setuptools
BuildRequires: gcc libnl3-devel python3-setuptools BuildRequires: gcc libnl3-devel python3-setuptools net-tools
%description %description
Python bindings for the ethtool kernel interface. The Python ethtool Python bindings for the ethtool kernel interface. The Python ethtool
@ -41,7 +41,6 @@ driver, and hardware settings.
rm -rf ethtool.egg-info rm -rf ethtool.egg-info
cp -a . %{py3dir} cp -a . %{py3dir}
find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!/usr/bin/python|#!%{__python3}|'
%build %build
%py2_build %py2_build
@ -52,6 +51,8 @@ popd
%install %install
%py2_install %py2_install
rm %{buildroot}%{_bindir}/pifconfig
rm %{buildroot}%{_bindir}/pethtool
pushd %{py3dir} pushd %{py3dir}
%py3_install %py3_install
@ -64,7 +65,6 @@ install -d %{buildroot}%{_mandir}/man8/
install -p man/*.8.* %{buildroot}%{_mandir}/man8/ install -p man/*.8.* %{buildroot}%{_mandir}/man8/
rm -rf tests/test_scripts.py rm -rf tests/test_scripts.py
%if %{with tests}
%check %check
export PYTHONPATH=%{buildroot}%{python2_sitearch} export PYTHONPATH=%{buildroot}%{python2_sitearch}
%{__python2} tests/parse_ifconfig.py -v %{__python2} tests/parse_ifconfig.py -v
@ -75,7 +75,6 @@ export PYTHONPATH=%{buildroot}%{python3_sitearch}
%{__python3} tests/parse_ifconfig.py -v %{__python3} tests/parse_ifconfig.py -v
%{__python3} -m unittest discover -v %{__python3} -m unittest discover -v
popd popd
%endif
%files -n python2-ethtool %files -n python2-ethtool
%doc README.rst %doc README.rst
@ -96,6 +95,12 @@ popd
%doc %{_mandir}/man* %doc %{_mandir}/man*
%changelog %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 * Fri Aug 21 2020 fanjiachen <fanjiachen3@huawei.com> - 0.14-3
- Type:rebuild - Type:rebuild
- ID:NA - ID:NA