From 0df2004e57308bd41864206aa380ae20de83ba6f Mon Sep 17 00:00:00 2001 From: Cleber Rosa Date: Fri, 18 Mar 2022 13:52:43 -0400 Subject: [PATCH] Sync with upstream release 95.0 Signed-off-by: Cleber Rosa --- .gitignore | 2 ++ python-avocado.spec | 53 ++++++++++++++++++++++++++++++--------------- sources | 3 ++- 3 files changed, 40 insertions(+), 18 deletions(-) diff --git a/.gitignore b/.gitignore index c546198..cea2ad1 100644 --- a/.gitignore +++ b/.gitignore @@ -36,3 +36,5 @@ /avocado-88.1.tar.gz /avocado-89.0.tar.gz /avocado-90.0.tar.gz +/avocado-95.0.tar.gz +/avocado-95.0-resultsdb_api.patch diff --git a/python-avocado.spec b/python-avocado.spec index 8e5def7..be3d8e5 100644 --- a/python-avocado.spec +++ b/python-avocado.spec @@ -9,10 +9,10 @@ %global gittar avocado-%{version}.tar.gz %else %if ! 0%{?commit:1} - %global commit 1aa47c413edb406734d95faffc2b347988249100 + %global commit 695ef39fe47e074b5349051e2866edeb3f017b94 %endif %if ! 0%{?commit_date:1} - %global commit_date 20210727 + %global commit_date 20220209 %endif %global shortcommit %(c=%{commit};echo ${c:0:9}) %global gitrel .%{commit_date}git%{shortcommit} @@ -24,17 +24,19 @@ # the functional tests are time and resource sensitive and can # cause race conditions and random build failures. They are # enabled by default. -%global with_tests 1 +# You can disable them with rpmbuild ... --without tests +%bcond_without tests -# resultsdb is not available for RHEL -%if ! 0%{?rhel} +# Only Fedora 36 and later have a suitable python3-resutlsdb_api +# package +%if 0%{?fedora} >= 36 %global with_resultsdb 1 %else %global with_resultsdb 0 %endif Name: python-avocado -Version: 90.0 +Version: 95.0 Release: 1%{?gitrel}%{?dist} Summary: Framework with tools and libraries for Automated Testing # Found licenses: @@ -48,6 +50,7 @@ Summary: Framework with tools and libraries for Automated Testing License: GPLv2+ and GPLv2 and MIT URL: https://avocado-framework.github.io/ Source0: https://github.com/avocado-framework/avocado/archive/%{gitref}/%{gittar} +Patch0: avocado-95.0-resultsdb_api.patch BuildArch: noarch BuildRequires: kmod @@ -63,8 +66,10 @@ BuildRequires: python3-resultsdb_api BuildRequires: python3-pycdlib %endif -%if 0%{?with_tests} +%if %{with tests} +%if ! 0%{?rhel} >= 9 BuildRequires: genisoimage +%endif BuildRequires: libcdio BuildRequires: psmisc %if ! 0%{?rhel} @@ -74,7 +79,7 @@ BuildRequires: glibc-all-langpacks BuildRequires: python3-netifaces BuildRequires: python3-yaml %endif -# with_tests +# with tests %description Avocado is a set of tools and libraries (what people call @@ -83,6 +88,7 @@ these days a framework) to perform automated testing. %prep %setup -q -n avocado-%{gitref} +%patch0 -p 1 %if 0%{?rhel} sed -e "s/'PyYAML>=4.2b2'/'PyYAML>=3.12'/" -i optional_plugins/varianter_yaml_to_mux/setup.py %endif @@ -121,13 +127,14 @@ for exe in \ avocado-runner \ avocado-runner-noop \ avocado-runner-dry-run \ - avocado-runner-exec \ avocado-runner-exec-test \ avocado-runner-python-unittest \ avocado-runner-avocado-instrumented \ avocado-runner-tap \ avocado-runner-requirement-asset \ avocado-runner-requirement-package \ + avocado-runner-sysinfo \ + avocado-external-runner \ avocado-software-manager do mv %{buildroot}%{_bindir}/$exe %{buildroot}%{_bindir}/$exe-%{python3_version} @@ -139,9 +146,6 @@ done rm -rf %{buildroot}%{python3_sitelib}/avocado/etc # ditto for libexec files rm -rf %{buildroot}%{python3_sitelib}/avocado/libexec -# adjust permissions for file containing shebang line needed for -# spawning tasks in podman containers -chmod -c +x %{buildroot}%{python3_sitelib}/avocado/core/nrunner.py pushd optional_plugins/html %py3_install popd @@ -193,7 +197,7 @@ cp -r examples/yaml_to_mux %{buildroot}%{_docdir}/avocado/yaml_to_mux find %{buildroot}%{_docdir}/avocado -type f -name '*.py' -exec chmod -c -x {} ';' -%if 0%{?with_tests} +%if %{with tests} %check # LANG: to make the results predictable, we pin the language # that is used during test execution. @@ -204,7 +208,7 @@ find %{buildroot}%{_docdir}/avocado -type f -name '*.py' -exec chmod -c -x {} '; PYTHONPATH=%{buildroot}%{python3_sitelib}:. \ LANG=en_US.UTF-8 \ AVOCADO_CHECK_LEVEL=0 \ - %{python3} selftests/check.py --disable-static-checks --disable-plugin-checks=robot + %{python3} selftests/check.py --skip static-checks --disable-plugin-checks robot %endif @@ -239,9 +243,6 @@ these days a framework) to perform automated testing. %{_bindir}/avocado-runner-dry-run-%{python3_version} %{_bindir}/avocado-runner-dry-run-3 %{_bindir}/avocado-runner-dry-run -%{_bindir}/avocado-runner-exec-%{python3_version} -%{_bindir}/avocado-runner-exec-3 -%{_bindir}/avocado-runner-exec %{_bindir}/avocado-runner-exec-test-%{python3_version} %{_bindir}/avocado-runner-exec-test-3 %{_bindir}/avocado-runner-exec-test @@ -260,9 +261,15 @@ these days a framework) to perform automated testing. %{_bindir}/avocado-runner-requirement-package-%{python3_version} %{_bindir}/avocado-runner-requirement-package-3 %{_bindir}/avocado-runner-requirement-package +%{_bindir}/avocado-runner-sysinfo-%{python3_version} +%{_bindir}/avocado-runner-sysinfo-3 +%{_bindir}/avocado-runner-sysinfo %{_bindir}/avocado-software-manager-%{python3_version} %{_bindir}/avocado-software-manager-3 %{_bindir}/avocado-software-manager +%{_bindir}/avocado-external-runner-%{python3_version} +%{_bindir}/avocado-external-runner-3 +%{_bindir}/avocado-external-runner %package -n python-avocado-common @@ -438,6 +445,18 @@ Again Shell code (and possibly other similar shells). %changelog +* Thu Mar 17 2022 Cleber Rosa - 95.0-1 +- Sync with upstream release 95.0. +- Added new binary for 'avocado-external-runner' +- Removed executable mode from avocado/core/nrunner.py +- Adjust selftest/check.py to use new --skip option +- Do not require genisoimage on EL9 +- Replace the %global with_tests macro with %bcond_without to allow + disable the tests directly in the command line. +- Removed avocado-runner-exec since we have avocado-runner-exec-test. +- Added avocado-runner-sysinfo in package +- Added upstream patch that pins resultsdb_api to working version. + * Tue Jul 27 2021 Cleber Rosa - 90.0-1 - Sync with upstream release 90.0. - Removed patch already included upstream diff --git a/sources b/sources index 03d7c96..c62d572 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ -SHA512 (avocado-90.0.tar.gz) = 3aef3e8d0eff03c6239169cc06b5d7195be9b086595cd57fd7abd4834ebaf32974fdb05b867725cc8f8f91f35ef3ae61468cff23b97f3cf910a3c1b03f7a29b8 +SHA512 (avocado-95.0-resultsdb_api.patch) = fd62130106eb67d71102e9c33935ae424c92ec6d8a27ab35e856f1449c51a4bc7d6ac768b67fdd95ec894ed57b60ca0aa6fea00ccbd378c93696636c14d7b001 +SHA512 (avocado-95.0.tar.gz) = 12d831c002f1e808c75b86008d08a78a98fb473b58d655876312343721548601604579d6ca2fc4a91fc33f91925de055697541458b72fc8f12a56170a35da7ef