diff --git a/.gitignore b/.gitignore index 0fff656..3b247d6 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ /avocado-48.0.tar.gz /avocado-49.0.tar.gz /avocado-50.0.tar.gz +/avocado-51.0.tar.gz diff --git a/python-avocado.spec b/python-avocado.spec index 6c660c0..df08191 100644 --- a/python-avocado.spec +++ b/python-avocado.spec @@ -10,10 +10,10 @@ %global gittar %{srcname}-%{version}.tar.gz %else %if ! 0%{?commit:1} - %global commit 6e726259cb8da6b97af64839a2af3410d1b6f620 + %global commit a7275046bf1cf6fee52f7dbdf4bf5b97f6f2b3da %endif %if ! 0%{?commit_date:1} - %global commit_date 20170516 + %global commit_date 20170612 %endif %global shortcommit %(c=%{commit};echo ${c:0:7}) %global gitrel .%{commit_date}git%{shortcommit} @@ -24,10 +24,15 @@ # the functional tests are time and resource sensitive and can # cause race conditions and random build failures. They are # enabled by default. +# However, selftests need to be disabled when libvirt is not available. %global with_tests 1 +%if 0%{?rhel} + # libvirt is not available for all RHEL builder architectures + %global with_tests 0 +%endif Name: python-%{srcname} -Version: 50.0 +Version: 51.0 Release: 1%{?gitrel}%{?dist} Summary: Framework with tools and libraries for Automated Testing Group: Development/Tools @@ -55,9 +60,14 @@ BuildRequires: python-lxml BuildRequires: python2-mock BuildRequires: python-resultsdb_api -%if %{with_tests} +%if 0%{?with_tests} BuildRequires: libvirt-python BuildRequires: perl(TAP::Parser) +%if 0%{?rhel} +BuildRequires: python-yaml +%else +BuildRequires: python2-yaml +%endif %endif %if 0%{?rhel} @@ -66,14 +76,12 @@ BuildRequires: python-requests BuildRequires: python-setuptools BuildRequires: python-sphinx BuildRequires: python-stevedore -BuildRequires: python-yaml %else BuildRequires: python2-psutil BuildRequires: python2-requests BuildRequires: python2-setuptools BuildRequires: python2-sphinx BuildRequires: python2-stevedore -BuildRequires: python2-yaml %endif %if 0%{?el6} @@ -86,9 +94,15 @@ BuildRequires: python-unittest2 BuildRequires: procps-ng %endif +# For some strange reason, fabric on Fedora 24 does not require the +# python-crypto package, but the fabric code always imports it. Newer +# fabric versions, such from Fedora 25 do conditional imports (try: +# from Crypto import Random; except: Random = None) and thus do not +# need this requirement. %if 0%{?fedora} == 24 BuildRequires: python-crypto %endif + %if 0%{?fedora} >= 25 BuildRequires: kmod %endif @@ -108,7 +122,6 @@ License: GPLv2 and MIT Requires: fabric Requires: gdb Requires: gdb-gdbserver -Requires: libvirt-python Requires: pyliblzma Requires: pystache Requires: python2 @@ -116,11 +129,9 @@ Requires: python2 %if 0%{?rhel} Requires: python-requests Requires: python-stevedore -Requires: python-yaml %else Requires: python2-requests Requires: python2-stevedore -Requires: python2-yaml %endif %if 0%{?el6} @@ -202,6 +213,21 @@ Allows Avocado to send job results directly to a ResultsDB server. +%package -n python2-%{srcname}-plugins-varianter-yaml-to-mux +Summary: Avocado plugin to generate variants out of yaml files +%{?python_provide:%python_provide python2-%{srcname}-plugins-resultsdb} +Requires: python2-%{srcname} == %{version}-%{release} +%if 0%{?rhel} +Requires: python-yaml +%else +Requires: python2-yaml +%endif + +%description -n python2-%{srcname}-plugins-varianter-yaml-to-mux +Can be used to produce multiple test variants with test parameters +defined in a yaml file(s). + + %package -n python-%{srcname}-examples Summary: Avocado Test Framework Example Tests License: GPLv2 @@ -231,16 +257,19 @@ pushd optional_plugins/html %{__python2} setup.py build popd pushd optional_plugins/runner_remote - %{__python} setup.py build + %{__python2} setup.py build popd pushd optional_plugins/runner_vm - %{__python} setup.py build + %{__python2} setup.py build popd pushd optional_plugins/runner_docker - %{__python} setup.py build + %{__python2} setup.py build popd pushd optional_plugins/resultsdb - %{__python} setup.py build + %{__python2} setup.py build +popd +pushd optional_plugins/varianter_yaml_to_mux + %{__python2} setup.py build popd %{__make} man @@ -261,6 +290,9 @@ popd pushd optional_plugins/resultsdb %{__python2} setup.py install --root %{buildroot} --skip-build popd +pushd optional_plugins/varianter_yaml_to_mux + %{__python2} setup.py install --root %{buildroot} --skip-build +popd %{__mkdir_p} %{buildroot}%{_mandir}/man1 %{__install} -m 0644 man/avocado.1 %{buildroot}%{_mandir}/man1/avocado.1 %{__install} -m 0644 man/avocado-rest-client.1 %{buildroot}%{_mandir}/man1/avocado-rest-client.1 @@ -273,7 +305,7 @@ find %{buildroot}%{_docdir}/avocado -type f -name '*.py' -exec %{__chmod} -c -x %check -%if %{with_tests} +%if 0%{?with_tests} %{__python2} setup.py develop --user pushd optional_plugins/html %{__python2} setup.py develop --user @@ -290,12 +322,16 @@ find %{buildroot}%{_docdir}/avocado -type f -name '*.py' -exec %{__chmod} -c -x pushd optional_plugins/resultsdb %{__python2} setup.py develop --user popd + pushd optional_plugins/varianter_yaml_to_mux + %{__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. AVOCADO_CHECK_LEVEL=0 selftests/run %endif + %files -n python2-%{srcname} %license LICENSE %doc README.rst @@ -357,12 +393,22 @@ find %{buildroot}%{_docdir}/avocado -type f -name '*.py' -exec %{__chmod} -c -x %{python2_sitelib}/avocado_framework_plugin_resultsdb-%{version}-py%{python2_version}.egg-info +%files -n python2-%{srcname}-plugins-varianter-yaml-to-mux +%{python2_sitelib}/avocado_varianter_yaml_to_mux/ +%{python2_sitelib}/avocado_framework_plugin_varianter_yaml_to_mux-%{version}-py%{python2_version}.egg-info + + %files -n python-%{srcname}-examples %dir %{_docdir}/avocado %{_docdir}/avocado/tests %{_docdir}/avocado/wrappers + %changelog +* Wed Jun 14 2017 Merlin Mathesius - 51.0-1 +- Sync with upstream release 51.0. (BZ#1431413) +- Disable selftests when libvirt may not be available. + * Wed May 17 2017 Merlin Mathesius - 50.0-1 - Sync with upstream release 50.0. (BZ#1431413) - Be explicit about selftest level run on check. diff --git a/sources b/sources index 2280709..71faaff 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (avocado-50.0.tar.gz) = 0b64e83c5d5bb952ea51e619ea011cac7f0668cf048d89beb265a30996cd3c1c22a43bcfbc1d3f533eec458af0b8bfbe80b5dbe817e8531357bcefc48e867623 +SHA512 (avocado-51.0.tar.gz) = 4367f32302f983b8ac39f11f6c01a3bab78527f1885564b0759acc239e9b87fa3ea7299fc251e697314a5be28107099383300db3bfa2ca9a030372b555a75828