Sync with upstream release 62.0. (BZ#1590572)
Correct libvirt dependency for EPEL7/RHEL7
This commit is contained in:
parent
c1a2b865bd
commit
ad2fd25084
6 changed files with 46 additions and 103 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -8,3 +8,4 @@
|
|||
/avocado-52.0.tar.gz
|
||||
/avocado-52.1.tar.gz
|
||||
/avocado-61.0.tar.gz
|
||||
/avocado-62.0.tar.gz
|
||||
|
|
|
|||
|
|
@ -1,15 +0,0 @@
|
|||
diff --git a/selftests/unit/test_data_structures.py b/selftests/unit/test_data_structures.py
|
||||
index 60f649663..50a18b26f 100644
|
||||
--- a/selftests/unit/test_data_structures.py
|
||||
+++ b/selftests/unit/test_data_structures.py
|
||||
@@ -113,8 +113,8 @@ def test_invalid(self):
|
||||
data_structures.DataSize, '10Mb')
|
||||
|
||||
def test_value_and_type(self):
|
||||
- self.assertIs(data_structures.DataSize('0b').b, 0)
|
||||
- self.assertIs(data_structures.DataSize('0t').b, 0)
|
||||
+ self.assertEqual(data_structures.DataSize('0b').b, 0)
|
||||
+ self.assertEqual(data_structures.DataSize('0t').b, 0)
|
||||
|
||||
def test_values(self):
|
||||
self.assertEqual(data_structures.DataSize('10m').b, 10485760)
|
||||
|
|
@ -1,62 +0,0 @@
|
|||
From 0cc70f1c8a41260640dfc7a660c11bcb1a163419 Mon Sep 17 00:00:00 2001
|
||||
From: Cleber Rosa <crosa@redhat.com>
|
||||
Date: Thu, 3 May 2018 21:05:43 +0200
|
||||
Subject: [PATCH] Replay with remote functional test: skip if remote plugin is
|
||||
not available
|
||||
|
||||
When a plugin is not installed, its command line options are not
|
||||
registered with the optparse based code. That is caught earlier than
|
||||
Avocado's own handling of incompatible options (in this case, the replay
|
||||
and the remote runner), and results in the errors such as:
|
||||
|
||||
avocado run: error: unrecognized arguments: --remote-hostname
|
||||
|
||||
When building RPM packages for Python 3, the remote runner plugin is
|
||||
not available, and this test should be skipped.
|
||||
|
||||
Signed-off-by: Cleber Rosa <crosa@redhat.com>
|
||||
---
|
||||
selftests/functional/test_replay_basic.py | 14 +++++++++++++-
|
||||
1 file changed, 13 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/selftests/functional/test_replay_basic.py b/selftests/functional/test_replay_basic.py
|
||||
index 56f94d315..6eb944aa2 100644
|
||||
--- a/selftests/functional/test_replay_basic.py
|
||||
+++ b/selftests/functional/test_replay_basic.py
|
||||
@@ -1,9 +1,11 @@
|
||||
import glob
|
||||
import os
|
||||
-import tempfile
|
||||
import shutil
|
||||
+import tempfile
|
||||
import unittest
|
||||
|
||||
+import pkg_resources
|
||||
+
|
||||
from avocado.core import exit_codes
|
||||
from avocado.utils import process
|
||||
|
||||
@@ -14,6 +16,14 @@
|
||||
AVOCADO = os.environ.get("UNITTEST_AVOCADO_CMD", "./scripts/avocado")
|
||||
|
||||
|
||||
+def remote_capable():
|
||||
+ try:
|
||||
+ pkg_resources.require('avocado-framework-plugin-runner-remote')
|
||||
+ return True
|
||||
+ except pkg_resources.DistributionNotFound:
|
||||
+ return False
|
||||
+
|
||||
+
|
||||
class ReplayTests(unittest.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
@@ -148,6 +158,8 @@ def test_run_replay_statusfail(self):
|
||||
b'INTERRUPT 0')
|
||||
self.assertIn(msg, result.stdout)
|
||||
|
||||
+ @unittest.skipUnless(remote_capable(),
|
||||
+ "Remote runner plugin is not available")
|
||||
def test_run_replay_remotefail(self):
|
||||
"""
|
||||
Runs a replay job using remote plugin (not supported).
|
||||
19
avocado-62.0-rawhide-fabric-renamed.patch
Normal file
19
avocado-62.0-rawhide-fabric-renamed.patch
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
diff -ru ../avocado-62.0.ORIG/optional_plugins/runner_remote/setup.py ./optional_plugins/runner_remote/setup.py
|
||||
--- ../avocado-62.0.ORIG/optional_plugins/runner_remote/setup.py 2018-06-12 12:06:21.000000000 -0500
|
||||
+++ ./optional_plugins/runner_remote/setup.py 2018-06-13 10:11:28.610118149 -0500
|
||||
@@ -13,12 +13,13 @@
|
||||
# Copyright: Red Hat Inc. 2017
|
||||
# Author: Cleber Rosa <crosa@redhat.com>
|
||||
|
||||
-import sys
|
||||
+import distro
|
||||
|
||||
from setuptools import setup, find_packages
|
||||
|
||||
|
||||
-if sys.version_info[0] == 3:
|
||||
+if distro.linux_distribution()[0] == 'Fedora' and \
|
||||
+ distro.linux_distribution()[1] >= '29':
|
||||
fabric = 'Fabric3<2.0.0'
|
||||
else:
|
||||
fabric = 'fabric<2.0.0'
|
||||
|
|
@ -11,10 +11,10 @@
|
|||
%global gittar %{srcname}-%{version}.tar.gz
|
||||
%else
|
||||
%if ! 0%{?commit:1}
|
||||
%global commit 33560176c773e1d5d0b83aa59fe5d0f5f80a1cc3
|
||||
%global commit c6ac5529063018ca6df308f8495c71697747e255
|
||||
%endif
|
||||
%if ! 0%{?commit_date:1}
|
||||
%global commit_date 20180425
|
||||
%global commit_date 20180612
|
||||
%endif
|
||||
%global shortcommit %(c=%{commit};echo ${c:0:8})
|
||||
%global gitrel .%{commit_date}git%{shortcommit}
|
||||
|
|
@ -40,7 +40,7 @@
|
|||
%endif
|
||||
|
||||
Name: python-%{pkgname}
|
||||
Version: 61.0
|
||||
Version: 62.0
|
||||
Release: 1%{?gitrel}%{?dist}
|
||||
Summary: Framework with tools and libraries for Automated Testing
|
||||
Group: Development/Tools
|
||||
|
|
@ -55,12 +55,8 @@ Source0: https://github.com/avocado-framework/%{srcname}/archive/%{version}.tar.
|
|||
%else
|
||||
Source0: https://github.com/avocado-framework/%{srcname}/archive/%{commit}.tar.gz#/%{gittar}
|
||||
%endif
|
||||
# Upstream patch to skip remote functional test if remote plugin is not avilable
|
||||
# https://github.com/avocado-framework/avocado/commit/0cc70f1c8a41260640dfc7a660c11bcb1a163419
|
||||
Patch0: avocado-61.0-skip-remote-test-if-plugin-unavailable.patch
|
||||
# Upstream patch to fix unsuitable data_structures identity check
|
||||
# https://github.com/avocado-framework/avocado/pull/2632/commits/71d189b6ac032524ca0a76d2ae0446ebeb8317ff
|
||||
Patch1: avocado-61.0-correct-data_structures-identity-check.patch
|
||||
# fabric has been renamed to Fabric3 in Rawhide
|
||||
Patch0: avocado-62.0-rawhide-fabric-renamed.patch
|
||||
BuildArch: noarch
|
||||
|
||||
BuildRequires: procps-ng
|
||||
|
|
@ -69,6 +65,7 @@ BuildRequires: kmod
|
|||
%if %{with python2}
|
||||
BuildRequires: python2-aexpect
|
||||
BuildRequires: python2-devel
|
||||
BuildRequires: python2-distro
|
||||
BuildRequires: python2-docutils
|
||||
BuildRequires: python2-mock
|
||||
BuildRequires: python2-psutil
|
||||
|
|
@ -99,6 +96,7 @@ BuildRequires: python-stevedore
|
|||
%if %{with python3}
|
||||
BuildRequires: python3-aexpect
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-distro
|
||||
BuildRequires: python3-docutils
|
||||
BuildRequires: python3-lxml
|
||||
BuildRequires: python3-mock
|
||||
|
|
@ -115,7 +113,7 @@ BuildRequires: python3-stevedore
|
|||
BuildRequires: perl-Test-Harness
|
||||
%if %{with python2}
|
||||
BuildRequires: python2-yaml
|
||||
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 7
|
||||
%if 0%{?fedora} >= 27 || 0%{?rhel} > 7
|
||||
BuildRequires: python2-libvirt
|
||||
%else
|
||||
BuildRequires: libvirt-python
|
||||
|
|
@ -123,7 +121,7 @@ BuildRequires: libvirt-python
|
|||
%endif
|
||||
%if %{with python3}
|
||||
BuildRequires: python3-yaml
|
||||
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 7
|
||||
%if 0%{?fedora} >= 27 || 0%{?rhel} > 7
|
||||
BuildRequires: python3-libvirt
|
||||
%else
|
||||
BuildRequires: libvirt-python3
|
||||
|
|
@ -143,15 +141,10 @@ these days a framework) to perform automated testing.
|
|||
%setup -q -n %{srcname}-%{commit}
|
||||
%endif
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
# package plugins-runner-vm requires libvirt-python, but the RPM
|
||||
# version of libvirt-python does not publish the egg info and this
|
||||
# causes that dep to be attempted to be installed by pip
|
||||
sed -e "s/'libvirt-python'//" -i optional_plugins/runner_vm/setup.py
|
||||
%if 0%{?fedora} >= 29
|
||||
# fabric has been renamed to python2-fabric3
|
||||
sed -e "s/'fabric'/'fabric3'/" -i optional_plugins/runner_remote/setup.py
|
||||
%endif
|
||||
|
||||
|
||||
%build
|
||||
|
|
@ -443,10 +436,16 @@ find %{buildroot}%{_docdir}/avocado -type f -name '*.py' -exec %{__chmod} -c -x
|
|||
pushd optional_plugins/glib
|
||||
%{__python2} setup.py develop --user
|
||||
popd
|
||||
# Package build environments have the least amount of resources
|
||||
# we have observed so far. Let's avoid tests that require too
|
||||
# much resources or are time sensitive.
|
||||
LANG=en_US.UTF-8 AVOCADO_CHECK_LEVEL=0 UNITTEST_AVOCADO_CMD="$HOME/.local/bin/avocado" %{__python2} selftests/run
|
||||
# LANG: to make the results predictable, we pin the language
|
||||
# that is used during test execution.
|
||||
# AVOCADO_CHECK_LEVEL: package build environments have the least
|
||||
# amount of resources we have observed so far. Let's avoid tests that
|
||||
# require too much resources or are time sensitive
|
||||
# UNITTEST_AVOCADO_CMD: the "avocado" command to be run during
|
||||
# unittests needs to be a Python specific one on Fedora >= 28. Let's
|
||||
# use the one that was setup in the source tree by the "setup.py
|
||||
# develop --user" step and is guaranteed to be version specific.
|
||||
LANG=en_US.UTF-8 AVOCADO_CHECK_LEVEL=0 UNITTEST_AVOCADO_CMD=$HOME/.local/bin/avocado %{__python2} selftests/run
|
||||
%endif
|
||||
|
||||
%if %{with python3}
|
||||
|
|
@ -484,10 +483,7 @@ find %{buildroot}%{_docdir}/avocado -type f -name '*.py' -exec %{__chmod} -c -x
|
|||
pushd optional_plugins/glib
|
||||
%{__python3} setup.py develop --user
|
||||
popd
|
||||
# Package build environments have the least amount of resources
|
||||
# we have observed so far. Let's avoid tests that require too
|
||||
# much resources or are time sensitive.
|
||||
LANG=en_US.UTF-8 AVOCADO_CHECK_LEVEL=0 UNITTEST_AVOCADO_CMD="$HOME/.local/bin/avocado" %{__python3} selftests/run
|
||||
LANG=en_US.UTF-8 AVOCADO_CHECK_LEVEL=0 UNITTEST_AVOCADO_CMD=$HOME/.local/bin/avocado %{__python3} selftests/run
|
||||
%endif
|
||||
%endif
|
||||
|
||||
|
|
@ -665,7 +661,7 @@ Summary: Avocado Runner for libvirt VM Execution
|
|||
%{?python_provide:%python_provide python2-%{pkgname}-plugins-runner-vm}
|
||||
Requires: python2-%{pkgname} == %{version}-%{release}
|
||||
Requires: python2-%{pkgname}-plugins-runner-remote == %{version}-%{release}
|
||||
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 7
|
||||
%if 0%{?fedora} >= 27 || 0%{?rhel} > 7
|
||||
Requires: python2-libvirt
|
||||
%else
|
||||
Requires: libvirt-python
|
||||
|
|
@ -966,6 +962,10 @@ Again Shell code (and possibly other similar shells).
|
|||
|
||||
|
||||
%changelog
|
||||
* Wed Jun 13 2018 Merlin Mathesius <mmathesi@redhat.com> - 62.0-1
|
||||
- Sync with upstream release 62.0. (BZ#1590572)
|
||||
- Correct libvirt dependency for EPEL7/RHEL7
|
||||
|
||||
* Thu May 17 2018 Merlin Mathesius <mmathesi@redhat.com> - 61.0-1
|
||||
- Sync with upstream release 61.0.
|
||||
- Packaging updates for Python 3.
|
||||
|
|
|
|||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
SHA512 (avocado-61.0.tar.gz) = f1d5c73ec718751e615f63fb1bc0089b3351432395705d83450c88f5d429009687de3f145b90f018d34eb6abbe1ddb953b622e1fee450264a046338cc8d9b217
|
||||
SHA512 (avocado-62.0.tar.gz) = d65c372dc4f320df7158c0b108c547fa12c57c9b901c0de693226fd10f361f011f5dc46d3ae04cfbf8e15fe1ac37a01d70734ec7b01154edef5105e0a64409e3
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue