Compare commits

..

29 commits

Author SHA1 Message Date
Cleber Rosa
ee5cf26e92 Sync with upstream release 112.0
Signed-off-by: Cleber Rosa <crosa@redhat.com>
2025-10-14 14:03:53 -04:00
Fedora Release Engineering
a0f088ed18 Unretirement request: pagure.io/releng/issue/13001
Revert "Retired: Fails to install: https://pagure.io/releng/issue/12969"

This reverts commit e350a6d823.

Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2025-10-09 12:01:58 +00:00
Miro Hrončok
e350a6d823 Retired: Fails to install: https://pagure.io/releng/issue/12969 2025-09-30 20:59:45 +02:00
Fedora Release Engineering
947ceab00c Unretirement request: pagure.io/releng/issue/12907
Revert "Retired: Fails to install: https://pagure.io/releng/issue/12871"

This reverts commit a12e378e73.

Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2025-08-28 06:18:04 +00:00
Miro Hrončok
a12e378e73 Retired: Fails to install: https://pagure.io/releng/issue/12871 2025-08-19 11:56:28 +02:00
Fedora Release Engineering
71b50479dd Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-25 06:46:47 +00:00
Python Maint
54d20e2b89 Rebuilt for Python 3.14 2025-06-03 15:32:47 +02:00
Miro Hrončok
d84ef63709 Loosen the PyYAML version requirement in python3-avocado-plugins-varianter-yaml-to-mux
Upstream has pinned this for Debian reasons:

f130c763be

Signed-off-by: Cleber Rosa <crosa@redhat.com>
2025-01-20 18:55:27 -05:00
Miroslav Suchý
c84a1c5f93 migrate license to SPDX
This is part of https://fedoraproject.org/wiki/Changes/SPDX_Licenses_Phase_4

Signed-off-by: Cleber Rosa <crosa@redhat.com>
2025-01-20 17:07:25 -05:00
Fedora Release Engineering
a50932740b Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-18 12:05:43 +00:00
Miroslav Suchý
fbd8b0d95c Migrate to SPDX license
This is part of https://fedoraproject.org/wiki/Changes/SPDX_Licenses_Phase_4

If there will be no comments in two weeks, I will merge this.
2024-10-07 10:28:42 +00:00
Cleber Rosa
6e6d0dac89 Update to version 92.3
This update to a minor release on the 92LTS series, allowing
for building and running under F42.

Signed-off-by: Cleber Rosa <crosa@redhat.com>
2024-08-19 10:24:09 -04:00
Miroslav Suchý
5e41ae22a8 convert GPLv2+ license to SPDX
This is part of https://fedoraproject.org/wiki/Changes/SPDX_Licenses_Phase_4
2024-07-26 02:15:51 +02:00
Fedora Release Engineering
42c94b1fec Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild 2024-07-19 09:39:48 +00:00
Python Maint
3c3eeac432 Rebuilt for Python 3.13 2024-06-07 18:57:17 +02:00
Fedora Release Engineering
81494bf611 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-29 11:09:26 +00:00
Fedora Release Engineering
9e4eb91643 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-26 01:30:07 +00:00
Fedora Release Engineering
5bb1ce77be Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-21 23:29:41 +00:00
Fedora Release Engineering
d9406a60f2 Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-21 07:31:24 +00:00
Cleber Rosa
a4811c461c Update to version 92.1
This also enables the build/usage under Python 3.12, making it
suitable for Fedora 39.

Reference: https://bugzilla.redhat.com/show_bug.cgi?id=2220126
Reference: https://bugzilla.redhat.com/show_bug.cgi?id=2155457
Signed-off-by: Cleber Rosa <crosa@redhat.com>
2023-07-17 13:44:25 -04:00
Python Maint
1a301b6268 Rebuilt for Python 3.12 2023-06-14 20:21:36 +02:00
Fedora Release Engineering
92e1215793 Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-20 11:24:35 +00:00
Cleber Rosa
af6d992792 Update to version 92.0
The current packaged version from upstream matches the Long Term
Stability (LTS) release 82.0, which is about to be EOLed upstream.
This updates the pacakge to track the latest and current LTS release.

Signed-off-by: Cleber Rosa <crosa@redhat.com>
2022-08-10 09:00:25 -04:00
Cleber Rosa
04eafa9d9e Sync gdbtest.py with latest upstream
Signed-off-by: Cleber Rosa <crosa@redhat.com>
2022-08-10 09:00:25 -04:00
Fedora Release Engineering
85196ff998 Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-22 16:32:26 +00:00
Python Maint
a2cb6ab161 Rebuilt for Python 3.11 2022-06-21 10:14:20 +02:00
Fedora Release Engineering
d6e052f5df - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-21 10:30:48 +00:00
Merlin Mathesius
45e0653cdc Loosen jinja2 version requirement to fix FTBFS in Rawhide
Signed-off-by: Merlin Mathesius <mmathesi@redhat.com>
2021-07-28 11:48:40 -05:00
Fedora Release Engineering
ca704ced8a - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-23 05:08:18 +00:00
4 changed files with 258 additions and 149 deletions

5
.gitignore vendored
View file

@ -28,3 +28,8 @@
/avocado-79.0.tar.gz
/avocado-80.0.tar.gz
/avocado-82.0.tar.gz
/avocado-92.0.tar.gz
/avocado-92.1.tar.gz
/avocado-92.1-python312.patch
/avocado-92.3.tar.gz
/avocado-112.0.tar.gz

View file

@ -9,10 +9,10 @@
%global gittar avocado-%{version}.tar.gz
%else
%if ! 0%{?commit:1}
%global commit e97540793998c4f24a16000465dd7fdd213bf2b9
%global commit e4ede79f097dcc1dbd30e43ffe3b7daf52d2204d
%endif
%if ! 0%{?commit_date:1}
%global commit_date 20200911
%global commit_date 20251010
%endif
%global shortcommit %(c=%{commit};echo ${c:0:9})
%global gitrel .%{commit_date}git%{shortcommit}
@ -24,18 +24,20 @@
# 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: 82.0
Release: 2%{?gitrel}%{?dist}
Version: 112.0
Release: 1%{?gitrel}%{?dist}
Summary: Framework with tools and libraries for Automated Testing
# Found licenses:
# avocado/core/tapparser.py: MIT
@ -58,23 +60,35 @@ BuildRequires: python3-jinja2
BuildRequires: python3-lxml
BuildRequires: python3-psutil
BuildRequires: python3-setuptools
%if ! 0%{?rhel}
BuildRequires: python-aexpect
%endif
%if %{with_resultsdb}
BuildRequires: python3-resultsdb_api
BuildRequires: python3-pycdlib
%endif
%if 0%{?with_tests}
%if %{with tests}
BuildRequires: python3-jsonschema
%if ! 0%{?rhel} >= 9
BuildRequires: genisoimage
%endif
BuildRequires: libcdio
BuildRequires: psmisc
%if ! 0%{?rhel}
BuildRequires: perl-Test-Harness
BuildRequires: python3-xmlschema
BuildRequires: ansible-core
%endif
BuildRequires: glibc-all-langpacks
BuildRequires: python3-netifaces
BuildRequires: python3-yaml
BuildRequires: nmap-ncat
BuildRequires: gcc
BuildRequires: gdb
BuildRequires: gdb-gdbserver
%endif
# with_tests
# with tests
%description
Avocado is a set of tools and libraries (what people call
@ -84,10 +98,12 @@ these days a framework) to perform automated testing.
%prep
%setup -q -n avocado-%{gitref}
%if 0%{?rhel}
sed -e "s/'PyYAML>=4.2b2'/'PyYAML>=3.12'/" -i optional_plugins/varianter_yaml_to_mux/setup.py
sed -e 's/"PyYAML>=4.2b2"/"PyYAML>=3.12"/' -i optional_plugins/varianter_yaml_to_mux/setup.py
%endif
%if 0%{?fedora} >= 42
sed -e '/"markupsafe<3.0.0"/d' -i optional_plugins/html/setup.py
sed -e '/"markupsafe<3.0.0"/d' -i optional_plugins/ansible/setup.py
%endif
# drop unnecessary install requirement
sed -e "s/'markupsafe<2.0.0', //" -i optional_plugins/html/setup.py
%build
%py3_build
@ -102,12 +118,14 @@ popd
pushd optional_plugins/varianter_yaml_to_mux
%py3_build
popd
pushd optional_plugins/loader_yaml
%py3_build
popd
pushd optional_plugins/golang
%py3_build
popd
%if ! 0%{?rhel}
pushd optional_plugins/ansible
%py3_build
popd
%endif
pushd optional_plugins/varianter_pict
%py3_build
popd
@ -117,22 +135,33 @@ popd
pushd optional_plugins/result_upload
%py3_build
popd
pushd optional_plugins/glib
pushd optional_plugins/mail
%py3_build
popd
%if ! 0%{?rhel}
pushd optional_plugins/spawner_remote
%py3_build
popd
%endif
rst2man man/avocado.rst man/avocado.1
%install
%py3_install
for exe in \
avocado \
avocado-runner \
avocado-runner-noop \
avocado-runner-exec \
avocado-runner-dry-run \
avocado-runner-exec-test \
avocado-runner-python-unittest \
avocado-runner-avocado-instrumented \
avocado-runner-tap \
avocado-runner-asset \
avocado-runner-package \
avocado-runner-pip \
avocado-runner-podman-image \
avocado-runner-sysinfo \
avocado-runner-vmimage \
avocado-external-runner \
avocado-software-manager
do
mv %{buildroot}%{_bindir}/$exe %{buildroot}%{_bindir}/$exe-%{python3_version}
@ -144,9 +173,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
@ -158,12 +184,14 @@ popd
pushd optional_plugins/varianter_yaml_to_mux
%py3_install
popd
pushd optional_plugins/loader_yaml
%py3_install
popd
pushd optional_plugins/golang
%py3_install
popd
%if ! 0%{?rhel}
pushd optional_plugins/ansible
%py3_install
popd
%endif
pushd optional_plugins/varianter_pict
%py3_install
popd
@ -173,9 +201,14 @@ popd
pushd optional_plugins/result_upload
%py3_install
popd
pushd optional_plugins/glib
pushd optional_plugins/mail
%py3_install
popd
%if ! 0%{?rhel}
pushd optional_plugins/spawner_remote
%py3_install
popd
%endif
# cleanup plugin test cruft
rm -rf %{buildroot}%{python3_sitelib}/tests
mkdir -p %{buildroot}%{_sysconfdir}/avocado
@ -199,13 +232,12 @@ cp -r examples/plugins %{buildroot}%{_docdir}/avocado/plugins
cp -r examples/tests %{buildroot}%{_docdir}/avocado/tests
cp -r examples/varianter_cit %{buildroot}%{_docdir}/avocado/varianter_cit
cp -r examples/varianter_pict %{buildroot}%{_docdir}/avocado/varianter_pict
cp -r examples/wrappers %{buildroot}%{_docdir}/avocado/wrappers
cp -r examples/yaml_to_mux %{buildroot}%{_docdir}/avocado/yaml_to_mux
cp -r examples/yaml_to_mux_loader %{buildroot}%{_docdir}/avocado/yaml_to_mux_loader
mkdir -p %{buildroot}%{_datarootdir}/avocado
mv %{buildroot}%{python3_sitelib}/avocado/schemas %{buildroot}%{_datarootdir}/avocado
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.
@ -216,7 +248,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/run
%{python3} selftests/check.py --skip static-checks --disable-plugin-checks robot
%endif
@ -242,15 +274,12 @@ these days a framework) to perform automated testing.
%{_bindir}/avocado-%{python3_version}
%{_bindir}/avocado-3
%{_bindir}/avocado
%{_bindir}/avocado-runner-%{python3_version}
%{_bindir}/avocado-runner-3
%{_bindir}/avocado-runner
%{_bindir}/avocado-runner-noop-%{python3_version}
%{_bindir}/avocado-runner-noop-3
%{_bindir}/avocado-runner-noop
%{_bindir}/avocado-runner-exec-%{python3_version}
%{_bindir}/avocado-runner-exec-3
%{_bindir}/avocado-runner-exec
%{_bindir}/avocado-runner-dry-run-%{python3_version}
%{_bindir}/avocado-runner-dry-run-3
%{_bindir}/avocado-runner-dry-run
%{_bindir}/avocado-runner-exec-test-%{python3_version}
%{_bindir}/avocado-runner-exec-test-3
%{_bindir}/avocado-runner-exec-test
@ -263,9 +292,30 @@ these days a framework) to perform automated testing.
%{_bindir}/avocado-runner-tap-%{python3_version}
%{_bindir}/avocado-runner-tap-3
%{_bindir}/avocado-runner-tap
%{_bindir}/avocado-runner-asset-%{python3_version}
%{_bindir}/avocado-runner-asset-3
%{_bindir}/avocado-runner-asset
%{_bindir}/avocado-runner-package-%{python3_version}
%{_bindir}/avocado-runner-package-3
%{_bindir}/avocado-runner-package
%{_bindir}/avocado-runner-pip-%{python3_version}
%{_bindir}/avocado-runner-pip-3
%{_bindir}/avocado-runner-pip
%{_bindir}/avocado-runner-podman-image-%{python3_version}
%{_bindir}/avocado-runner-podman-image-3
%{_bindir}/avocado-runner-podman-image
%{_bindir}/avocado-runner-sysinfo-%{python3_version}
%{_bindir}/avocado-runner-sysinfo-3
%{_bindir}/avocado-runner-sysinfo
%{_bindir}/avocado-runner-vmimage-%{python3_version}
%{_bindir}/avocado-runner-vmimage-3
%{_bindir}/avocado-runner-vmimage
%{_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
@ -286,6 +336,10 @@ Common files (such as configuration) for the Avocado Testing Framework.
%dir %{_sysconfdir}/avocado/scripts/job
%dir %{_sysconfdir}/avocado/scripts/job/pre.d
%dir %{_sysconfdir}/avocado/scripts/job/post.d
%dir %{_sharedstatedir}/avocado/data
%dir %{_datarootdir}/avocado
%dir %{_datarootdir}/avocado/schemas
%{_datarootdir}/avocado/schemas/*
%config(noreplace) %{_sysconfdir}/avocado/sysinfo/commands
%config(noreplace) %{_sysconfdir}/avocado/sysinfo/files
%config(noreplace) %{_sysconfdir}/avocado/sysinfo/profilers
@ -339,20 +393,6 @@ defined in a yaml file(s).
%{python3_sitelib}/avocado_framework_plugin_varianter_yaml_to_mux-%{version}-py%{python3_version}.egg-info
%package -n python3-avocado-plugins-loader-yaml
Summary: Avocado plugin that loads tests from YAML files
License: GPLv2+
Requires: python3-avocado-plugins-varianter-yaml-to-mux == %{version}-%{release}
%description -n python3-avocado-plugins-loader-yaml
Can be used to produce a test suite from definitions in a YAML file,
similar to the one used in the yaml_to_mux varianter plugin.
%files -n python3-avocado-plugins-loader-yaml
%{python3_sitelib}/avocado_loader_yaml/
%{python3_sitelib}/avocado_framework_plugin_loader_yaml-%{version}-py%{python3_version}.egg-info
%package -n python3-avocado-plugins-golang
Summary: Avocado plugin for execution of golang tests
License: GPLv2+
@ -366,6 +406,25 @@ also run them.
%files -n python3-avocado-plugins-golang
%{python3_sitelib}/avocado_golang/
%{python3_sitelib}/avocado_framework_plugin_golang-%{version}-py%{python3_version}.egg-info
%{_bindir}/avocado-runner-golang
%if ! 0%{?rhel}
%package -n python3-avocado-plugins-ansible
Summary: Avocado Ansible Dependency plugin
License: GPLv2+
Requires: python3-avocado == %{version}-%{release}
Requires: ansible-core
%description -n python3-avocado-plugins-ansible
Adds to Avocado the ability to use ansible modules as dependecies for
tests.
%files -n python3-avocado-plugins-ansible
%{python3_sitelib}/avocado_ansible*
%{python3_sitelib}/avocado_framework_plugin_ansible*
%{_bindir}/avocado-runner-ansible-module
%endif
%package -n python3-avocado-plugins-varianter-pict
@ -410,20 +469,32 @@ a dedicated sever.
%{python3_sitelib}/avocado_result_upload/
%{python3_sitelib}/avocado_framework_plugin_result_upload-%{version}-py%{python3_version}.egg-info
%package -n python3-avocado-plugins-glib
Summary: Avocado plugin for execution of GLib Test Framework tests
%package -n python3-avocado-plugins-result-mail
Summary: Avocado Mail Notification for Jobs
License: GPLv2+
Requires: python3-avocado == %{version}-%{release}
%description -n python3-avocado-plugins-glib
This optional plugin is intended to list and run tests written in the
GLib Test Framework.
%description -n python3-avocado-plugins-result-mail
The Mail result plugin enables you to receive email notifications
for job start and completion events within the Avocado testing framework.
%files -n python3-avocado-plugins-glib
%{python3_sitelib}/avocado_glib/
%{python3_sitelib}/avocado_framework_plugin_glib-%{version}-py%{python3_version}.egg-info
%files -n python3-avocado-plugins-result-mail
%{python3_sitelib}/avocado_result_mail*
%{python3_sitelib}/avocado_framework_plugin_result_mail*
%if ! 0%{?rhel}
%package -n python3-avocado-plugins-spawner-remote
Summary: Avocado Plugin to spawn tests on a remote host
License: GPLv2+
Requires: python3-avocado == %{version}-%{release}
%description -n python3-avocado-plugins-spawner-remote
This optional plugin is intended to spawn tests on a remote host.
%files -n python3-avocado-plugins-spawner-remote
%{python3_sitelib}/avocado_spawner_remote*
%{python3_sitelib}/avocado_framework_plugin_spawner_remote*
%endif
%package -n python-avocado-examples
Summary: Avocado Test Framework Example Tests
@ -444,9 +515,7 @@ examples of how to write tests on your own.
%{_docdir}/avocado/tests
%{_docdir}/avocado/varianter_cit
%{_docdir}/avocado/varianter_pict
%{_docdir}/avocado/wrappers
%{_docdir}/avocado/yaml_to_mux
%{_docdir}/avocado/yaml_to_mux_loader
%package -n python-avocado-bash
@ -469,6 +538,93 @@ Again Shell code (and possibly other similar shells).
%changelog
* Fri Oct 10 2025 Cleber Rosa <crosa@redhat.com> - 112.0-1
- Sync with upstream release 112.0
- Removed python3-elementpath build requirement
- Made the remote spawner a proper sub package
- Packaged JSON schema files
- Introduced new sub package for mail plugin
- Removed the pinning of markupsafe on Fedora 42 and later
- Packaged avocado-runner-pip
- Packaged avocado-runner-vmimage
- Provide requirements for running the functional test
nrunner.py:TaskRunStatusService.test_task_status_service_lost
- Require gcc, gdb and gdb-gdbserver for tests
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 92.3-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Tue Jun 03 2025 Python Maint <python-maint@redhat.com> - 92.3-5
- Rebuilt for Python 3.14
* Mon Jan 20 2025 Miro Hrončok <mhroncok@redhat.com> - 92.3-4
- Loosen the PyYAML version requirement in python3-avocado-plugins-varianter-yaml-to-mux
* Mon Jan 20 2025 Cleber Rosa <crosa@redhat.com> - 92.3-3
- convert remaining licenses to SPDX
* Sat Jan 18 2025 Fedora Release Engineering <releng@fedoraproject.org> - 92.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Mon Aug 19 2024 Cleber Rosa <crosa@redhat.com> - 92.3-1
- Updated to 92.3
- Support building and running under Python 3.13 for F42
- Removed patch from 92.1 as its present in 92.3
* Fri Jul 26 2024 Miroslav Suchý <msuchy@redhat.com> - 92.1-8
- convert license to SPDX
* Fri Jul 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 92.1-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Fri Jun 07 2024 Python Maint <python-maint@redhat.com> - 92.1-6
- Rebuilt for Python 3.13
* Mon Jan 29 2024 Fedora Release Engineering <releng@fedoraproject.org> - 92.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 92.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 92.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 92.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Mon Jul 17 2023 Cleber Rosa <crosa@redhat.com> - 92.1-1
- Updated to 92.1
- Support building and running under Python 3.12 for F39
* Wed Jun 14 2023 Python Maint <python-maint@redhat.com> - 92.0-3
- Rebuilt for Python 3.12
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 92.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Tue Aug 9 2022 Cleber Rosa <crosa@redhat.com> - 92.0-1
- Use selftests/check.py job instead of more limited selftests/run
- Included avocado-runner-sysinfo, avocado-runner-requirement-package,
avocado-runner-requirement-asset and avocado-runner-dry-run and
avocado-runner-golang executables
- Removed avocado-runner-exec executable
- Removed loader_yaml and glib plugin packages
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 82.0-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Tue Jun 21 2022 Python Maint <python-maint@redhat.com> - 82.0-6
- Rebuilt for Python 3.11
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 82.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Wed Jul 28 2021 Merlin Mathesius <mmathesi@redhat.com> - 82.0-4
- Loosen jinja2 version requirement to fix FTBFS in Rawhide
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 82.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Thu Mar 18 2021 Merlin Mathesius <mmathesi@redhat.com> - 82.0-2
- Drop obsolete packages from BuildRequires
- Generate man page directly using 'rst2man' rather than requiring 'make'

View file

@ -1 +1 @@
SHA512 (avocado-82.0.tar.gz) = 099ab131b2b941602550e71507e4ca517d5d2cd5152b255edace0473c9de93aac8163a61689414b5b58f9211f58981c3c30c1c3ca8a191283f609722ce07f173
SHA512 (avocado-112.0.tar.gz) = 1872eda730f5cd28f0562732464ce14b2c7731cedb298fcc4b093a04235d26cc5e3db7f92c3ae3edcd6104ad2db4fce66fa7a6148da754e4bdb8120fa12a75a3

View file

@ -1,14 +1,7 @@
#!/usr/bin/env python
import os
from six.moves import xrange as range
from avocado import Test
from avocado import main
from avocado.utils import gdb
from avocado.utils import genio
from avocado.utils import process
from avocado.utils import gdb, genio, process
class GdbTest(Test):
@ -32,17 +25,22 @@ class GdbTest(Test):
"-auto-debug-it"]
def setUp(self):
return99_source_path = os.path.join(self.datadir, 'return99.c')
segfault_source_path = os.path.join(self.datadir, 'segfault.c')
self.return99_binary_path = os.path.join(self.outputdir, 'return99')
process.system('gcc -O0 -g %s -o %s' % (return99_source_path,
self.return99_binary_path))
self.segfault_binary_path = os.path.join(self.outputdir, 'segfault')
process.system('gcc -O0 -g %s -o %s' % (segfault_source_path,
self.segfault_binary_path))
self.return99_binary_path = os.path.join(self.teststmpdir, 'return99')
if not os.path.exists(self.return99_binary_path):
return99_source_path = self.get_data('return99.c')
if return99_source_path is None:
self.cancel('Test is missing data file "return99.c"')
process.system(f'gcc -O0 -g {return99_source_path} -o {self.return99_binary_path}')
self.segfault_binary_path = os.path.join(self.teststmpdir, 'segfault')
if not os.path.exists(self.segfault_binary_path):
segfault_source_path = self.get_data('segfault.c')
if segfault_source_path is None:
self.cancel('Test is missing data file "segfault.c"')
process.system(f'gcc -O0 -g {segfault_source_path} -o {self.segfault_binary_path}')
@staticmethod
def is_process_alive(process):
def is_process_alive(process): # pylint: disable=W0621
"""
Checks if a process is still alive
@ -73,14 +71,14 @@ class GdbTest(Test):
g = gdb.GDB()
self.log.info("Testing existing (valid) GDB commands using raw commands")
for cmd in self.VALID_CMDS:
info_cmd = "-info-gdb-mi-command %s" % cmd[1:]
info_cmd = f"-info-gdb-mi-command {cmd[1:]}"
r = g.cmd(info_cmd)
self.assertEqual(r.result.result.command.exists, 'true')
self.log.info("Testing non-existing (invalid) GDB commands using raw "
"commands")
for cmd in self.INVALID_CMDS:
info_cmd = "-info-gdb-mi-command %s" % cmd[1:]
info_cmd = f"-info-gdb-mi-command {cmd[1:]}"
r = g.cmd(info_cmd)
self.assertEqual(r.result.result.command.exists, 'false')
@ -105,7 +103,7 @@ class GdbTest(Test):
self.log.info("Testing that GDB loads a file and sets a breakpoint")
g = gdb.GDB()
file_cmd = "-file-exec-and-symbols %s" % self.return99_binary_path
file_cmd = f"-file-exec-and-symbols {self.return99_binary_path}"
r = g.cmd(file_cmd)
self.assertEqual(r.result.class_, 'done')
@ -145,7 +143,7 @@ class GdbTest(Test):
self.log.info("Testing that a core dump will be generated")
g = gdb.GDB()
file_cmd = "-file-exec-and-symbols %s" % self.segfault_binary_path
file_cmd = f"-file-exec-and-symbols {self.segfault_binary_path}"
r = g.cmd(file_cmd)
self.assertEqual(r.result.class_, 'done')
@ -156,12 +154,12 @@ class GdbTest(Test):
other_messages = g.read_until_break()
core_path = None
for msg in other_messages:
parsed_msg = gdb.parse_mi(msg)
parsed_msg = gdb.parse_mi(msg.decode())
if (hasattr(parsed_msg, 'class_') and
(parsed_msg.class_ == 'stopped') and
(parsed_msg.result.signal_name == 'SIGSEGV')):
core_path = "%s.core" % self.segfault_binary_path
gcore_cmd = 'gcore %s' % core_path
core_path = f"{self.segfault_binary_path}.core"
gcore_cmd = f'gcore {core_path}'
gcore_cmd = gdb.encode_mi_cli(gcore_cmd)
r = g.cmd(gcore_cmd)
self.assertEqual(r.result.class_, 'done')
@ -191,14 +189,14 @@ class GdbTest(Test):
# Do 100 cycle of target (kind of connects) and disconnects
for _ in range(0, 100):
cmd = '-target-select extended-remote :%s' % s.port
cmd = f'-target-select extended-remote :{s.port}'
r = g.cmd(cmd)
self.assertEqual(r.result.class_, 'connected')
r = g.cmd('-target-disconnect')
self.assertEqual(r.result.class_, 'done')
# manual server shutdown
cmd = '-target-select extended-remote :%s' % s.port
cmd = f'-target-select extended-remote :{s.port}'
r = g.cmd(cmd)
self.assertEqual(r.result.class_, 'connected')
r = g.cli_cmd('monitor exit')
@ -234,15 +232,15 @@ class GdbTest(Test):
s = gdb.GDBServer()
g = gdb.GDB()
cmd = '-file-exec-and-symbols %s' % self.return99_binary_path
cmd = f'-file-exec-and-symbols {self.return99_binary_path}'
r = g.cmd(cmd)
self.assertEqual(r.result.class_, 'done')
cmd = 'set remote exec-file %s' % self.return99_binary_path
cmd = f'set remote exec-file {self.return99_binary_path}'
r = g.cmd(cmd)
self.assertEqual(r.result.class_, 'done')
cmd = "-break-insert %s" % 'main'
cmd = f"-break-insert {'main'}"
r = g.cmd(cmd)
self.assertEqual(r.result.class_, 'done')
@ -250,7 +248,7 @@ class GdbTest(Test):
other_messages = g.read_until_break()
for msg in other_messages:
parsed_msg = gdb.parse_mi(msg)
parsed_msg = gdb.parse_mi(msg.decode())
if (hasattr(parsed_msg, 'class_') and
parsed_msg.class_ == 'stopped' and
parsed_msg.result.reason == 'breakpoint-hit'):
@ -278,7 +276,8 @@ class GdbTest(Test):
c1 = gdb.GDB()
c1.connect(s.port)
c2 = gdb.GDB()
self.assertRaises(ValueError, c2.connect, s.port)
with self.assertRaises(gdb.UnexpectedResponseError):
c2.connect(s.port)
s.exit()
def test_server_exit(self):
@ -310,43 +309,6 @@ class GdbTest(Test):
server_instances[i].exit()
self.assertFalse(self.is_process_alive(server_instances[i].process))
def test_interactive(self):
"""
Tests avocado's GDB plugin features
If GDB command line options are given, `--gdb-run-bin=return99` for
this particular test, the test will stop at binary main() function.
"""
self.log.info('Testing GDB interactivity')
process.run(self.return99_binary_path, ignore_status=True)
def test_interactive_args(self):
"""
Tests avocado's GDB plugin features with an executable and args
If GDB command line options are given, `--gdb-run-bin=return99` for
this particular test, the test will stop at binary main() function.
This test uses `process.run()` without an `ignore_status` parameter
"""
self.log.info('Testing GDB interactivity with arguments')
result = process.run("%s 0" % self.return99_binary_path)
self.assertEqual(result.exit_status, 0)
def test_exit_status(self):
"""
Tests avocado's GDB plugin features
If GDB command line options are given, `--gdb-run-bin=return99` for
this particular test, the test will stop at binary main() function.
"""
self.log.info('Testing process exit statuses')
for arg, exp in [(-1, 255), (8, 8)]:
self.log.info('Expecting exit status "%s"', exp)
cmd = "%s %s" % (self.return99_binary_path, arg)
result = process.run(cmd, ignore_status=True)
self.assertEqual(result.exit_status, exp)
def test_server_stderr(self):
self.log.info('Testing server stderr collection')
s = gdb.GDBServer()
@ -354,7 +316,7 @@ class GdbTest(Test):
self.assertTrue(os.path.exists(s.stderr_path))
stderr_lines = genio.read_all_lines(s.stderr_path)
listening_line = "Listening on port %s" % s.port
listening_line = f"Listening on port {s.port}"
self.assertIn(listening_line, stderr_lines)
def test_server_stdout(self):
@ -372,28 +334,14 @@ class GdbTest(Test):
stdout_lines = genio.read_all_lines(s.stdout_path)
self.assertIn("return 99", stdout_lines)
def test_interactive_stdout(self):
"""
Tests avocado's GDB plugin features
If GDB command line options are given, `--gdb-run-bin=return99` for
this particular test, the test will stop at binary main() function.
"""
self.log.info('Testing GDB interactivity')
result = process.run(self.return99_binary_path, ignore_status=True)
self.assertIn("return 99\n", result.stdout)
def test_remote(self):
@staticmethod
def test_remote():
"""
Tests GDBRemote interaction with a GDBServer
"""
s = gdb.GDBServer()
r = gdb.GDBRemote('127.0.0.1', s.port)
r.connect()
r.cmd("qSupported")
r.cmd("qfThreadInfo")
r.cmd(b"qSupported")
r.cmd(b"qfThreadInfo")
s.exit()
if __name__ == '__main__':
main()