From ca704ced8ab9fa9320e5c60f80ddb6b5ec645486 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 23 Jul 2021 05:08:18 +0000 Subject: [PATCH 01/29] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- python-avocado.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-avocado.spec b/python-avocado.spec index b05f121..0b34acd 100644 --- a/python-avocado.spec +++ b/python-avocado.spec @@ -35,7 +35,7 @@ Name: python-avocado Version: 82.0 -Release: 2%{?gitrel}%{?dist} +Release: 3%{?gitrel}%{?dist} Summary: Framework with tools and libraries for Automated Testing # Found licenses: # avocado/core/tapparser.py: MIT @@ -469,6 +469,9 @@ Again Shell code (and possibly other similar shells). %changelog +* Fri Jul 23 2021 Fedora Release Engineering - 82.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + * Thu Mar 18 2021 Merlin Mathesius - 82.0-2 - Drop obsolete packages from BuildRequires - Generate man page directly using 'rst2man' rather than requiring 'make' From 45e0653cdc655718818c75f35fa01b019a72a291 Mon Sep 17 00:00:00 2001 From: Merlin Mathesius Date: Wed, 28 Jul 2021 11:47:37 -0500 Subject: [PATCH 02/29] Loosen jinja2 version requirement to fix FTBFS in Rawhide Signed-off-by: Merlin Mathesius --- python-avocado.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/python-avocado.spec b/python-avocado.spec index 0b34acd..7a39a78 100644 --- a/python-avocado.spec +++ b/python-avocado.spec @@ -35,7 +35,7 @@ Name: python-avocado Version: 82.0 -Release: 3%{?gitrel}%{?dist} +Release: 4%{?gitrel}%{?dist} Summary: Framework with tools and libraries for Automated Testing # Found licenses: # avocado/core/tapparser.py: MIT @@ -88,6 +88,8 @@ sed -e "s/'PyYAML>=4.2b2'/'PyYAML>=3.12'/" -i optional_plugins/varianter_yaml_to %endif # drop unnecessary install requirement sed -e "s/'markupsafe<2.0.0', //" -i optional_plugins/html/setup.py +# loosen jinja2 version requirement +sed -e "s/'jinja2<3.0.0'/'jinja2'/" -i optional_plugins/html/setup.py %build %py3_build @@ -469,6 +471,9 @@ Again Shell code (and possibly other similar shells). %changelog +* Wed Jul 28 2021 Merlin Mathesius - 82.0-4 +- Loosen jinja2 version requirement to fix FTBFS in Rawhide + * Fri Jul 23 2021 Fedora Release Engineering - 82.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild From d6e052f5df5933530162dffaa19a7153695f66f2 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 21 Jan 2022 10:30:48 +0000 Subject: [PATCH 03/29] - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- python-avocado.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-avocado.spec b/python-avocado.spec index 7a39a78..55357a5 100644 --- a/python-avocado.spec +++ b/python-avocado.spec @@ -35,7 +35,7 @@ Name: python-avocado Version: 82.0 -Release: 4%{?gitrel}%{?dist} +Release: 5%{?gitrel}%{?dist} Summary: Framework with tools and libraries for Automated Testing # Found licenses: # avocado/core/tapparser.py: MIT @@ -471,6 +471,9 @@ Again Shell code (and possibly other similar shells). %changelog +* Fri Jan 21 2022 Fedora Release Engineering - 82.0-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Wed Jul 28 2021 Merlin Mathesius - 82.0-4 - Loosen jinja2 version requirement to fix FTBFS in Rawhide From a2cb6ab1616eb9750c858822184f8e674468ca9b Mon Sep 17 00:00:00 2001 From: Python Maint Date: Tue, 21 Jun 2022 10:14:20 +0200 Subject: [PATCH 04/29] Rebuilt for Python 3.11 --- python-avocado.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-avocado.spec b/python-avocado.spec index 55357a5..7579f2f 100644 --- a/python-avocado.spec +++ b/python-avocado.spec @@ -35,7 +35,7 @@ Name: python-avocado Version: 82.0 -Release: 5%{?gitrel}%{?dist} +Release: 6%{?gitrel}%{?dist} Summary: Framework with tools and libraries for Automated Testing # Found licenses: # avocado/core/tapparser.py: MIT @@ -471,6 +471,9 @@ Again Shell code (and possibly other similar shells). %changelog +* Tue Jun 21 2022 Python Maint - 82.0-6 +- Rebuilt for Python 3.11 + * Fri Jan 21 2022 Fedora Release Engineering - 82.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild From 85196ff998ddc2355b6a7726c4a8b1181950d638 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 22 Jul 2022 16:32:26 +0000 Subject: [PATCH 05/29] Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- python-avocado.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-avocado.spec b/python-avocado.spec index 7579f2f..980b609 100644 --- a/python-avocado.spec +++ b/python-avocado.spec @@ -35,7 +35,7 @@ Name: python-avocado Version: 82.0 -Release: 6%{?gitrel}%{?dist} +Release: 7%{?gitrel}%{?dist} Summary: Framework with tools and libraries for Automated Testing # Found licenses: # avocado/core/tapparser.py: MIT @@ -471,6 +471,9 @@ Again Shell code (and possibly other similar shells). %changelog +* Fri Jul 22 2022 Fedora Release Engineering - 82.0-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + * Tue Jun 21 2022 Python Maint - 82.0-6 - Rebuilt for Python 3.11 From 04eafa9d9e9aa06ce4ffff6eeeb0fb9dca46965d Mon Sep 17 00:00:00 2001 From: Cleber Rosa Date: Wed, 10 Aug 2022 09:00:25 -0400 Subject: [PATCH 06/29] Sync gdbtest.py with latest upstream Signed-off-by: Cleber Rosa --- tests/gdbtest.py | 122 ++++++++++++++--------------------------------- tests/tests.yml | 10 ++-- 2 files changed, 38 insertions(+), 94 deletions(-) diff --git a/tests/gdbtest.py b/tests/gdbtest.py index d814fa5..c0cdc55 100755 --- a/tests/gdbtest.py +++ b/tests/gdbtest.py @@ -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() diff --git a/tests/tests.yml b/tests/tests.yml index be4a031..7ff61ce 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -3,8 +3,8 @@ - role: standard-test-avocado tests: - gdbtest.py:GdbTest.test_start_exit - - gdbtest.py:GdbTest.test_existing_commands - gdbtest.py:GdbTest.test_existing_commands_raw + - gdbtest.py:GdbTest.test_existing_commands - gdbtest.py:GdbTest.test_load_set_breakpoint_run_exit_raw - gdbtest.py:GdbTest.test_load_set_breakpoint_run_exit - gdbtest.py:GdbTest.test_generate_core @@ -15,13 +15,9 @@ - gdbtest.py:GdbTest.test_stream_messages - gdbtest.py:GdbTest.test_connect_multiple_clients - gdbtest.py:GdbTest.test_server_exit - - gdbtest.py:GdbTest.test_server_stdout - - gdbtest.py:GdbTest.test_server_stderr - gdbtest.py:GdbTest.test_multiple_servers - - gdbtest.py:GdbTest.test_interactive - - gdbtest.py:GdbTest.test_interactive_args - - gdbtest.py:GdbTest.test_exit_status - - gdbtest.py:GdbTest.test_interactive_stdout + - gdbtest.py:GdbTest.test_server_stderr + - gdbtest.py:GdbTest.test_server_stdout - gdbtest.py:GdbTest.test_remote required_packages: - gcc From af6d992792404cebe869df80f51df85c18836725 Mon Sep 17 00:00:00 2001 From: Cleber Rosa Date: Wed, 10 Aug 2022 09:00:25 -0400 Subject: [PATCH 07/29] 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 --- .gitignore | 1 + python-avocado.spec | 83 +++++++++++++++++---------------------------- sources | 2 +- 3 files changed, 34 insertions(+), 52 deletions(-) diff --git a/.gitignore b/.gitignore index bf17c05..e0e0a9a 100644 --- a/.gitignore +++ b/.gitignore @@ -28,3 +28,4 @@ /avocado-79.0.tar.gz /avocado-80.0.tar.gz /avocado-82.0.tar.gz +/avocado-92.0.tar.gz diff --git a/python-avocado.spec b/python-avocado.spec index 980b609..3a493d7 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 e97540793998c4f24a16000465dd7fdd213bf2b9 + %global commit 08ac79fa4ecaee60d7d5211d9634568b5545bdcd %endif %if ! 0%{?commit_date:1} - %global commit_date 20200911 + %global commit_date 20211019 %endif %global shortcommit %(c=%{commit};echo ${c:0:9}) %global gitrel .%{commit_date}git%{shortcommit} @@ -34,8 +34,8 @@ %endif Name: python-avocado -Version: 82.0 -Release: 7%{?gitrel}%{?dist} +Version: 92.0 +Release: 1%{?gitrel}%{?dist} Summary: Framework with tools and libraries for Automated Testing # Found licenses: # avocado/core/tapparser.py: MIT @@ -104,9 +104,6 @@ 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 @@ -119,9 +116,6 @@ popd pushd optional_plugins/result_upload %py3_build popd -pushd optional_plugins/glib - %py3_build -popd rst2man man/avocado.rst man/avocado.1 %install @@ -130,11 +124,14 @@ 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-requirement-asset \ + avocado-runner-requirement-package \ + avocado-runner-sysinfo \ avocado-software-manager do mv %{buildroot}%{_bindir}/$exe %{buildroot}%{_bindir}/$exe-%{python3_version} @@ -160,9 +157,6 @@ 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 @@ -175,9 +169,6 @@ popd pushd optional_plugins/result_upload %py3_install popd -pushd optional_plugins/glib - %py3_install -popd # cleanup plugin test cruft rm -rf %{buildroot}%{python3_sitelib}/tests mkdir -p %{buildroot}%{_sysconfdir}/avocado @@ -203,7 +194,6 @@ 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 find %{buildroot}%{_docdir}/avocado -type f -name '*.py' -exec chmod -c -x {} ';' @@ -218,7 +208,9 @@ 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 --job-api --nrunner-interface \ + --unit --jobs --functional --optional-plugins \ + --disable-plugin-checks robot %endif @@ -250,9 +242,9 @@ these days a framework) to perform automated testing. %{_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 @@ -265,6 +257,15 @@ 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-requirement-asset-%{python3_version} +%{_bindir}/avocado-runner-requirement-asset-3 +%{_bindir}/avocado-runner-requirement-asset +%{_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 @@ -341,20 +342,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+ @@ -368,6 +355,7 @@ 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 %package -n python3-avocado-plugins-varianter-pict @@ -413,20 +401,6 @@ a dedicated sever. %{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 -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. - -%files -n python3-avocado-plugins-glib -%{python3_sitelib}/avocado_glib/ -%{python3_sitelib}/avocado_framework_plugin_glib-%{version}-py%{python3_version}.egg-info - - %package -n python-avocado-examples Summary: Avocado Test Framework Example Tests License: GPLv2+ @@ -448,7 +422,6 @@ examples of how to write tests on your own. %{_docdir}/avocado/varianter_pict %{_docdir}/avocado/wrappers %{_docdir}/avocado/yaml_to_mux -%{_docdir}/avocado/yaml_to_mux_loader %package -n python-avocado-bash @@ -471,6 +444,14 @@ Again Shell code (and possibly other similar shells). %changelog +* Tue Aug 9 2022 Cleber Rosa - 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 - 82.0-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild diff --git a/sources b/sources index 4721c3f..4e0c9f3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (avocado-82.0.tar.gz) = 099ab131b2b941602550e71507e4ca517d5d2cd5152b255edace0473c9de93aac8163a61689414b5b58f9211f58981c3c30c1c3ca8a191283f609722ce07f173 +SHA512 (avocado-92.0.tar.gz) = 87d424098b26d12cbe14ffc509616c2114c7b549801582593568f94ca181373f0398290cb9569645c40d514f1ae29f77bfad94f6efb2025b1f9b8c5f2a5b7822 From 92e1215793321a5361da5cdd12f6a6eee06c5c8d Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 20 Jan 2023 11:24:35 +0000 Subject: [PATCH 08/29] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- python-avocado.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-avocado.spec b/python-avocado.spec index 3a493d7..c7832c6 100644 --- a/python-avocado.spec +++ b/python-avocado.spec @@ -35,7 +35,7 @@ Name: python-avocado Version: 92.0 -Release: 1%{?gitrel}%{?dist} +Release: 2%{?gitrel}%{?dist} Summary: Framework with tools and libraries for Automated Testing # Found licenses: # avocado/core/tapparser.py: MIT @@ -444,6 +444,9 @@ Again Shell code (and possibly other similar shells). %changelog +* Fri Jan 20 2023 Fedora Release Engineering - 92.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Tue Aug 9 2022 Cleber Rosa - 92.0-1 - Use selftests/check.py job instead of more limited selftests/run - Included avocado-runner-sysinfo, avocado-runner-requirement-package, From 1a301b62685523f8e23eaf142fd6656d4cc81ebc Mon Sep 17 00:00:00 2001 From: Python Maint Date: Wed, 14 Jun 2023 20:21:36 +0200 Subject: [PATCH 09/29] Rebuilt for Python 3.12 --- python-avocado.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-avocado.spec b/python-avocado.spec index c7832c6..243e291 100644 --- a/python-avocado.spec +++ b/python-avocado.spec @@ -35,7 +35,7 @@ Name: python-avocado Version: 92.0 -Release: 2%{?gitrel}%{?dist} +Release: 3%{?gitrel}%{?dist} Summary: Framework with tools and libraries for Automated Testing # Found licenses: # avocado/core/tapparser.py: MIT @@ -444,6 +444,9 @@ Again Shell code (and possibly other similar shells). %changelog +* Wed Jun 14 2023 Python Maint - 92.0-3 +- Rebuilt for Python 3.12 + * Fri Jan 20 2023 Fedora Release Engineering - 92.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild From a4811c461cd607bcafd96c707b9205a26f5fce70 Mon Sep 17 00:00:00 2001 From: Cleber Rosa Date: Mon, 17 Jul 2023 13:44:25 -0400 Subject: [PATCH 10/29] 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 --- .gitignore | 2 ++ python-avocado.spec | 10 ++++++++-- sources | 3 ++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index e0e0a9a..b5a1b5d 100644 --- a/.gitignore +++ b/.gitignore @@ -29,3 +29,5 @@ /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 diff --git a/python-avocado.spec b/python-avocado.spec index 243e291..32a25f1 100644 --- a/python-avocado.spec +++ b/python-avocado.spec @@ -34,8 +34,8 @@ %endif Name: python-avocado -Version: 92.0 -Release: 3%{?gitrel}%{?dist} +Version: 92.1 +Release: 1%{?gitrel}%{?dist} Summary: Framework with tools and libraries for Automated Testing # Found licenses: # avocado/core/tapparser.py: MIT @@ -49,6 +49,7 @@ License: GPLv2+ and GPLv2 and MIT URL: https://avocado-framework.github.io/ Source0: https://github.com/avocado-framework/avocado/archive/%{gitref}/%{gittar} BuildArch: noarch +Patch0: avocado-92.1-python312.patch BuildRequires: kmod BuildRequires: procps-ng @@ -83,6 +84,7 @@ these days a framework) to perform automated testing. %prep %setup -q -n avocado-%{gitref} +%patch 0 -p 1 %if 0%{?rhel} sed -e "s/'PyYAML>=4.2b2'/'PyYAML>=3.12'/" -i optional_plugins/varianter_yaml_to_mux/setup.py %endif @@ -444,6 +446,10 @@ Again Shell code (and possibly other similar shells). %changelog +* Mon Jul 17 2023 Cleber Rosa - 92.1-1 +- Updated to 92.1 +- Support building and running under Python 3.12 for F39 + * Wed Jun 14 2023 Python Maint - 92.0-3 - Rebuilt for Python 3.12 diff --git a/sources b/sources index 4e0c9f3..aae30a3 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ -SHA512 (avocado-92.0.tar.gz) = 87d424098b26d12cbe14ffc509616c2114c7b549801582593568f94ca181373f0398290cb9569645c40d514f1ae29f77bfad94f6efb2025b1f9b8c5f2a5b7822 +SHA512 (avocado-92.1.tar.gz) = b775ebd014f4c91aae2b13e1aa350940ce7e277eb63ebf7c325f6dd020c10eb21390942080468804ceadd923f52970cb2f2ca214c7855df435d442e99a499ceb +SHA512 (avocado-92.1-python312.patch) = fc94e23c84653b317ba3d9a6a52d99d2e136c2fa50621b5ce36b2b10bbcb8cceac36d12dd715820ebe5ae266768bf3384fcb15b6f4614d4a4dd60415c1821901 From d9406a60f25e6f84e9de151625b2b9b62187bef2 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 21 Jul 2023 07:31:24 +0000 Subject: [PATCH 11/29] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- python-avocado.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-avocado.spec b/python-avocado.spec index 32a25f1..f3354aa 100644 --- a/python-avocado.spec +++ b/python-avocado.spec @@ -35,7 +35,7 @@ Name: python-avocado Version: 92.1 -Release: 1%{?gitrel}%{?dist} +Release: 2%{?gitrel}%{?dist} Summary: Framework with tools and libraries for Automated Testing # Found licenses: # avocado/core/tapparser.py: MIT @@ -446,6 +446,9 @@ Again Shell code (and possibly other similar shells). %changelog +* Fri Jul 21 2023 Fedora Release Engineering - 92.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + * Mon Jul 17 2023 Cleber Rosa - 92.1-1 - Updated to 92.1 - Support building and running under Python 3.12 for F39 From 5bb1ce77be60739aaf8625fcf52391484d9b7ca4 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sun, 21 Jan 2024 23:29:41 +0000 Subject: [PATCH 12/29] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- python-avocado.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-avocado.spec b/python-avocado.spec index f3354aa..b6d724c 100644 --- a/python-avocado.spec +++ b/python-avocado.spec @@ -35,7 +35,7 @@ Name: python-avocado Version: 92.1 -Release: 2%{?gitrel}%{?dist} +Release: 3%{?gitrel}%{?dist} Summary: Framework with tools and libraries for Automated Testing # Found licenses: # avocado/core/tapparser.py: MIT @@ -446,6 +446,9 @@ Again Shell code (and possibly other similar shells). %changelog +* Sun Jan 21 2024 Fedora Release Engineering - 92.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Fri Jul 21 2023 Fedora Release Engineering - 92.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild From 9e4eb9164338ce75838345f5cf81019dd6b5390f Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 26 Jan 2024 01:30:07 +0000 Subject: [PATCH 13/29] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- python-avocado.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-avocado.spec b/python-avocado.spec index b6d724c..1342efc 100644 --- a/python-avocado.spec +++ b/python-avocado.spec @@ -35,7 +35,7 @@ Name: python-avocado Version: 92.1 -Release: 3%{?gitrel}%{?dist} +Release: 4%{?gitrel}%{?dist} Summary: Framework with tools and libraries for Automated Testing # Found licenses: # avocado/core/tapparser.py: MIT @@ -446,6 +446,9 @@ Again Shell code (and possibly other similar shells). %changelog +* Fri Jan 26 2024 Fedora Release Engineering - 92.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Sun Jan 21 2024 Fedora Release Engineering - 92.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From 81494bf6112afec8f71a7d1d9cd7e1d495260483 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Mon, 29 Jan 2024 11:09:26 +0000 Subject: [PATCH 14/29] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- python-avocado.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-avocado.spec b/python-avocado.spec index 1342efc..96b18ee 100644 --- a/python-avocado.spec +++ b/python-avocado.spec @@ -35,7 +35,7 @@ Name: python-avocado Version: 92.1 -Release: 4%{?gitrel}%{?dist} +Release: 5%{?gitrel}%{?dist} Summary: Framework with tools and libraries for Automated Testing # Found licenses: # avocado/core/tapparser.py: MIT @@ -446,6 +446,9 @@ Again Shell code (and possibly other similar shells). %changelog +* Mon Jan 29 2024 Fedora Release Engineering - 92.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Fri Jan 26 2024 Fedora Release Engineering - 92.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From 3c3eeac4322573bcae72212cb2e774808541c5f4 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 7 Jun 2024 18:57:17 +0200 Subject: [PATCH 15/29] Rebuilt for Python 3.13 --- python-avocado.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-avocado.spec b/python-avocado.spec index 96b18ee..1b0bc20 100644 --- a/python-avocado.spec +++ b/python-avocado.spec @@ -35,7 +35,7 @@ Name: python-avocado Version: 92.1 -Release: 5%{?gitrel}%{?dist} +Release: 6%{?gitrel}%{?dist} Summary: Framework with tools and libraries for Automated Testing # Found licenses: # avocado/core/tapparser.py: MIT @@ -446,6 +446,9 @@ Again Shell code (and possibly other similar shells). %changelog +* Fri Jun 07 2024 Python Maint - 92.1-6 +- Rebuilt for Python 3.13 + * Mon Jan 29 2024 Fedora Release Engineering - 92.1-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From 42c94b1fece3c83e4ae427d0ee4c53e97839e8e4 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 19 Jul 2024 09:39:48 +0000 Subject: [PATCH 16/29] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- python-avocado.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-avocado.spec b/python-avocado.spec index 1b0bc20..0e8b43b 100644 --- a/python-avocado.spec +++ b/python-avocado.spec @@ -35,7 +35,7 @@ Name: python-avocado Version: 92.1 -Release: 6%{?gitrel}%{?dist} +Release: 7%{?gitrel}%{?dist} Summary: Framework with tools and libraries for Automated Testing # Found licenses: # avocado/core/tapparser.py: MIT @@ -446,6 +446,9 @@ Again Shell code (and possibly other similar shells). %changelog +* Fri Jul 19 2024 Fedora Release Engineering - 92.1-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Fri Jun 07 2024 Python Maint - 92.1-6 - Rebuilt for Python 3.13 From 5e41ae22a867fcdf2875629e1c35fe3d438ca25f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Such=C3=BD?= Date: Fri, 26 Jul 2024 02:15:51 +0200 Subject: [PATCH 17/29] convert GPLv2+ license to SPDX This is part of https://fedoraproject.org/wiki/Changes/SPDX_Licenses_Phase_4 --- python-avocado.spec | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/python-avocado.spec b/python-avocado.spec index 0e8b43b..f7835cd 100644 --- a/python-avocado.spec +++ b/python-avocado.spec @@ -35,7 +35,7 @@ Name: python-avocado Version: 92.1 -Release: 7%{?gitrel}%{?dist} +Release: 8%{?gitrel}%{?dist} Summary: Framework with tools and libraries for Automated Testing # Found licenses: # avocado/core/tapparser.py: MIT @@ -275,7 +275,8 @@ these days a framework) to perform automated testing. %package -n python-avocado-common Summary: Avocado common files -License: GPLv2+ +# Automatically converted from old format: GPLv2+ - review is highly recommended. +License: GPL-2.0-or-later %description -n python-avocado-common Common files (such as configuration) for the Avocado Testing Framework. @@ -316,7 +317,8 @@ arbitrary filesystem location. %if %{with_resultsdb} %package -n python3-avocado-plugins-resultsdb Summary: Avocado plugin to propagate job results to ResultsDB -License: GPLv2+ +# Automatically converted from old format: GPLv2+ - review is highly recommended. +License: GPL-2.0-or-later Requires: python3-avocado == %{version}-%{release} %description -n python3-avocado-plugins-resultsdb @@ -332,7 +334,8 @@ server. %package -n python3-avocado-plugins-varianter-yaml-to-mux Summary: Avocado plugin to generate variants out of yaml files -License: GPLv2+ +# Automatically converted from old format: GPLv2+ - review is highly recommended. +License: GPL-2.0-or-later Requires: python3-avocado == %{version}-%{release} %description -n python3-avocado-plugins-varianter-yaml-to-mux @@ -346,7 +349,8 @@ defined in a yaml file(s). %package -n python3-avocado-plugins-golang Summary: Avocado plugin for execution of golang tests -License: GPLv2+ +# Automatically converted from old format: GPLv2+ - review is highly recommended. +License: GPL-2.0-or-later Requires: python3-avocado == %{version}-%{release} Requires: golang @@ -362,7 +366,8 @@ also run them. %package -n python3-avocado-plugins-varianter-pict Summary: Varianter with combinatorial capabilities by PICT -License: GPLv2+ +# Automatically converted from old format: GPLv2+ - review is highly recommended. +License: GPL-2.0-or-later Requires: python3-avocado == %{version}-%{release} %description -n python3-avocado-plugins-varianter-pict @@ -376,7 +381,8 @@ Pair-Wise algorithms, also known as Combinatorial Independent Testing. %package -n python3-avocado-plugins-varianter-cit Summary: Varianter with Combinatorial Independent Testing capabilities -License: GPLv2+ +# Automatically converted from old format: GPLv2+ - review is highly recommended. +License: GPL-2.0-or-later Requires: python3-avocado == %{version}-%{release} %description -n python3-avocado-plugins-varianter-cit @@ -391,7 +397,8 @@ collaboration with CVUT Prague. %package -n python3-avocado-plugins-result-upload Summary: Avocado plugin propagate job results to a remote host -License: GPLv2+ +# Automatically converted from old format: GPLv2+ - review is highly recommended. +License: GPL-2.0-or-later Requires: python3-avocado == %{version}-%{release} %description -n python3-avocado-plugins-result-upload @@ -405,7 +412,8 @@ a dedicated sever. %package -n python-avocado-examples Summary: Avocado Test Framework Example Tests -License: GPLv2+ +# Automatically converted from old format: GPLv2+ - review is highly recommended. +License: GPL-2.0-or-later # documentation does not require main package, but needs to be in lock-step if present Conflicts: python3-avocado < %{version}-%{release}, python3-avocado > %{version}-%{release} @@ -446,6 +454,9 @@ Again Shell code (and possibly other similar shells). %changelog +* Fri Jul 26 2024 Miroslav Suchý - 92.1-8 +- convert license to SPDX + * Fri Jul 19 2024 Fedora Release Engineering - 92.1-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From 6e6d0dac8901425fee83143780b0de70cc965ea0 Mon Sep 17 00:00:00 2001 From: Cleber Rosa Date: Mon, 19 Aug 2024 10:08:22 -0400 Subject: [PATCH 18/29] 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 --- .gitignore | 1 + python-avocado.spec | 15 +++++++++------ sources | 3 +-- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index b5a1b5d..bd8b053 100644 --- a/.gitignore +++ b/.gitignore @@ -31,3 +31,4 @@ /avocado-92.0.tar.gz /avocado-92.1.tar.gz /avocado-92.1-python312.patch +/avocado-92.3.tar.gz diff --git a/python-avocado.spec b/python-avocado.spec index f7835cd..0c6d6f7 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 08ac79fa4ecaee60d7d5211d9634568b5545bdcd + %global commit 5b21f030001d6eed69c0357cc45b6128c73dc860 %endif %if ! 0%{?commit_date:1} - %global commit_date 20211019 + %global commit_date 20240819 %endif %global shortcommit %(c=%{commit};echo ${c:0:9}) %global gitrel .%{commit_date}git%{shortcommit} @@ -34,8 +34,8 @@ %endif Name: python-avocado -Version: 92.1 -Release: 8%{?gitrel}%{?dist} +Version: 92.3 +Release: 1%{?gitrel}%{?dist} Summary: Framework with tools and libraries for Automated Testing # Found licenses: # avocado/core/tapparser.py: MIT @@ -49,7 +49,6 @@ License: GPLv2+ and GPLv2 and MIT URL: https://avocado-framework.github.io/ Source0: https://github.com/avocado-framework/avocado/archive/%{gitref}/%{gittar} BuildArch: noarch -Patch0: avocado-92.1-python312.patch BuildRequires: kmod BuildRequires: procps-ng @@ -84,7 +83,6 @@ these days a framework) to perform automated testing. %prep %setup -q -n avocado-%{gitref} -%patch 0 -p 1 %if 0%{?rhel} sed -e "s/'PyYAML>=4.2b2'/'PyYAML>=3.12'/" -i optional_plugins/varianter_yaml_to_mux/setup.py %endif @@ -454,6 +452,11 @@ Again Shell code (and possibly other similar shells). %changelog +* Mon Aug 19 2024 Cleber Rosa - 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ý - 92.1-8 - convert license to SPDX diff --git a/sources b/sources index aae30a3..4a738a2 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -SHA512 (avocado-92.1.tar.gz) = b775ebd014f4c91aae2b13e1aa350940ce7e277eb63ebf7c325f6dd020c10eb21390942080468804ceadd923f52970cb2f2ca214c7855df435d442e99a499ceb -SHA512 (avocado-92.1-python312.patch) = fc94e23c84653b317ba3d9a6a52d99d2e136c2fa50621b5ce36b2b10bbcb8cceac36d12dd715820ebe5ae266768bf3384fcb15b6f4614d4a4dd60415c1821901 +SHA512 (avocado-92.3.tar.gz) = 97a0c113bc826537a02ebf6efcd7cf49b505a93e5fd9686c3a4c7e70902f2d367f78eb2fb23ddf9253b97f45e27b2e328fd6bd1c420ecbeb59e25e991b29c262 From fbd8b0d95c0cf3e59b443a8e31850d1ed21626df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Such=C3=BD?= Date: Mon, 7 Oct 2024 10:28:42 +0000 Subject: [PATCH 19/29] 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. --- python-avocado.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-avocado.spec b/python-avocado.spec index 0c6d6f7..b7a4d55 100644 --- a/python-avocado.spec +++ b/python-avocado.spec @@ -45,7 +45,7 @@ Summary: Framework with tools and libraries for Automated Testing # optional_plugins/html/avocado_result_html/templates/bootstrap.min.js: MIT # selftests/.data/jenkins-junit.xsd: MIT # Other files: GPLv2 and GPLv2+ -License: GPLv2+ and GPLv2 and MIT +License: GPL-2.0-or-later AND GPL-2.0-only AND MIT URL: https://avocado-framework.github.io/ Source0: https://github.com/avocado-framework/avocado/archive/%{gitref}/%{gittar} BuildArch: noarch From a50932740bcd04cfe9fc9958201989c8971a7b17 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 18 Jan 2025 12:05:43 +0000 Subject: [PATCH 20/29] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- python-avocado.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-avocado.spec b/python-avocado.spec index b7a4d55..77eb88c 100644 --- a/python-avocado.spec +++ b/python-avocado.spec @@ -35,7 +35,7 @@ Name: python-avocado Version: 92.3 -Release: 1%{?gitrel}%{?dist} +Release: 2%{?gitrel}%{?dist} Summary: Framework with tools and libraries for Automated Testing # Found licenses: # avocado/core/tapparser.py: MIT @@ -452,6 +452,9 @@ Again Shell code (and possibly other similar shells). %changelog +* Sat Jan 18 2025 Fedora Release Engineering - 92.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Mon Aug 19 2024 Cleber Rosa - 92.3-1 - Updated to 92.3 - Support building and running under Python 3.13 for F42 From c84a1c5f931a3f6f54d7e95f145dbbf6b6b24676 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Such=C3=BD?= Date: Thu, 16 Jan 2025 08:53:14 +0100 Subject: [PATCH 21/29] migrate license to SPDX This is part of https://fedoraproject.org/wiki/Changes/SPDX_Licenses_Phase_4 Signed-off-by: Cleber Rosa --- python-avocado.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/python-avocado.spec b/python-avocado.spec index 77eb88c..d3ee34a 100644 --- a/python-avocado.spec +++ b/python-avocado.spec @@ -35,7 +35,7 @@ Name: python-avocado Version: 92.3 -Release: 2%{?gitrel}%{?dist} +Release: 3%{?gitrel}%{?dist} Summary: Framework with tools and libraries for Automated Testing # Found licenses: # avocado/core/tapparser.py: MIT @@ -299,7 +299,7 @@ Common files (such as configuration) for the Avocado Testing Framework. %package -n python3-avocado-plugins-output-html Summary: Avocado HTML report plugin -License: GPLv2+ and MIT +License: GPL-2.0-or-later AND MIT Requires: python3-avocado == %{version}-%{release} %description -n python3-avocado-plugins-output-html @@ -434,7 +434,7 @@ examples of how to write tests on your own. %package -n python-avocado-bash Summary: Avocado Test Framework Bash Utilities -License: GPLv2+ and GPLv2 +License: GPL-2.0-or-later AND GPL-2.0-only Requires: python-avocado-common == %{version}-%{release} %description -n python-avocado-bash @@ -452,6 +452,9 @@ Again Shell code (and possibly other similar shells). %changelog +* Mon Jan 20 2025 Cleber Rosa - 92.3-3 +- convert remaining licenses to SPDX + * Sat Jan 18 2025 Fedora Release Engineering - 92.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild From d84ef63709c47c3a5d91a688cb2cd10c7e12ba26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Fri, 3 Jan 2025 15:47:29 +0100 Subject: [PATCH 22/29] Loosen the PyYAML version requirement in python3-avocado-plugins-varianter-yaml-to-mux Upstream has pinned this for Debian reasons: https://github.com/avocado-framework/avocado/commit/f130c763be3eb33dda196e57efe16705523242e9 Signed-off-by: Cleber Rosa --- python-avocado.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/python-avocado.spec b/python-avocado.spec index d3ee34a..12c3f7b 100644 --- a/python-avocado.spec +++ b/python-avocado.spec @@ -35,7 +35,7 @@ Name: python-avocado Version: 92.3 -Release: 3%{?gitrel}%{?dist} +Release: 4%{?gitrel}%{?dist} Summary: Framework with tools and libraries for Automated Testing # Found licenses: # avocado/core/tapparser.py: MIT @@ -90,6 +90,8 @@ sed -e "s/'PyYAML>=4.2b2'/'PyYAML>=3.12'/" -i optional_plugins/varianter_yaml_to sed -e "s/'markupsafe<2.0.0', //" -i optional_plugins/html/setup.py # loosen jinja2 version requirement sed -e "s/'jinja2<3.0.0'/'jinja2'/" -i optional_plugins/html/setup.py +# loosen pyyaml version requirement +sed -e "s/'PyYAML>=4.2b2,<6.0.2'/'PyYAML>=4.2b2'/" -i optional_plugins/varianter_yaml_to_mux/setup.py %build %py3_build @@ -452,6 +454,9 @@ Again Shell code (and possibly other similar shells). %changelog +* Mon Jan 20 2025 Miro Hrončok - 92.3-4 +- Loosen the PyYAML version requirement in python3-avocado-plugins-varianter-yaml-to-mux + * Mon Jan 20 2025 Cleber Rosa - 92.3-3 - convert remaining licenses to SPDX From 54d20e2b89c3faa5283306c568dc8905ef1b1b6a Mon Sep 17 00:00:00 2001 From: Python Maint Date: Tue, 3 Jun 2025 15:32:47 +0200 Subject: [PATCH 23/29] Rebuilt for Python 3.14 --- python-avocado.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-avocado.spec b/python-avocado.spec index 12c3f7b..f6f1142 100644 --- a/python-avocado.spec +++ b/python-avocado.spec @@ -35,7 +35,7 @@ Name: python-avocado Version: 92.3 -Release: 4%{?gitrel}%{?dist} +Release: 5%{?gitrel}%{?dist} Summary: Framework with tools and libraries for Automated Testing # Found licenses: # avocado/core/tapparser.py: MIT @@ -454,6 +454,9 @@ Again Shell code (and possibly other similar shells). %changelog +* Tue Jun 03 2025 Python Maint - 92.3-5 +- Rebuilt for Python 3.14 + * Mon Jan 20 2025 Miro Hrončok - 92.3-4 - Loosen the PyYAML version requirement in python3-avocado-plugins-varianter-yaml-to-mux From 71b50479dd5ce4edc7a504b0c14d902a4dc26f87 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 25 Jul 2025 06:46:47 +0000 Subject: [PATCH 24/29] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- python-avocado.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python-avocado.spec b/python-avocado.spec index f6f1142..4c1803a 100644 --- a/python-avocado.spec +++ b/python-avocado.spec @@ -35,7 +35,7 @@ Name: python-avocado Version: 92.3 -Release: 5%{?gitrel}%{?dist} +Release: 6%{?gitrel}%{?dist} Summary: Framework with tools and libraries for Automated Testing # Found licenses: # avocado/core/tapparser.py: MIT @@ -454,6 +454,9 @@ Again Shell code (and possibly other similar shells). %changelog +* Fri Jul 25 2025 Fedora Release Engineering - 92.3-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Tue Jun 03 2025 Python Maint - 92.3-5 - Rebuilt for Python 3.14 From a12e378e73f22824d667a46028563c98bc0cc50b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Tue, 19 Aug 2025 11:56:28 +0200 Subject: [PATCH 25/29] Retired: Fails to install: https://pagure.io/releng/issue/12871 --- .gitignore | 34 -- dead.package | 1 + python-avocado.spec | 699 ------------------------------- sources | 1 - tests/gdbtest.py | 347 --------------- tests/gdbtest.py.data/return99.c | 47 --- tests/gdbtest.py.data/segfault.c | 9 - tests/tests.yml | 25 -- 8 files changed, 1 insertion(+), 1162 deletions(-) delete mode 100644 .gitignore create mode 100644 dead.package delete mode 100644 python-avocado.spec delete mode 100644 sources delete mode 100755 tests/gdbtest.py delete mode 100644 tests/gdbtest.py.data/return99.c delete mode 100644 tests/gdbtest.py.data/segfault.c delete mode 100644 tests/tests.yml diff --git a/.gitignore b/.gitignore deleted file mode 100644 index bd8b053..0000000 --- a/.gitignore +++ /dev/null @@ -1,34 +0,0 @@ -/avocado-43.0.tar.gz -/avocado-46.0.tar.gz -/avocado-47.0.tar.gz -/avocado-48.0.tar.gz -/avocado-49.0.tar.gz -/avocado-50.0.tar.gz -/avocado-51.0.tar.gz -/avocado-52.0.tar.gz -/avocado-52.1.tar.gz -/avocado-61.0.tar.gz -/avocado-62.0.tar.gz -/avocado-63.0.tar.gz -/avocado-64.0.tar.gz -/avocado-65.0.tar.gz -/avocado-66.0.tar.gz -/avocado-67.0.tar.gz -/avocado-68.0.tar.gz -/avocado-69.0.tar.gz -/avocado-70.0.tar.gz -/avocado-71.0.tar.gz -/avocado-72.0.tar.gz -/avocado-73.0.tar.gz -/avocado-74.0.tar.gz -/avocado-75.1.tar.gz -/avocado-76.0.tar.gz -/avocado-77.0.tar.gz -/avocado-78.0.tar.gz -/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 diff --git a/dead.package b/dead.package new file mode 100644 index 0000000..37f0d8e --- /dev/null +++ b/dead.package @@ -0,0 +1 @@ +Retired: Fails to install: https://pagure.io/releng/issue/12871 diff --git a/python-avocado.spec b/python-avocado.spec deleted file mode 100644 index 4c1803a..0000000 --- a/python-avocado.spec +++ /dev/null @@ -1,699 +0,0 @@ -# Conditional for release vs. snapshot builds. Set to 1 for release build. -%if ! 0%{?rel_build:1} - %global rel_build 1 -%endif - -# Settings used for build from snapshots. -%if 0%{?rel_build} - %global gitref %{version} - %global gittar avocado-%{version}.tar.gz -%else - %if ! 0%{?commit:1} - %global commit 5b21f030001d6eed69c0357cc45b6128c73dc860 - %endif - %if ! 0%{?commit_date:1} - %global commit_date 20240819 - %endif - %global shortcommit %(c=%{commit};echo ${c:0:9}) - %global gitrel .%{commit_date}git%{shortcommit} - %global gitref %{commit} - %global gittar avocado-%{shortcommit}.tar.gz -%endif - -# Selftests are provided but may need to be skipped because many of -# 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 - -# resultsdb is not available for RHEL -%if ! 0%{?rhel} -%global with_resultsdb 1 -%else -%global with_resultsdb 0 -%endif - -Name: python-avocado -Version: 92.3 -Release: 6%{?gitrel}%{?dist} -Summary: Framework with tools and libraries for Automated Testing -# Found licenses: -# avocado/core/tapparser.py: MIT -# avocado/utils/external/gdbmi_parser.py: MIT -# avocado/utils/external/spark.py: MIT -# optional_plugins/html/avocado_result_html/templates/bootstrap.min.css: MIT -# optional_plugins/html/avocado_result_html/templates/bootstrap.min.js: MIT -# selftests/.data/jenkins-junit.xsd: MIT -# Other files: GPLv2 and GPLv2+ -License: GPL-2.0-or-later AND GPL-2.0-only AND MIT -URL: https://avocado-framework.github.io/ -Source0: https://github.com/avocado-framework/avocado/archive/%{gitref}/%{gittar} -BuildArch: noarch - -BuildRequires: kmod -BuildRequires: procps-ng -BuildRequires: python3-devel -BuildRequires: python3-docutils -BuildRequires: python3-jinja2 -BuildRequires: python3-lxml -BuildRequires: python3-psutil -BuildRequires: python3-setuptools -%if %{with_resultsdb} -BuildRequires: python3-resultsdb_api -BuildRequires: python3-pycdlib -%endif - -%if 0%{?with_tests} -BuildRequires: genisoimage -BuildRequires: libcdio -BuildRequires: psmisc -%if ! 0%{?rhel} -BuildRequires: perl-Test-Harness -%endif -BuildRequires: glibc-all-langpacks -BuildRequires: python3-netifaces -BuildRequires: python3-yaml -%endif -# with_tests - -%description -Avocado is a set of tools and libraries (what people call -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 -%endif -# drop unnecessary install requirement -sed -e "s/'markupsafe<2.0.0', //" -i optional_plugins/html/setup.py -# loosen jinja2 version requirement -sed -e "s/'jinja2<3.0.0'/'jinja2'/" -i optional_plugins/html/setup.py -# loosen pyyaml version requirement -sed -e "s/'PyYAML>=4.2b2,<6.0.2'/'PyYAML>=4.2b2'/" -i optional_plugins/varianter_yaml_to_mux/setup.py - -%build -%py3_build -pushd optional_plugins/html - %py3_build -popd -%if %{with_resultsdb} -pushd optional_plugins/resultsdb - %py3_build -popd -%endif -pushd optional_plugins/varianter_yaml_to_mux - %py3_build -popd -pushd optional_plugins/golang - %py3_build -popd -pushd optional_plugins/varianter_pict - %py3_build -popd -pushd optional_plugins/varianter_cit - %py3_build -popd -pushd optional_plugins/result_upload - %py3_build -popd -rst2man man/avocado.rst man/avocado.1 - -%install -%py3_install -for exe in \ - avocado \ - avocado-runner \ - avocado-runner-noop \ - avocado-runner-dry-run \ - 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-software-manager -do - mv %{buildroot}%{_bindir}/$exe %{buildroot}%{_bindir}/$exe-%{python3_version} - ln -s $exe-%{python3_version} %{buildroot}%{_bindir}/$exe-3 - ln -s $exe-%{python3_version} %{buildroot}%{_bindir}/$exe -done -# configuration is held at /etc/avocado only and part of the -# python-avocado-common package -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 -%if %{with_resultsdb} -pushd optional_plugins/resultsdb - %py3_install -popd -%endif -pushd optional_plugins/varianter_yaml_to_mux - %py3_install -popd -pushd optional_plugins/golang - %py3_install -popd -pushd optional_plugins/varianter_pict - %py3_install -popd -pushd optional_plugins/varianter_cit - %py3_install -popd -pushd optional_plugins/result_upload - %py3_install -popd -# cleanup plugin test cruft -rm -rf %{buildroot}%{python3_sitelib}/tests -mkdir -p %{buildroot}%{_sysconfdir}/avocado -cp -r avocado/etc/avocado/scripts %{buildroot}%{_sysconfdir}/avocado/scripts -cp -r avocado/etc/avocado/sysinfo %{buildroot}%{_sysconfdir}/avocado/sysinfo -mkdir -p %{buildroot}%{_libexecdir}/avocado -cp avocado/libexec/avocado-bash-utils %{buildroot}%{_libexecdir}/avocado/avocado-bash-utils -cp avocado/libexec/avocado_debug %{buildroot}%{_libexecdir}/avocado/avocado_debug -cp avocado/libexec/avocado_error %{buildroot}%{_libexecdir}/avocado/avocado_error -cp avocado/libexec/avocado_info %{buildroot}%{_libexecdir}/avocado/avocado_info -cp avocado/libexec/avocado_warn %{buildroot}%{_libexecdir}/avocado/avocado_warn -mkdir -p %{buildroot}%{_mandir}/man1 -install -m 0644 man/avocado.1 %{buildroot}%{_mandir}/man1/avocado.1 -mkdir -p %{buildroot}%{_pkgdocdir} -install -m 0644 README.rst %{buildroot}%{_pkgdocdir} -install -d -m 0755 %{buildroot}%{_sharedstatedir}/avocado/data -# place examples in documentation directory -install -d -m 0755 %{buildroot}%{_docdir}/avocado -cp -r examples/gdb-prerun-scripts %{buildroot}%{_docdir}/avocado/gdb-prerun-scripts -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 -find %{buildroot}%{_docdir}/avocado -type f -name '*.py' -exec chmod -c -x {} ';' - - -%if 0%{?with_tests} -%check - # 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 - PATH=%{buildroot}%{_bindir}:%{buildroot}%{_libexecdir}/avocado:$PATH \ - PYTHONPATH=%{buildroot}%{python3_sitelib}:. \ - LANG=en_US.UTF-8 \ - AVOCADO_CHECK_LEVEL=0 \ - %{python3} selftests/check.py --job-api --nrunner-interface \ - --unit --jobs --functional --optional-plugins \ - --disable-plugin-checks robot -%endif - - -%package -n python3-avocado -Summary: %{summary} -Requires: python-avocado-common == %{version}-%{release} -Requires: gdb -Requires: gdb-gdbserver -Requires: procps-ng -%if ! 0%{?rhel} -Requires: python3-pycdlib -%endif - -%description -n python3-avocado -Avocado is a set of tools and libraries (what people call -these days a framework) to perform automated testing. - -%files -n python3-avocado -%license LICENSE -%{_pkgdocdir}/README.rst -%{python3_sitelib}/avocado/ -%{python3_sitelib}/avocado_framework-%{version}-py%{python3_version}.egg-info -%{_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-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 -%{_bindir}/avocado-runner-python-unittest-%{python3_version} -%{_bindir}/avocado-runner-python-unittest-3 -%{_bindir}/avocado-runner-python-unittest -%{_bindir}/avocado-runner-avocado-instrumented-%{python3_version} -%{_bindir}/avocado-runner-avocado-instrumented-3 -%{_bindir}/avocado-runner-avocado-instrumented -%{_bindir}/avocado-runner-tap-%{python3_version} -%{_bindir}/avocado-runner-tap-3 -%{_bindir}/avocado-runner-tap -%{_bindir}/avocado-runner-requirement-asset-%{python3_version} -%{_bindir}/avocado-runner-requirement-asset-3 -%{_bindir}/avocado-runner-requirement-asset -%{_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 - - -%package -n python-avocado-common -Summary: Avocado common files -# Automatically converted from old format: GPLv2+ - review is highly recommended. -License: GPL-2.0-or-later - -%description -n python-avocado-common -Common files (such as configuration) for the Avocado Testing Framework. - -%files -n python-avocado-common -%license LICENSE -%{_mandir}/man1/avocado.1.gz -%dir %{_docdir}/avocado -%dir %{_sharedstatedir}/avocado -%dir %{_sysconfdir}/avocado -%dir %{_sysconfdir}/avocado/sysinfo -%dir %{_sysconfdir}/avocado/scripts -%dir %{_sysconfdir}/avocado/scripts/job -%dir %{_sysconfdir}/avocado/scripts/job/pre.d -%dir %{_sysconfdir}/avocado/scripts/job/post.d -%config(noreplace) %{_sysconfdir}/avocado/sysinfo/commands -%config(noreplace) %{_sysconfdir}/avocado/sysinfo/files -%config(noreplace) %{_sysconfdir}/avocado/sysinfo/profilers -%{_sysconfdir}/avocado/scripts/job/pre.d/README -%{_sysconfdir}/avocado/scripts/job/post.d/README - - -%package -n python3-avocado-plugins-output-html -Summary: Avocado HTML report plugin -License: GPL-2.0-or-later AND MIT -Requires: python3-avocado == %{version}-%{release} - -%description -n python3-avocado-plugins-output-html -Adds to avocado the ability to generate an HTML report at every job results -directory. It also gives the user the ability to write a report on an -arbitrary filesystem location. - -%files -n python3-avocado-plugins-output-html -%{python3_sitelib}/avocado_result_html/ -%{python3_sitelib}/avocado_framework_plugin_result_html-%{version}-py%{python3_version}.egg-info - - -%if %{with_resultsdb} -%package -n python3-avocado-plugins-resultsdb -Summary: Avocado plugin to propagate job results to ResultsDB -# Automatically converted from old format: GPLv2+ - review is highly recommended. -License: GPL-2.0-or-later -Requires: python3-avocado == %{version}-%{release} - -%description -n python3-avocado-plugins-resultsdb -Allows Avocado to send job results directly to a ResultsDB -server. - -%files -n python3-avocado-plugins-resultsdb -%{python3_sitelib}/avocado_resultsdb/ -%{python3_sitelib}/avocado_framework_plugin_resultsdb-%{version}-py%{python3_version}.egg-info -%endif -# with_resultsdb - - -%package -n python3-avocado-plugins-varianter-yaml-to-mux -Summary: Avocado plugin to generate variants out of yaml files -# Automatically converted from old format: GPLv2+ - review is highly recommended. -License: GPL-2.0-or-later -Requires: python3-avocado == %{version}-%{release} - -%description -n python3-avocado-plugins-varianter-yaml-to-mux -Can be used to produce multiple test variants with test parameters -defined in a yaml file(s). - -%files -n python3-avocado-plugins-varianter-yaml-to-mux -%{python3_sitelib}/avocado_varianter_yaml_to_mux/ -%{python3_sitelib}/avocado_framework_plugin_varianter_yaml_to_mux-%{version}-py%{python3_version}.egg-info - - -%package -n python3-avocado-plugins-golang -Summary: Avocado plugin for execution of golang tests -# Automatically converted from old format: GPLv2+ - review is highly recommended. -License: GPL-2.0-or-later -Requires: python3-avocado == %{version}-%{release} -Requires: golang - -%description -n python3-avocado-plugins-golang -Allows Avocado to list golang tests, and if golang is installed, -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 - - -%package -n python3-avocado-plugins-varianter-pict -Summary: Varianter with combinatorial capabilities by PICT -# Automatically converted from old format: GPLv2+ - review is highly recommended. -License: GPL-2.0-or-later -Requires: python3-avocado == %{version}-%{release} - -%description -n python3-avocado-plugins-varianter-pict -This plugin uses a third-party tool to provide variants created by -Pair-Wise algorithms, also known as Combinatorial Independent Testing. - -%files -n python3-avocado-plugins-varianter-pict -%{python3_sitelib}/avocado_varianter_pict/ -%{python3_sitelib}/avocado_framework_plugin_varianter_pict-%{version}-py%{python3_version}.egg-info - - -%package -n python3-avocado-plugins-varianter-cit -Summary: Varianter with Combinatorial Independent Testing capabilities -# Automatically converted from old format: GPLv2+ - review is highly recommended. -License: GPL-2.0-or-later -Requires: python3-avocado == %{version}-%{release} - -%description -n python3-avocado-plugins-varianter-cit -A varianter plugin that generates variants using Combinatorial -Independent Testing (AKA Pair-Wise) algorithm developed in -collaboration with CVUT Prague. - -%files -n python3-avocado-plugins-varianter-cit -%{python3_sitelib}/avocado_varianter_cit/ -%{python3_sitelib}/avocado_framework_plugin_varianter_cit-%{version}-py%{python3_version}.egg-info - - -%package -n python3-avocado-plugins-result-upload -Summary: Avocado plugin propagate job results to a remote host -# Automatically converted from old format: GPLv2+ - review is highly recommended. -License: GPL-2.0-or-later -Requires: python3-avocado == %{version}-%{release} - -%description -n python3-avocado-plugins-result-upload -This optional plugin is intended to upload the Avocado Job results to -a dedicated sever. - -%files -n python3-avocado-plugins-result-upload -%{python3_sitelib}/avocado_result_upload/ -%{python3_sitelib}/avocado_framework_plugin_result_upload-%{version}-py%{python3_version}.egg-info - - -%package -n python-avocado-examples -Summary: Avocado Test Framework Example Tests -# Automatically converted from old format: GPLv2+ - review is highly recommended. -License: GPL-2.0-or-later -# documentation does not require main package, but needs to be in lock-step if present -Conflicts: python3-avocado < %{version}-%{release}, python3-avocado > %{version}-%{release} - -%description -n python-avocado-examples -The set of example tests present in the upstream tree of the Avocado framework. -Some of them are used as functional tests of the framework, others serve as -examples of how to write tests on your own. - -%files -n python-avocado-examples -%license LICENSE -%dir %{_docdir}/avocado -%{_docdir}/avocado/gdb-prerun-scripts -%{_docdir}/avocado/plugins -%{_docdir}/avocado/tests -%{_docdir}/avocado/varianter_cit -%{_docdir}/avocado/varianter_pict -%{_docdir}/avocado/wrappers -%{_docdir}/avocado/yaml_to_mux - - -%package -n python-avocado-bash -Summary: Avocado Test Framework Bash Utilities -License: GPL-2.0-or-later AND GPL-2.0-only -Requires: python-avocado-common == %{version}-%{release} - -%description -n python-avocado-bash -A small set of utilities to interact with Avocado from the Bourne -Again Shell code (and possibly other similar shells). - -%files -n python-avocado-bash -%license LICENSE -%dir %{_libexecdir}/avocado -%{_libexecdir}/avocado/avocado-bash-utils -%{_libexecdir}/avocado/avocado_debug -%{_libexecdir}/avocado/avocado_error -%{_libexecdir}/avocado/avocado_info -%{_libexecdir}/avocado/avocado_warn - - -%changelog -* Fri Jul 25 2025 Fedora Release Engineering - 92.3-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild - -* Tue Jun 03 2025 Python Maint - 92.3-5 -- Rebuilt for Python 3.14 - -* Mon Jan 20 2025 Miro Hrončok - 92.3-4 -- Loosen the PyYAML version requirement in python3-avocado-plugins-varianter-yaml-to-mux - -* Mon Jan 20 2025 Cleber Rosa - 92.3-3 -- convert remaining licenses to SPDX - -* Sat Jan 18 2025 Fedora Release Engineering - 92.3-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild - -* Mon Aug 19 2024 Cleber Rosa - 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ý - 92.1-8 -- convert license to SPDX - -* Fri Jul 19 2024 Fedora Release Engineering - 92.1-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild - -* Fri Jun 07 2024 Python Maint - 92.1-6 -- Rebuilt for Python 3.13 - -* Mon Jan 29 2024 Fedora Release Engineering - 92.1-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Fri Jan 26 2024 Fedora Release Engineering - 92.1-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Sun Jan 21 2024 Fedora Release Engineering - 92.1-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Fri Jul 21 2023 Fedora Release Engineering - 92.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - -* Mon Jul 17 2023 Cleber Rosa - 92.1-1 -- Updated to 92.1 -- Support building and running under Python 3.12 for F39 - -* Wed Jun 14 2023 Python Maint - 92.0-3 -- Rebuilt for Python 3.12 - -* Fri Jan 20 2023 Fedora Release Engineering - 92.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - -* Tue Aug 9 2022 Cleber Rosa - 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 - 82.0-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - -* Tue Jun 21 2022 Python Maint - 82.0-6 -- Rebuilt for Python 3.11 - -* Fri Jan 21 2022 Fedora Release Engineering - 82.0-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - -* Wed Jul 28 2021 Merlin Mathesius - 82.0-4 -- Loosen jinja2 version requirement to fix FTBFS in Rawhide - -* Fri Jul 23 2021 Fedora Release Engineering - 82.0-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - -* Thu Mar 18 2021 Merlin Mathesius - 82.0-2 -- Drop obsolete packages from BuildRequires -- Generate man page directly using 'rst2man' rather than requiring 'make' -- Adjust PATH to make sure self-tests find internal modules -- Spec file cleanup following package review. - -* Mon Sep 14 2020 Cleber Rosa - 82.0-1 -- Sync with upstream release 82.0. -- Removed python libvirt depedency as the vm runner has been removed - upstream -- Dropped configuration files to sync with upstream which made them - optional and doesn't ship them anymore -- Add on extra character to short commit to sync with upstream - -* Sat Jun 6 2020 Cleber Rosa - 80.0-1 -- Sync with upstream release 80.0. -- Dropped use of custom avocado command for tests -- Do not build deprecated runners - -* Tue May 12 2020 Cleber Rosa - 79.0-1 -- Sync with upstream release 79.0. -- Added Python's user base bin dir to the PATH environment variable - while running tests, so that avocado-runner-* scripts can be found -- Moved comment to new lines closing the conditionals, to avoid - errors from rpmlint and rpmbuild - -* Wed Apr 15 2020 Merlin Mathesius - 78.0-1 -- Sync with upstream release 78.0. - -* Tue Mar 17 2020 Merlin Mathesius - 77.0-1 -- Sync with upstream release 77.0. - -* Mon Mar 09 2020 Merlin Mathesius - 76.0-1 -- Sync with upstream release 76.0. - -* Mon Jan 20 2020 Merlin Mathesius - 75.1-1 -- Sync with upstream release 75.1. - -* Mon Dec 23 2019 Merlin Mathesius - 74.0-1 -- Sync with upstream release 74.0. - -* Wed Nov 27 2019 Merlin Mathesius - 73.0-1 -- Sync with upstream release 73.0. -- Adjustments to build for RHEL 8. - -* Wed Oct 02 2019 Merlin Mathesius - 72.0-1 -- Sync with upstream release 72.0. - -* Wed Aug 28 2019 Merlin Mathesius - 71.0-1 -- Sync with upstream release 71.0. - -* Wed Jun 26 2019 Merlin Mathesius - 70.0-1 -- Sync with upstream release 70.0. -- Drop all Python 2 support from SPEC file. - -* Wed May 22 2019 Merlin Mathesius - 69.0-4 -- pyliblzma is Python 2-only and no longer available as of F31. -- Unversioned executables should now be Python 3. - -* Mon May 20 2019 Merlin Mathesius - 69.0-3 -- Drop Python 2 support from F31 and RHEL8 onward. -- Disable components dependent upon Fiber in Fedora 31 and later, - since avocado is currently incompatible with the new Fiber API. - -* Tue Mar 19 2019 Merlin Mathesius - 69.0-2 -- python2-sphinx is no longer available or needed as of F31 - -* Wed Feb 27 2019 Merlin Mathesius - 69.0-1 -- Sync with upstream release 69.0. - -* Fri Feb 22 2019 Merlin Mathesius - 68.0-1 -- Sync with upstream release 68.0. - -* Thu Jan 31 2019 Merlin Mathesius - 67.0-1 -- Sync with upstream release 67.0. -- genisoimage, libcdio, and psmisc added as build deps so iso9660 tests run. -- Replace pystache requirement with jinja2. -- glibc-all-langpacks added as build dep for F30+ so vmimage tests run. -- python2-resultsdb_api package has been removed in F30 so - python2-avocado-plugins-resultsdb was also disabled. - -* Wed Nov 21 2018 Merlin Mathesius - 66.0-1 -- Sync with upstream release 66.0. -- python2-pycdlib package has been removed in F30 as part of - https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal - -* Thu Oct 04 2018 Merlin Mathesius - 65.0-1 -- Sync with upstream release 65.0. - -* Tue Aug 28 2018 Merlin Mathesius - 64.0-1 -- Sync with upstream release 64.0. - -* Thu Jul 26 2018 Merlin Mathesius - 63.0-2 -- Added missing python[2]-enum34 requirement. - -* Mon Jul 23 2018 Merlin Mathesius - 63.0-1 -- Sync with upstream release 63.0. (BZ#1602175) - Include upstream patches needed to build for Rawhide. - -* Wed Jun 13 2018 Merlin Mathesius - 62.0-1 -- Sync with upstream release 62.0. (BZ#1590572) -- Correct libvirt dependency for EPEL7/RHEL7 - -* Thu May 17 2018 Merlin Mathesius - 61.0-1 -- Sync with upstream release 61.0. -- Packaging updates for Python 3. -- Reorganize SPEC file. - -* Mon Apr 9 2018 Cleber Rosa - 52.1-2 -- Added Fedora CI tests - -* Tue Apr 03 2018 Merlin Mathesius - 52.1-1 -- Sync with upstream release 52.1 (LTS series). -- Correct deprecated use of unversioned python. - -* Mon Mar 26 2018 Iryna Shcherbina - 52.0-5 -- Update Python 2 dependency declarations to new packaging standards - (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3) - -* Fri Feb 09 2018 Fedora Release Engineering - 52.0-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Wed Aug 09 2017 Merlin Mathesius - 52.0-3 -- Fix FTBFS error by disabling selfcheck producing false failures -- Update SPEC to use pkgname instead of srcname macro where appropriate - -* Thu Jul 27 2017 Fedora Release Engineering - 52.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - -* Thu Jun 29 2017 Merlin Mathesius - 52.0-1 -- Sync with upstream release 52.0. (BZ#1465409) - -* Wed Jun 14 2017 Merlin Mathesius - 51.0-1 -- Sync with upstream release 51.0. (BZ#1460837) -- 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. - -* Tue Apr 25 2017 Merlin Mathesius - 49.0-1 -- Sync with upstream release 49.0. (BZ#1431413) - -* Tue Apr 18 2017 Merlin Mathesius - 48.0-1 -- Sync with upstream release 48.0. (BZ#1431413) -- Allow rel_build macro to be defined outside of the SPEC file. - -* Mon Mar 27 2017 Merlin Mathesius - 47.0-1 -- Sync with upstream release 47.0. -- Enable self-tests during build. -- Add example test to be run by Taskotron. - -* Mon Feb 27 2017 Merlin Mathesius - 46.0-2 -- Incorporate upstream SPEC file changes to split plugins into subpackages. -- Remove obsolete CC-BY-SA license, which went away with the halflings font. - -* Tue Feb 14 2017 Merlin Mathesius - 46.0-1 -- Sync with upstream release 46.0. -- Remove halflings license since font was removed from upstream. -- SPEC updates to easily switch between release and snapshot builds. - -* Sat Feb 11 2017 Fedora Release Engineering - 43.0-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Tue Jan 10 2017 Merlin Mathesius - 43.0-7 -- SPEC updates to build and install for EPEL. - -* Mon Nov 21 2016 Merlin Mathesius - 43.0-6 -- Initial packaging for Fedora. diff --git a/sources b/sources deleted file mode 100644 index 4a738a2..0000000 --- a/sources +++ /dev/null @@ -1 +0,0 @@ -SHA512 (avocado-92.3.tar.gz) = 97a0c113bc826537a02ebf6efcd7cf49b505a93e5fd9686c3a4c7e70902f2d367f78eb2fb23ddf9253b97f45e27b2e328fd6bd1c420ecbeb59e25e991b29c262 diff --git a/tests/gdbtest.py b/tests/gdbtest.py deleted file mode 100755 index c0cdc55..0000000 --- a/tests/gdbtest.py +++ /dev/null @@ -1,347 +0,0 @@ -import os - -from avocado import Test -from avocado.utils import gdb, genio, process - - -class GdbTest(Test): - - """ - Execute the gdb test - - :avocado: tags=requires_c_compiler - """ - - VALID_CMDS = ["-list-target-features", - "-break-info", - "-break-list", - "-thread-info", - "-stack-info-frame", - "-stack-info-depth"] - - INVALID_CMDS = ["-foobar", - "-magic8ball", - "-find-me-the-bug", - "-auto-debug-it"] - - def setUp(self): - 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): # pylint: disable=W0621 - """ - Checks if a process is still alive - - :param process: a :class:`subprocess.POpen` instance - :type process: :class:`subprocess.POpen` - :returns: True or False - :rtype: bool - """ - return process.poll() is None - - def test_start_exit(self): - """ - Tests execution of multiple GDB instances without any blocking or race - """ - self.log.info("Testing execution of multiple GDB instances") - process_count = 10 - gdb_instances = [] - for i in range(0, process_count): - gdb_instances.append(gdb.GDB()) - - for i in range(0, process_count): - self.assertEqual(gdb_instances[i].exit(), 0) - - def test_existing_commands_raw(self): - """ - Tests the GDB response to commands that exist and to those that do not - """ - g = gdb.GDB() - self.log.info("Testing existing (valid) GDB commands using raw commands") - for cmd in self.VALID_CMDS: - 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 = f"-info-gdb-mi-command {cmd[1:]}" - r = g.cmd(info_cmd) - self.assertEqual(r.result.result.command.exists, 'false') - - def test_existing_commands(self): - g = gdb.GDB() - - self.log.info("Testing existing (valid) GDB commands using utility " - "methods") - for cmd in self.VALID_CMDS: - self.assertTrue(g.cmd_exists(cmd)) - g.cmd(cmd) - - self.log.info("Testing non-existing (invalid) GDB commands using " - "utility methods") - for cmd in self.INVALID_CMDS: - self.assertFalse(g.cmd_exists(cmd)) - - def test_load_set_breakpoint_run_exit_raw(self): - """ - Test a common GDB cycle using raw commands: load, set break, run, exit - """ - self.log.info("Testing that GDB loads a file and sets a breakpoint") - g = gdb.GDB() - - file_cmd = f"-file-exec-and-symbols {self.return99_binary_path}" - r = g.cmd(file_cmd) - self.assertEqual(r.result.class_, 'done') - - break_cmd = "-break-insert 5" - r = g.cmd(break_cmd) - self.assertEqual(r.result.class_, 'done') - self.assertEqual(r.result.result.bkpt.number, '1') - self.assertEqual(r.result.result.bkpt.enabled, 'y') - - break_del_cmd = "-break-delete 1" - r = g.cmd(break_del_cmd) - self.assertEqual(r.result.class_, 'done') - - run_cmd = "-exec-run" - r = g.cmd(run_cmd) - self.assertEqual(r.result.class_, 'running') - - g.cmd("-gdb-exit") - self.assertEqual(g.process.wait(), 0) - - def test_load_set_breakpoint_run_exit(self): - """ - Test a common GDB cycle: load, set break, delete break, run, exit - """ - self.log.info("Testing a common GDB cycle") - g = gdb.GDB() - g.set_file(self.return99_binary_path) - g.set_break("5") - g.del_break(1) - g.run() - g.exit() - - def test_generate_core(self): - """ - Load a file that will cause a segfault and produce a core dump - """ - self.log.info("Testing that a core dump will be generated") - - g = gdb.GDB() - file_cmd = f"-file-exec-and-symbols {self.segfault_binary_path}" - r = g.cmd(file_cmd) - self.assertEqual(r.result.class_, 'done') - - run_cmd = "-exec-run" - r = g.cmd(run_cmd) - self.assertEqual(r.result.class_, 'running') - - other_messages = g.read_until_break() - core_path = None - for msg in other_messages: - 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 = 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') - - self.assertTrue(os.path.exists(core_path)) - g.exit() - - def test_set_multiple_break(self): - """ - Tests that multiple breakpoints do not interfere with each other - """ - self.log.info("Testing setting multiple breakpoints") - g = gdb.GDB() - g.set_file(self.return99_binary_path) - g.set_break('empty') - g.set_break('7') - g.exit() - - def test_disconnect_raw(self): - """ - Connect/disconnect repeatedly from a remote debugger using raw commands - """ - self.log.info("Testing connecting and disconnecting repeatedly using " - "raw commands") - s = gdb.GDBServer() - g = gdb.GDB() - - # Do 100 cycle of target (kind of connects) and disconnects - for _ in range(0, 100): - 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 = f'-target-select extended-remote :{s.port}' - r = g.cmd(cmd) - self.assertEqual(r.result.class_, 'connected') - r = g.cli_cmd('monitor exit') - self.assertEqual(r.result.class_, 'done') - - g.exit() - s.exit() - - def test_disconnect(self): - """ - Connect/disconnect repeatedly from a remote debugger using utilities - """ - self.log.info("Testing connecting and disconnecting repeatedly") - s = gdb.GDBServer() - g = gdb.GDB() - - for _ in range(0, 100): - r = g.connect(s.port) - self.assertEqual(r.result.class_, 'connected') - r = g.disconnect() - self.assertEqual(r.result.class_, 'done') - - g.exit() - s.exit() - - def test_remote_exec(self): - """ - Tests execution on a remote target - """ - self.log.info("Testing execution on a remote target") - hit_breakpoint = False - - s = gdb.GDBServer() - g = gdb.GDB() - - cmd = f'-file-exec-and-symbols {self.return99_binary_path}' - r = g.cmd(cmd) - self.assertEqual(r.result.class_, 'done') - - cmd = f'set remote exec-file {self.return99_binary_path}' - r = g.cmd(cmd) - self.assertEqual(r.result.class_, 'done') - - cmd = f"-break-insert {'main'}" - r = g.cmd(cmd) - self.assertEqual(r.result.class_, 'done') - - r = g.cmd('-exec-run') - - other_messages = g.read_until_break() - for msg in other_messages: - parsed_msg = gdb.parse_mi(msg.decode()) - if (hasattr(parsed_msg, 'class_') and - parsed_msg.class_ == 'stopped' and - parsed_msg.result.reason == 'breakpoint-hit'): - hit_breakpoint = True - - self.assertTrue(hit_breakpoint) - g.exit() - s.exit() - - def test_stream_messages(self): - """ - Tests if the expected response appears in the result stream messages - """ - self.log.info("Testing that messages appears in the result stream") - g = gdb.GDB() - r = g.cmd("-gdb-version") - self.assertIn("GNU GPL version", r.get_stream_messages_text()) - - def test_connect_multiple_clients(self): - """ - Tests two or more connections to the same server raise an exception - """ - self.log.info("Testing that multiple clients cannot connect at once") - s = gdb.GDBServer() - c1 = gdb.GDB() - c1.connect(s.port) - c2 = gdb.GDB() - with self.assertRaises(gdb.UnexpectedResponseError): - c2.connect(s.port) - s.exit() - - def test_server_exit(self): - """ - Tests that the server is shutdown by using a monitor exit command - """ - self.log.info("Testing that a single server exits cleanly") - s = gdb.GDBServer() - s.exit() - self.assertFalse(self.is_process_alive(s.process)) - - def test_multiple_servers(self): - """ - Tests multiple server instances without any blocking or race condition - """ - self.log.info("Testing execution of multiple GDB server instances") - process_count = 10 - server_instances = [] - for i in range(0, process_count): - s = gdb.GDBServer() - c = gdb.GDB() - c.connect(s.port) - c.cmd('show-version') - c.disconnect() - server_instances.append(s) - - for i in range(0, process_count): - self.assertTrue(self.is_process_alive(server_instances[i].process)) - server_instances[i].exit() - self.assertFalse(self.is_process_alive(server_instances[i].process)) - - def test_server_stderr(self): - self.log.info('Testing server stderr collection') - s = gdb.GDBServer() - s.exit() - self.assertTrue(os.path.exists(s.stderr_path)) - - stderr_lines = genio.read_all_lines(s.stderr_path) - listening_line = f"Listening on port {s.port}" - self.assertIn(listening_line, stderr_lines) - - def test_server_stdout(self): - self.log.info('Testing server stdout/stderr collection') - s = gdb.GDBServer() - c = gdb.GDB() - c.connect(s.port) - c.set_file(self.return99_binary_path) - c.run() - s.exit() - - self.assertTrue(os.path.exists(s.stdout_path)) - self.assertTrue(os.path.exists(s.stderr_path)) - - stdout_lines = genio.read_all_lines(s.stdout_path) - self.assertIn("return 99", stdout_lines) - - @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(b"qSupported") - r.cmd(b"qfThreadInfo") - s.exit() diff --git a/tests/gdbtest.py.data/return99.c b/tests/gdbtest.py.data/return99.c deleted file mode 100644 index bf14935..0000000 --- a/tests/gdbtest.py.data/return99.c +++ /dev/null @@ -1,47 +0,0 @@ -#include -#include - -void empty() -{ -} - -void write_stdout() -{ - fprintf(stdout, "testing output to stdout\n"); -} - -void write_stderr() -{ - fprintf(stderr, "testing output to stderr\n"); -} - -int forkme() -{ - int pid; - - pid = fork(); - if (pid != 0) - pid = fork(); - if (pid != 0) - pid = fork(); - - return pid; -} - -int main(int argc, char *argv[]) -{ - int exit_status = 99; - - if (argc > 1) - exit_status = atoi(argv[1]); - - empty(); - write_stdout(); - write_stderr(); - - if (forkme()) { - fprintf(stdout, "return %i\n", exit_status); - } - - return exit_status; -} diff --git a/tests/gdbtest.py.data/segfault.c b/tests/gdbtest.py.data/segfault.c deleted file mode 100644 index a685f86..0000000 --- a/tests/gdbtest.py.data/segfault.c +++ /dev/null @@ -1,9 +0,0 @@ -#include - -int main() -{ - int *p = NULL; - *p = 0xdead; - - return 0; -} diff --git a/tests/tests.yml b/tests/tests.yml deleted file mode 100644 index 7ff61ce..0000000 --- a/tests/tests.yml +++ /dev/null @@ -1,25 +0,0 @@ -- hosts: localhost - roles: - - role: standard-test-avocado - tests: - - gdbtest.py:GdbTest.test_start_exit - - gdbtest.py:GdbTest.test_existing_commands_raw - - gdbtest.py:GdbTest.test_existing_commands - - gdbtest.py:GdbTest.test_load_set_breakpoint_run_exit_raw - - gdbtest.py:GdbTest.test_load_set_breakpoint_run_exit - - gdbtest.py:GdbTest.test_generate_core - - gdbtest.py:GdbTest.test_set_multiple_break - - gdbtest.py:GdbTest.test_disconnect_raw - - gdbtest.py:GdbTest.test_disconnect - - gdbtest.py:GdbTest.test_remote_exec - - gdbtest.py:GdbTest.test_stream_messages - - gdbtest.py:GdbTest.test_connect_multiple_clients - - gdbtest.py:GdbTest.test_server_exit - - gdbtest.py:GdbTest.test_multiple_servers - - gdbtest.py:GdbTest.test_server_stderr - - gdbtest.py:GdbTest.test_server_stdout - - gdbtest.py:GdbTest.test_remote - required_packages: - - gcc - - gdb - - gdb-gdbserver From 947ceab00c742a35169285d6466f46f7c2b2b4c2 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 28 Aug 2025 06:18:04 +0000 Subject: [PATCH 26/29] Unretirement request: pagure.io/releng/issue/12907 Revert "Retired: Fails to install: https://pagure.io/releng/issue/12871" This reverts commit a12e378e73f22824d667a46028563c98bc0cc50b. Signed-off-by: Fedora Release Engineering --- .gitignore | 34 ++ dead.package | 1 - python-avocado.spec | 699 +++++++++++++++++++++++++++++++ sources | 1 + tests/gdbtest.py | 347 +++++++++++++++ tests/gdbtest.py.data/return99.c | 47 +++ tests/gdbtest.py.data/segfault.c | 9 + tests/tests.yml | 25 ++ 8 files changed, 1162 insertions(+), 1 deletion(-) create mode 100644 .gitignore delete mode 100644 dead.package create mode 100644 python-avocado.spec create mode 100644 sources create mode 100755 tests/gdbtest.py create mode 100644 tests/gdbtest.py.data/return99.c create mode 100644 tests/gdbtest.py.data/segfault.c create mode 100644 tests/tests.yml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..bd8b053 --- /dev/null +++ b/.gitignore @@ -0,0 +1,34 @@ +/avocado-43.0.tar.gz +/avocado-46.0.tar.gz +/avocado-47.0.tar.gz +/avocado-48.0.tar.gz +/avocado-49.0.tar.gz +/avocado-50.0.tar.gz +/avocado-51.0.tar.gz +/avocado-52.0.tar.gz +/avocado-52.1.tar.gz +/avocado-61.0.tar.gz +/avocado-62.0.tar.gz +/avocado-63.0.tar.gz +/avocado-64.0.tar.gz +/avocado-65.0.tar.gz +/avocado-66.0.tar.gz +/avocado-67.0.tar.gz +/avocado-68.0.tar.gz +/avocado-69.0.tar.gz +/avocado-70.0.tar.gz +/avocado-71.0.tar.gz +/avocado-72.0.tar.gz +/avocado-73.0.tar.gz +/avocado-74.0.tar.gz +/avocado-75.1.tar.gz +/avocado-76.0.tar.gz +/avocado-77.0.tar.gz +/avocado-78.0.tar.gz +/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 diff --git a/dead.package b/dead.package deleted file mode 100644 index 37f0d8e..0000000 --- a/dead.package +++ /dev/null @@ -1 +0,0 @@ -Retired: Fails to install: https://pagure.io/releng/issue/12871 diff --git a/python-avocado.spec b/python-avocado.spec new file mode 100644 index 0000000..4c1803a --- /dev/null +++ b/python-avocado.spec @@ -0,0 +1,699 @@ +# Conditional for release vs. snapshot builds. Set to 1 for release build. +%if ! 0%{?rel_build:1} + %global rel_build 1 +%endif + +# Settings used for build from snapshots. +%if 0%{?rel_build} + %global gitref %{version} + %global gittar avocado-%{version}.tar.gz +%else + %if ! 0%{?commit:1} + %global commit 5b21f030001d6eed69c0357cc45b6128c73dc860 + %endif + %if ! 0%{?commit_date:1} + %global commit_date 20240819 + %endif + %global shortcommit %(c=%{commit};echo ${c:0:9}) + %global gitrel .%{commit_date}git%{shortcommit} + %global gitref %{commit} + %global gittar avocado-%{shortcommit}.tar.gz +%endif + +# Selftests are provided but may need to be skipped because many of +# 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 + +# resultsdb is not available for RHEL +%if ! 0%{?rhel} +%global with_resultsdb 1 +%else +%global with_resultsdb 0 +%endif + +Name: python-avocado +Version: 92.3 +Release: 6%{?gitrel}%{?dist} +Summary: Framework with tools and libraries for Automated Testing +# Found licenses: +# avocado/core/tapparser.py: MIT +# avocado/utils/external/gdbmi_parser.py: MIT +# avocado/utils/external/spark.py: MIT +# optional_plugins/html/avocado_result_html/templates/bootstrap.min.css: MIT +# optional_plugins/html/avocado_result_html/templates/bootstrap.min.js: MIT +# selftests/.data/jenkins-junit.xsd: MIT +# Other files: GPLv2 and GPLv2+ +License: GPL-2.0-or-later AND GPL-2.0-only AND MIT +URL: https://avocado-framework.github.io/ +Source0: https://github.com/avocado-framework/avocado/archive/%{gitref}/%{gittar} +BuildArch: noarch + +BuildRequires: kmod +BuildRequires: procps-ng +BuildRequires: python3-devel +BuildRequires: python3-docutils +BuildRequires: python3-jinja2 +BuildRequires: python3-lxml +BuildRequires: python3-psutil +BuildRequires: python3-setuptools +%if %{with_resultsdb} +BuildRequires: python3-resultsdb_api +BuildRequires: python3-pycdlib +%endif + +%if 0%{?with_tests} +BuildRequires: genisoimage +BuildRequires: libcdio +BuildRequires: psmisc +%if ! 0%{?rhel} +BuildRequires: perl-Test-Harness +%endif +BuildRequires: glibc-all-langpacks +BuildRequires: python3-netifaces +BuildRequires: python3-yaml +%endif +# with_tests + +%description +Avocado is a set of tools and libraries (what people call +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 +%endif +# drop unnecessary install requirement +sed -e "s/'markupsafe<2.0.0', //" -i optional_plugins/html/setup.py +# loosen jinja2 version requirement +sed -e "s/'jinja2<3.0.0'/'jinja2'/" -i optional_plugins/html/setup.py +# loosen pyyaml version requirement +sed -e "s/'PyYAML>=4.2b2,<6.0.2'/'PyYAML>=4.2b2'/" -i optional_plugins/varianter_yaml_to_mux/setup.py + +%build +%py3_build +pushd optional_plugins/html + %py3_build +popd +%if %{with_resultsdb} +pushd optional_plugins/resultsdb + %py3_build +popd +%endif +pushd optional_plugins/varianter_yaml_to_mux + %py3_build +popd +pushd optional_plugins/golang + %py3_build +popd +pushd optional_plugins/varianter_pict + %py3_build +popd +pushd optional_plugins/varianter_cit + %py3_build +popd +pushd optional_plugins/result_upload + %py3_build +popd +rst2man man/avocado.rst man/avocado.1 + +%install +%py3_install +for exe in \ + avocado \ + avocado-runner \ + avocado-runner-noop \ + avocado-runner-dry-run \ + 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-software-manager +do + mv %{buildroot}%{_bindir}/$exe %{buildroot}%{_bindir}/$exe-%{python3_version} + ln -s $exe-%{python3_version} %{buildroot}%{_bindir}/$exe-3 + ln -s $exe-%{python3_version} %{buildroot}%{_bindir}/$exe +done +# configuration is held at /etc/avocado only and part of the +# python-avocado-common package +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 +%if %{with_resultsdb} +pushd optional_plugins/resultsdb + %py3_install +popd +%endif +pushd optional_plugins/varianter_yaml_to_mux + %py3_install +popd +pushd optional_plugins/golang + %py3_install +popd +pushd optional_plugins/varianter_pict + %py3_install +popd +pushd optional_plugins/varianter_cit + %py3_install +popd +pushd optional_plugins/result_upload + %py3_install +popd +# cleanup plugin test cruft +rm -rf %{buildroot}%{python3_sitelib}/tests +mkdir -p %{buildroot}%{_sysconfdir}/avocado +cp -r avocado/etc/avocado/scripts %{buildroot}%{_sysconfdir}/avocado/scripts +cp -r avocado/etc/avocado/sysinfo %{buildroot}%{_sysconfdir}/avocado/sysinfo +mkdir -p %{buildroot}%{_libexecdir}/avocado +cp avocado/libexec/avocado-bash-utils %{buildroot}%{_libexecdir}/avocado/avocado-bash-utils +cp avocado/libexec/avocado_debug %{buildroot}%{_libexecdir}/avocado/avocado_debug +cp avocado/libexec/avocado_error %{buildroot}%{_libexecdir}/avocado/avocado_error +cp avocado/libexec/avocado_info %{buildroot}%{_libexecdir}/avocado/avocado_info +cp avocado/libexec/avocado_warn %{buildroot}%{_libexecdir}/avocado/avocado_warn +mkdir -p %{buildroot}%{_mandir}/man1 +install -m 0644 man/avocado.1 %{buildroot}%{_mandir}/man1/avocado.1 +mkdir -p %{buildroot}%{_pkgdocdir} +install -m 0644 README.rst %{buildroot}%{_pkgdocdir} +install -d -m 0755 %{buildroot}%{_sharedstatedir}/avocado/data +# place examples in documentation directory +install -d -m 0755 %{buildroot}%{_docdir}/avocado +cp -r examples/gdb-prerun-scripts %{buildroot}%{_docdir}/avocado/gdb-prerun-scripts +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 +find %{buildroot}%{_docdir}/avocado -type f -name '*.py' -exec chmod -c -x {} ';' + + +%if 0%{?with_tests} +%check + # 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 + PATH=%{buildroot}%{_bindir}:%{buildroot}%{_libexecdir}/avocado:$PATH \ + PYTHONPATH=%{buildroot}%{python3_sitelib}:. \ + LANG=en_US.UTF-8 \ + AVOCADO_CHECK_LEVEL=0 \ + %{python3} selftests/check.py --job-api --nrunner-interface \ + --unit --jobs --functional --optional-plugins \ + --disable-plugin-checks robot +%endif + + +%package -n python3-avocado +Summary: %{summary} +Requires: python-avocado-common == %{version}-%{release} +Requires: gdb +Requires: gdb-gdbserver +Requires: procps-ng +%if ! 0%{?rhel} +Requires: python3-pycdlib +%endif + +%description -n python3-avocado +Avocado is a set of tools and libraries (what people call +these days a framework) to perform automated testing. + +%files -n python3-avocado +%license LICENSE +%{_pkgdocdir}/README.rst +%{python3_sitelib}/avocado/ +%{python3_sitelib}/avocado_framework-%{version}-py%{python3_version}.egg-info +%{_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-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 +%{_bindir}/avocado-runner-python-unittest-%{python3_version} +%{_bindir}/avocado-runner-python-unittest-3 +%{_bindir}/avocado-runner-python-unittest +%{_bindir}/avocado-runner-avocado-instrumented-%{python3_version} +%{_bindir}/avocado-runner-avocado-instrumented-3 +%{_bindir}/avocado-runner-avocado-instrumented +%{_bindir}/avocado-runner-tap-%{python3_version} +%{_bindir}/avocado-runner-tap-3 +%{_bindir}/avocado-runner-tap +%{_bindir}/avocado-runner-requirement-asset-%{python3_version} +%{_bindir}/avocado-runner-requirement-asset-3 +%{_bindir}/avocado-runner-requirement-asset +%{_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 + + +%package -n python-avocado-common +Summary: Avocado common files +# Automatically converted from old format: GPLv2+ - review is highly recommended. +License: GPL-2.0-or-later + +%description -n python-avocado-common +Common files (such as configuration) for the Avocado Testing Framework. + +%files -n python-avocado-common +%license LICENSE +%{_mandir}/man1/avocado.1.gz +%dir %{_docdir}/avocado +%dir %{_sharedstatedir}/avocado +%dir %{_sysconfdir}/avocado +%dir %{_sysconfdir}/avocado/sysinfo +%dir %{_sysconfdir}/avocado/scripts +%dir %{_sysconfdir}/avocado/scripts/job +%dir %{_sysconfdir}/avocado/scripts/job/pre.d +%dir %{_sysconfdir}/avocado/scripts/job/post.d +%config(noreplace) %{_sysconfdir}/avocado/sysinfo/commands +%config(noreplace) %{_sysconfdir}/avocado/sysinfo/files +%config(noreplace) %{_sysconfdir}/avocado/sysinfo/profilers +%{_sysconfdir}/avocado/scripts/job/pre.d/README +%{_sysconfdir}/avocado/scripts/job/post.d/README + + +%package -n python3-avocado-plugins-output-html +Summary: Avocado HTML report plugin +License: GPL-2.0-or-later AND MIT +Requires: python3-avocado == %{version}-%{release} + +%description -n python3-avocado-plugins-output-html +Adds to avocado the ability to generate an HTML report at every job results +directory. It also gives the user the ability to write a report on an +arbitrary filesystem location. + +%files -n python3-avocado-plugins-output-html +%{python3_sitelib}/avocado_result_html/ +%{python3_sitelib}/avocado_framework_plugin_result_html-%{version}-py%{python3_version}.egg-info + + +%if %{with_resultsdb} +%package -n python3-avocado-plugins-resultsdb +Summary: Avocado plugin to propagate job results to ResultsDB +# Automatically converted from old format: GPLv2+ - review is highly recommended. +License: GPL-2.0-or-later +Requires: python3-avocado == %{version}-%{release} + +%description -n python3-avocado-plugins-resultsdb +Allows Avocado to send job results directly to a ResultsDB +server. + +%files -n python3-avocado-plugins-resultsdb +%{python3_sitelib}/avocado_resultsdb/ +%{python3_sitelib}/avocado_framework_plugin_resultsdb-%{version}-py%{python3_version}.egg-info +%endif +# with_resultsdb + + +%package -n python3-avocado-plugins-varianter-yaml-to-mux +Summary: Avocado plugin to generate variants out of yaml files +# Automatically converted from old format: GPLv2+ - review is highly recommended. +License: GPL-2.0-or-later +Requires: python3-avocado == %{version}-%{release} + +%description -n python3-avocado-plugins-varianter-yaml-to-mux +Can be used to produce multiple test variants with test parameters +defined in a yaml file(s). + +%files -n python3-avocado-plugins-varianter-yaml-to-mux +%{python3_sitelib}/avocado_varianter_yaml_to_mux/ +%{python3_sitelib}/avocado_framework_plugin_varianter_yaml_to_mux-%{version}-py%{python3_version}.egg-info + + +%package -n python3-avocado-plugins-golang +Summary: Avocado plugin for execution of golang tests +# Automatically converted from old format: GPLv2+ - review is highly recommended. +License: GPL-2.0-or-later +Requires: python3-avocado == %{version}-%{release} +Requires: golang + +%description -n python3-avocado-plugins-golang +Allows Avocado to list golang tests, and if golang is installed, +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 + + +%package -n python3-avocado-plugins-varianter-pict +Summary: Varianter with combinatorial capabilities by PICT +# Automatically converted from old format: GPLv2+ - review is highly recommended. +License: GPL-2.0-or-later +Requires: python3-avocado == %{version}-%{release} + +%description -n python3-avocado-plugins-varianter-pict +This plugin uses a third-party tool to provide variants created by +Pair-Wise algorithms, also known as Combinatorial Independent Testing. + +%files -n python3-avocado-plugins-varianter-pict +%{python3_sitelib}/avocado_varianter_pict/ +%{python3_sitelib}/avocado_framework_plugin_varianter_pict-%{version}-py%{python3_version}.egg-info + + +%package -n python3-avocado-plugins-varianter-cit +Summary: Varianter with Combinatorial Independent Testing capabilities +# Automatically converted from old format: GPLv2+ - review is highly recommended. +License: GPL-2.0-or-later +Requires: python3-avocado == %{version}-%{release} + +%description -n python3-avocado-plugins-varianter-cit +A varianter plugin that generates variants using Combinatorial +Independent Testing (AKA Pair-Wise) algorithm developed in +collaboration with CVUT Prague. + +%files -n python3-avocado-plugins-varianter-cit +%{python3_sitelib}/avocado_varianter_cit/ +%{python3_sitelib}/avocado_framework_plugin_varianter_cit-%{version}-py%{python3_version}.egg-info + + +%package -n python3-avocado-plugins-result-upload +Summary: Avocado plugin propagate job results to a remote host +# Automatically converted from old format: GPLv2+ - review is highly recommended. +License: GPL-2.0-or-later +Requires: python3-avocado == %{version}-%{release} + +%description -n python3-avocado-plugins-result-upload +This optional plugin is intended to upload the Avocado Job results to +a dedicated sever. + +%files -n python3-avocado-plugins-result-upload +%{python3_sitelib}/avocado_result_upload/ +%{python3_sitelib}/avocado_framework_plugin_result_upload-%{version}-py%{python3_version}.egg-info + + +%package -n python-avocado-examples +Summary: Avocado Test Framework Example Tests +# Automatically converted from old format: GPLv2+ - review is highly recommended. +License: GPL-2.0-or-later +# documentation does not require main package, but needs to be in lock-step if present +Conflicts: python3-avocado < %{version}-%{release}, python3-avocado > %{version}-%{release} + +%description -n python-avocado-examples +The set of example tests present in the upstream tree of the Avocado framework. +Some of them are used as functional tests of the framework, others serve as +examples of how to write tests on your own. + +%files -n python-avocado-examples +%license LICENSE +%dir %{_docdir}/avocado +%{_docdir}/avocado/gdb-prerun-scripts +%{_docdir}/avocado/plugins +%{_docdir}/avocado/tests +%{_docdir}/avocado/varianter_cit +%{_docdir}/avocado/varianter_pict +%{_docdir}/avocado/wrappers +%{_docdir}/avocado/yaml_to_mux + + +%package -n python-avocado-bash +Summary: Avocado Test Framework Bash Utilities +License: GPL-2.0-or-later AND GPL-2.0-only +Requires: python-avocado-common == %{version}-%{release} + +%description -n python-avocado-bash +A small set of utilities to interact with Avocado from the Bourne +Again Shell code (and possibly other similar shells). + +%files -n python-avocado-bash +%license LICENSE +%dir %{_libexecdir}/avocado +%{_libexecdir}/avocado/avocado-bash-utils +%{_libexecdir}/avocado/avocado_debug +%{_libexecdir}/avocado/avocado_error +%{_libexecdir}/avocado/avocado_info +%{_libexecdir}/avocado/avocado_warn + + +%changelog +* Fri Jul 25 2025 Fedora Release Engineering - 92.3-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + +* Tue Jun 03 2025 Python Maint - 92.3-5 +- Rebuilt for Python 3.14 + +* Mon Jan 20 2025 Miro Hrončok - 92.3-4 +- Loosen the PyYAML version requirement in python3-avocado-plugins-varianter-yaml-to-mux + +* Mon Jan 20 2025 Cleber Rosa - 92.3-3 +- convert remaining licenses to SPDX + +* Sat Jan 18 2025 Fedora Release Engineering - 92.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + +* Mon Aug 19 2024 Cleber Rosa - 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ý - 92.1-8 +- convert license to SPDX + +* Fri Jul 19 2024 Fedora Release Engineering - 92.1-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Fri Jun 07 2024 Python Maint - 92.1-6 +- Rebuilt for Python 3.13 + +* Mon Jan 29 2024 Fedora Release Engineering - 92.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Fri Jan 26 2024 Fedora Release Engineering - 92.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Sun Jan 21 2024 Fedora Release Engineering - 92.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Fri Jul 21 2023 Fedora Release Engineering - 92.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Mon Jul 17 2023 Cleber Rosa - 92.1-1 +- Updated to 92.1 +- Support building and running under Python 3.12 for F39 + +* Wed Jun 14 2023 Python Maint - 92.0-3 +- Rebuilt for Python 3.12 + +* Fri Jan 20 2023 Fedora Release Engineering - 92.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Tue Aug 9 2022 Cleber Rosa - 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 - 82.0-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Tue Jun 21 2022 Python Maint - 82.0-6 +- Rebuilt for Python 3.11 + +* Fri Jan 21 2022 Fedora Release Engineering - 82.0-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Wed Jul 28 2021 Merlin Mathesius - 82.0-4 +- Loosen jinja2 version requirement to fix FTBFS in Rawhide + +* Fri Jul 23 2021 Fedora Release Engineering - 82.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Thu Mar 18 2021 Merlin Mathesius - 82.0-2 +- Drop obsolete packages from BuildRequires +- Generate man page directly using 'rst2man' rather than requiring 'make' +- Adjust PATH to make sure self-tests find internal modules +- Spec file cleanup following package review. + +* Mon Sep 14 2020 Cleber Rosa - 82.0-1 +- Sync with upstream release 82.0. +- Removed python libvirt depedency as the vm runner has been removed + upstream +- Dropped configuration files to sync with upstream which made them + optional and doesn't ship them anymore +- Add on extra character to short commit to sync with upstream + +* Sat Jun 6 2020 Cleber Rosa - 80.0-1 +- Sync with upstream release 80.0. +- Dropped use of custom avocado command for tests +- Do not build deprecated runners + +* Tue May 12 2020 Cleber Rosa - 79.0-1 +- Sync with upstream release 79.0. +- Added Python's user base bin dir to the PATH environment variable + while running tests, so that avocado-runner-* scripts can be found +- Moved comment to new lines closing the conditionals, to avoid + errors from rpmlint and rpmbuild + +* Wed Apr 15 2020 Merlin Mathesius - 78.0-1 +- Sync with upstream release 78.0. + +* Tue Mar 17 2020 Merlin Mathesius - 77.0-1 +- Sync with upstream release 77.0. + +* Mon Mar 09 2020 Merlin Mathesius - 76.0-1 +- Sync with upstream release 76.0. + +* Mon Jan 20 2020 Merlin Mathesius - 75.1-1 +- Sync with upstream release 75.1. + +* Mon Dec 23 2019 Merlin Mathesius - 74.0-1 +- Sync with upstream release 74.0. + +* Wed Nov 27 2019 Merlin Mathesius - 73.0-1 +- Sync with upstream release 73.0. +- Adjustments to build for RHEL 8. + +* Wed Oct 02 2019 Merlin Mathesius - 72.0-1 +- Sync with upstream release 72.0. + +* Wed Aug 28 2019 Merlin Mathesius - 71.0-1 +- Sync with upstream release 71.0. + +* Wed Jun 26 2019 Merlin Mathesius - 70.0-1 +- Sync with upstream release 70.0. +- Drop all Python 2 support from SPEC file. + +* Wed May 22 2019 Merlin Mathesius - 69.0-4 +- pyliblzma is Python 2-only and no longer available as of F31. +- Unversioned executables should now be Python 3. + +* Mon May 20 2019 Merlin Mathesius - 69.0-3 +- Drop Python 2 support from F31 and RHEL8 onward. +- Disable components dependent upon Fiber in Fedora 31 and later, + since avocado is currently incompatible with the new Fiber API. + +* Tue Mar 19 2019 Merlin Mathesius - 69.0-2 +- python2-sphinx is no longer available or needed as of F31 + +* Wed Feb 27 2019 Merlin Mathesius - 69.0-1 +- Sync with upstream release 69.0. + +* Fri Feb 22 2019 Merlin Mathesius - 68.0-1 +- Sync with upstream release 68.0. + +* Thu Jan 31 2019 Merlin Mathesius - 67.0-1 +- Sync with upstream release 67.0. +- genisoimage, libcdio, and psmisc added as build deps so iso9660 tests run. +- Replace pystache requirement with jinja2. +- glibc-all-langpacks added as build dep for F30+ so vmimage tests run. +- python2-resultsdb_api package has been removed in F30 so + python2-avocado-plugins-resultsdb was also disabled. + +* Wed Nov 21 2018 Merlin Mathesius - 66.0-1 +- Sync with upstream release 66.0. +- python2-pycdlib package has been removed in F30 as part of + https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal + +* Thu Oct 04 2018 Merlin Mathesius - 65.0-1 +- Sync with upstream release 65.0. + +* Tue Aug 28 2018 Merlin Mathesius - 64.0-1 +- Sync with upstream release 64.0. + +* Thu Jul 26 2018 Merlin Mathesius - 63.0-2 +- Added missing python[2]-enum34 requirement. + +* Mon Jul 23 2018 Merlin Mathesius - 63.0-1 +- Sync with upstream release 63.0. (BZ#1602175) + Include upstream patches needed to build for Rawhide. + +* Wed Jun 13 2018 Merlin Mathesius - 62.0-1 +- Sync with upstream release 62.0. (BZ#1590572) +- Correct libvirt dependency for EPEL7/RHEL7 + +* Thu May 17 2018 Merlin Mathesius - 61.0-1 +- Sync with upstream release 61.0. +- Packaging updates for Python 3. +- Reorganize SPEC file. + +* Mon Apr 9 2018 Cleber Rosa - 52.1-2 +- Added Fedora CI tests + +* Tue Apr 03 2018 Merlin Mathesius - 52.1-1 +- Sync with upstream release 52.1 (LTS series). +- Correct deprecated use of unversioned python. + +* Mon Mar 26 2018 Iryna Shcherbina - 52.0-5 +- Update Python 2 dependency declarations to new packaging standards + (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3) + +* Fri Feb 09 2018 Fedora Release Engineering - 52.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Wed Aug 09 2017 Merlin Mathesius - 52.0-3 +- Fix FTBFS error by disabling selfcheck producing false failures +- Update SPEC to use pkgname instead of srcname macro where appropriate + +* Thu Jul 27 2017 Fedora Release Engineering - 52.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Thu Jun 29 2017 Merlin Mathesius - 52.0-1 +- Sync with upstream release 52.0. (BZ#1465409) + +* Wed Jun 14 2017 Merlin Mathesius - 51.0-1 +- Sync with upstream release 51.0. (BZ#1460837) +- 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. + +* Tue Apr 25 2017 Merlin Mathesius - 49.0-1 +- Sync with upstream release 49.0. (BZ#1431413) + +* Tue Apr 18 2017 Merlin Mathesius - 48.0-1 +- Sync with upstream release 48.0. (BZ#1431413) +- Allow rel_build macro to be defined outside of the SPEC file. + +* Mon Mar 27 2017 Merlin Mathesius - 47.0-1 +- Sync with upstream release 47.0. +- Enable self-tests during build. +- Add example test to be run by Taskotron. + +* Mon Feb 27 2017 Merlin Mathesius - 46.0-2 +- Incorporate upstream SPEC file changes to split plugins into subpackages. +- Remove obsolete CC-BY-SA license, which went away with the halflings font. + +* Tue Feb 14 2017 Merlin Mathesius - 46.0-1 +- Sync with upstream release 46.0. +- Remove halflings license since font was removed from upstream. +- SPEC updates to easily switch between release and snapshot builds. + +* Sat Feb 11 2017 Fedora Release Engineering - 43.0-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Tue Jan 10 2017 Merlin Mathesius - 43.0-7 +- SPEC updates to build and install for EPEL. + +* Mon Nov 21 2016 Merlin Mathesius - 43.0-6 +- Initial packaging for Fedora. diff --git a/sources b/sources new file mode 100644 index 0000000..4a738a2 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (avocado-92.3.tar.gz) = 97a0c113bc826537a02ebf6efcd7cf49b505a93e5fd9686c3a4c7e70902f2d367f78eb2fb23ddf9253b97f45e27b2e328fd6bd1c420ecbeb59e25e991b29c262 diff --git a/tests/gdbtest.py b/tests/gdbtest.py new file mode 100755 index 0000000..c0cdc55 --- /dev/null +++ b/tests/gdbtest.py @@ -0,0 +1,347 @@ +import os + +from avocado import Test +from avocado.utils import gdb, genio, process + + +class GdbTest(Test): + + """ + Execute the gdb test + + :avocado: tags=requires_c_compiler + """ + + VALID_CMDS = ["-list-target-features", + "-break-info", + "-break-list", + "-thread-info", + "-stack-info-frame", + "-stack-info-depth"] + + INVALID_CMDS = ["-foobar", + "-magic8ball", + "-find-me-the-bug", + "-auto-debug-it"] + + def setUp(self): + 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): # pylint: disable=W0621 + """ + Checks if a process is still alive + + :param process: a :class:`subprocess.POpen` instance + :type process: :class:`subprocess.POpen` + :returns: True or False + :rtype: bool + """ + return process.poll() is None + + def test_start_exit(self): + """ + Tests execution of multiple GDB instances without any blocking or race + """ + self.log.info("Testing execution of multiple GDB instances") + process_count = 10 + gdb_instances = [] + for i in range(0, process_count): + gdb_instances.append(gdb.GDB()) + + for i in range(0, process_count): + self.assertEqual(gdb_instances[i].exit(), 0) + + def test_existing_commands_raw(self): + """ + Tests the GDB response to commands that exist and to those that do not + """ + g = gdb.GDB() + self.log.info("Testing existing (valid) GDB commands using raw commands") + for cmd in self.VALID_CMDS: + 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 = f"-info-gdb-mi-command {cmd[1:]}" + r = g.cmd(info_cmd) + self.assertEqual(r.result.result.command.exists, 'false') + + def test_existing_commands(self): + g = gdb.GDB() + + self.log.info("Testing existing (valid) GDB commands using utility " + "methods") + for cmd in self.VALID_CMDS: + self.assertTrue(g.cmd_exists(cmd)) + g.cmd(cmd) + + self.log.info("Testing non-existing (invalid) GDB commands using " + "utility methods") + for cmd in self.INVALID_CMDS: + self.assertFalse(g.cmd_exists(cmd)) + + def test_load_set_breakpoint_run_exit_raw(self): + """ + Test a common GDB cycle using raw commands: load, set break, run, exit + """ + self.log.info("Testing that GDB loads a file and sets a breakpoint") + g = gdb.GDB() + + file_cmd = f"-file-exec-and-symbols {self.return99_binary_path}" + r = g.cmd(file_cmd) + self.assertEqual(r.result.class_, 'done') + + break_cmd = "-break-insert 5" + r = g.cmd(break_cmd) + self.assertEqual(r.result.class_, 'done') + self.assertEqual(r.result.result.bkpt.number, '1') + self.assertEqual(r.result.result.bkpt.enabled, 'y') + + break_del_cmd = "-break-delete 1" + r = g.cmd(break_del_cmd) + self.assertEqual(r.result.class_, 'done') + + run_cmd = "-exec-run" + r = g.cmd(run_cmd) + self.assertEqual(r.result.class_, 'running') + + g.cmd("-gdb-exit") + self.assertEqual(g.process.wait(), 0) + + def test_load_set_breakpoint_run_exit(self): + """ + Test a common GDB cycle: load, set break, delete break, run, exit + """ + self.log.info("Testing a common GDB cycle") + g = gdb.GDB() + g.set_file(self.return99_binary_path) + g.set_break("5") + g.del_break(1) + g.run() + g.exit() + + def test_generate_core(self): + """ + Load a file that will cause a segfault and produce a core dump + """ + self.log.info("Testing that a core dump will be generated") + + g = gdb.GDB() + file_cmd = f"-file-exec-and-symbols {self.segfault_binary_path}" + r = g.cmd(file_cmd) + self.assertEqual(r.result.class_, 'done') + + run_cmd = "-exec-run" + r = g.cmd(run_cmd) + self.assertEqual(r.result.class_, 'running') + + other_messages = g.read_until_break() + core_path = None + for msg in other_messages: + 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 = 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') + + self.assertTrue(os.path.exists(core_path)) + g.exit() + + def test_set_multiple_break(self): + """ + Tests that multiple breakpoints do not interfere with each other + """ + self.log.info("Testing setting multiple breakpoints") + g = gdb.GDB() + g.set_file(self.return99_binary_path) + g.set_break('empty') + g.set_break('7') + g.exit() + + def test_disconnect_raw(self): + """ + Connect/disconnect repeatedly from a remote debugger using raw commands + """ + self.log.info("Testing connecting and disconnecting repeatedly using " + "raw commands") + s = gdb.GDBServer() + g = gdb.GDB() + + # Do 100 cycle of target (kind of connects) and disconnects + for _ in range(0, 100): + 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 = f'-target-select extended-remote :{s.port}' + r = g.cmd(cmd) + self.assertEqual(r.result.class_, 'connected') + r = g.cli_cmd('monitor exit') + self.assertEqual(r.result.class_, 'done') + + g.exit() + s.exit() + + def test_disconnect(self): + """ + Connect/disconnect repeatedly from a remote debugger using utilities + """ + self.log.info("Testing connecting and disconnecting repeatedly") + s = gdb.GDBServer() + g = gdb.GDB() + + for _ in range(0, 100): + r = g.connect(s.port) + self.assertEqual(r.result.class_, 'connected') + r = g.disconnect() + self.assertEqual(r.result.class_, 'done') + + g.exit() + s.exit() + + def test_remote_exec(self): + """ + Tests execution on a remote target + """ + self.log.info("Testing execution on a remote target") + hit_breakpoint = False + + s = gdb.GDBServer() + g = gdb.GDB() + + cmd = f'-file-exec-and-symbols {self.return99_binary_path}' + r = g.cmd(cmd) + self.assertEqual(r.result.class_, 'done') + + cmd = f'set remote exec-file {self.return99_binary_path}' + r = g.cmd(cmd) + self.assertEqual(r.result.class_, 'done') + + cmd = f"-break-insert {'main'}" + r = g.cmd(cmd) + self.assertEqual(r.result.class_, 'done') + + r = g.cmd('-exec-run') + + other_messages = g.read_until_break() + for msg in other_messages: + parsed_msg = gdb.parse_mi(msg.decode()) + if (hasattr(parsed_msg, 'class_') and + parsed_msg.class_ == 'stopped' and + parsed_msg.result.reason == 'breakpoint-hit'): + hit_breakpoint = True + + self.assertTrue(hit_breakpoint) + g.exit() + s.exit() + + def test_stream_messages(self): + """ + Tests if the expected response appears in the result stream messages + """ + self.log.info("Testing that messages appears in the result stream") + g = gdb.GDB() + r = g.cmd("-gdb-version") + self.assertIn("GNU GPL version", r.get_stream_messages_text()) + + def test_connect_multiple_clients(self): + """ + Tests two or more connections to the same server raise an exception + """ + self.log.info("Testing that multiple clients cannot connect at once") + s = gdb.GDBServer() + c1 = gdb.GDB() + c1.connect(s.port) + c2 = gdb.GDB() + with self.assertRaises(gdb.UnexpectedResponseError): + c2.connect(s.port) + s.exit() + + def test_server_exit(self): + """ + Tests that the server is shutdown by using a monitor exit command + """ + self.log.info("Testing that a single server exits cleanly") + s = gdb.GDBServer() + s.exit() + self.assertFalse(self.is_process_alive(s.process)) + + def test_multiple_servers(self): + """ + Tests multiple server instances without any blocking or race condition + """ + self.log.info("Testing execution of multiple GDB server instances") + process_count = 10 + server_instances = [] + for i in range(0, process_count): + s = gdb.GDBServer() + c = gdb.GDB() + c.connect(s.port) + c.cmd('show-version') + c.disconnect() + server_instances.append(s) + + for i in range(0, process_count): + self.assertTrue(self.is_process_alive(server_instances[i].process)) + server_instances[i].exit() + self.assertFalse(self.is_process_alive(server_instances[i].process)) + + def test_server_stderr(self): + self.log.info('Testing server stderr collection') + s = gdb.GDBServer() + s.exit() + self.assertTrue(os.path.exists(s.stderr_path)) + + stderr_lines = genio.read_all_lines(s.stderr_path) + listening_line = f"Listening on port {s.port}" + self.assertIn(listening_line, stderr_lines) + + def test_server_stdout(self): + self.log.info('Testing server stdout/stderr collection') + s = gdb.GDBServer() + c = gdb.GDB() + c.connect(s.port) + c.set_file(self.return99_binary_path) + c.run() + s.exit() + + self.assertTrue(os.path.exists(s.stdout_path)) + self.assertTrue(os.path.exists(s.stderr_path)) + + stdout_lines = genio.read_all_lines(s.stdout_path) + self.assertIn("return 99", stdout_lines) + + @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(b"qSupported") + r.cmd(b"qfThreadInfo") + s.exit() diff --git a/tests/gdbtest.py.data/return99.c b/tests/gdbtest.py.data/return99.c new file mode 100644 index 0000000..bf14935 --- /dev/null +++ b/tests/gdbtest.py.data/return99.c @@ -0,0 +1,47 @@ +#include +#include + +void empty() +{ +} + +void write_stdout() +{ + fprintf(stdout, "testing output to stdout\n"); +} + +void write_stderr() +{ + fprintf(stderr, "testing output to stderr\n"); +} + +int forkme() +{ + int pid; + + pid = fork(); + if (pid != 0) + pid = fork(); + if (pid != 0) + pid = fork(); + + return pid; +} + +int main(int argc, char *argv[]) +{ + int exit_status = 99; + + if (argc > 1) + exit_status = atoi(argv[1]); + + empty(); + write_stdout(); + write_stderr(); + + if (forkme()) { + fprintf(stdout, "return %i\n", exit_status); + } + + return exit_status; +} diff --git a/tests/gdbtest.py.data/segfault.c b/tests/gdbtest.py.data/segfault.c new file mode 100644 index 0000000..a685f86 --- /dev/null +++ b/tests/gdbtest.py.data/segfault.c @@ -0,0 +1,9 @@ +#include + +int main() +{ + int *p = NULL; + *p = 0xdead; + + return 0; +} diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..7ff61ce --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,25 @@ +- hosts: localhost + roles: + - role: standard-test-avocado + tests: + - gdbtest.py:GdbTest.test_start_exit + - gdbtest.py:GdbTest.test_existing_commands_raw + - gdbtest.py:GdbTest.test_existing_commands + - gdbtest.py:GdbTest.test_load_set_breakpoint_run_exit_raw + - gdbtest.py:GdbTest.test_load_set_breakpoint_run_exit + - gdbtest.py:GdbTest.test_generate_core + - gdbtest.py:GdbTest.test_set_multiple_break + - gdbtest.py:GdbTest.test_disconnect_raw + - gdbtest.py:GdbTest.test_disconnect + - gdbtest.py:GdbTest.test_remote_exec + - gdbtest.py:GdbTest.test_stream_messages + - gdbtest.py:GdbTest.test_connect_multiple_clients + - gdbtest.py:GdbTest.test_server_exit + - gdbtest.py:GdbTest.test_multiple_servers + - gdbtest.py:GdbTest.test_server_stderr + - gdbtest.py:GdbTest.test_server_stdout + - gdbtest.py:GdbTest.test_remote + required_packages: + - gcc + - gdb + - gdb-gdbserver From e350a6d8232ff6a11ed1240ebeab01c374125592 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Tue, 30 Sep 2025 20:59:45 +0200 Subject: [PATCH 27/29] Retired: Fails to install: https://pagure.io/releng/issue/12969 --- .gitignore | 34 -- dead.package | 1 + python-avocado.spec | 699 ------------------------------- sources | 1 - tests/gdbtest.py | 347 --------------- tests/gdbtest.py.data/return99.c | 47 --- tests/gdbtest.py.data/segfault.c | 9 - tests/tests.yml | 25 -- 8 files changed, 1 insertion(+), 1162 deletions(-) delete mode 100644 .gitignore create mode 100644 dead.package delete mode 100644 python-avocado.spec delete mode 100644 sources delete mode 100755 tests/gdbtest.py delete mode 100644 tests/gdbtest.py.data/return99.c delete mode 100644 tests/gdbtest.py.data/segfault.c delete mode 100644 tests/tests.yml diff --git a/.gitignore b/.gitignore deleted file mode 100644 index bd8b053..0000000 --- a/.gitignore +++ /dev/null @@ -1,34 +0,0 @@ -/avocado-43.0.tar.gz -/avocado-46.0.tar.gz -/avocado-47.0.tar.gz -/avocado-48.0.tar.gz -/avocado-49.0.tar.gz -/avocado-50.0.tar.gz -/avocado-51.0.tar.gz -/avocado-52.0.tar.gz -/avocado-52.1.tar.gz -/avocado-61.0.tar.gz -/avocado-62.0.tar.gz -/avocado-63.0.tar.gz -/avocado-64.0.tar.gz -/avocado-65.0.tar.gz -/avocado-66.0.tar.gz -/avocado-67.0.tar.gz -/avocado-68.0.tar.gz -/avocado-69.0.tar.gz -/avocado-70.0.tar.gz -/avocado-71.0.tar.gz -/avocado-72.0.tar.gz -/avocado-73.0.tar.gz -/avocado-74.0.tar.gz -/avocado-75.1.tar.gz -/avocado-76.0.tar.gz -/avocado-77.0.tar.gz -/avocado-78.0.tar.gz -/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 diff --git a/dead.package b/dead.package new file mode 100644 index 0000000..505b74d --- /dev/null +++ b/dead.package @@ -0,0 +1 @@ +Retired: Fails to install: https://pagure.io/releng/issue/12969 diff --git a/python-avocado.spec b/python-avocado.spec deleted file mode 100644 index 4c1803a..0000000 --- a/python-avocado.spec +++ /dev/null @@ -1,699 +0,0 @@ -# Conditional for release vs. snapshot builds. Set to 1 for release build. -%if ! 0%{?rel_build:1} - %global rel_build 1 -%endif - -# Settings used for build from snapshots. -%if 0%{?rel_build} - %global gitref %{version} - %global gittar avocado-%{version}.tar.gz -%else - %if ! 0%{?commit:1} - %global commit 5b21f030001d6eed69c0357cc45b6128c73dc860 - %endif - %if ! 0%{?commit_date:1} - %global commit_date 20240819 - %endif - %global shortcommit %(c=%{commit};echo ${c:0:9}) - %global gitrel .%{commit_date}git%{shortcommit} - %global gitref %{commit} - %global gittar avocado-%{shortcommit}.tar.gz -%endif - -# Selftests are provided but may need to be skipped because many of -# 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 - -# resultsdb is not available for RHEL -%if ! 0%{?rhel} -%global with_resultsdb 1 -%else -%global with_resultsdb 0 -%endif - -Name: python-avocado -Version: 92.3 -Release: 6%{?gitrel}%{?dist} -Summary: Framework with tools and libraries for Automated Testing -# Found licenses: -# avocado/core/tapparser.py: MIT -# avocado/utils/external/gdbmi_parser.py: MIT -# avocado/utils/external/spark.py: MIT -# optional_plugins/html/avocado_result_html/templates/bootstrap.min.css: MIT -# optional_plugins/html/avocado_result_html/templates/bootstrap.min.js: MIT -# selftests/.data/jenkins-junit.xsd: MIT -# Other files: GPLv2 and GPLv2+ -License: GPL-2.0-or-later AND GPL-2.0-only AND MIT -URL: https://avocado-framework.github.io/ -Source0: https://github.com/avocado-framework/avocado/archive/%{gitref}/%{gittar} -BuildArch: noarch - -BuildRequires: kmod -BuildRequires: procps-ng -BuildRequires: python3-devel -BuildRequires: python3-docutils -BuildRequires: python3-jinja2 -BuildRequires: python3-lxml -BuildRequires: python3-psutil -BuildRequires: python3-setuptools -%if %{with_resultsdb} -BuildRequires: python3-resultsdb_api -BuildRequires: python3-pycdlib -%endif - -%if 0%{?with_tests} -BuildRequires: genisoimage -BuildRequires: libcdio -BuildRequires: psmisc -%if ! 0%{?rhel} -BuildRequires: perl-Test-Harness -%endif -BuildRequires: glibc-all-langpacks -BuildRequires: python3-netifaces -BuildRequires: python3-yaml -%endif -# with_tests - -%description -Avocado is a set of tools and libraries (what people call -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 -%endif -# drop unnecessary install requirement -sed -e "s/'markupsafe<2.0.0', //" -i optional_plugins/html/setup.py -# loosen jinja2 version requirement -sed -e "s/'jinja2<3.0.0'/'jinja2'/" -i optional_plugins/html/setup.py -# loosen pyyaml version requirement -sed -e "s/'PyYAML>=4.2b2,<6.0.2'/'PyYAML>=4.2b2'/" -i optional_plugins/varianter_yaml_to_mux/setup.py - -%build -%py3_build -pushd optional_plugins/html - %py3_build -popd -%if %{with_resultsdb} -pushd optional_plugins/resultsdb - %py3_build -popd -%endif -pushd optional_plugins/varianter_yaml_to_mux - %py3_build -popd -pushd optional_plugins/golang - %py3_build -popd -pushd optional_plugins/varianter_pict - %py3_build -popd -pushd optional_plugins/varianter_cit - %py3_build -popd -pushd optional_plugins/result_upload - %py3_build -popd -rst2man man/avocado.rst man/avocado.1 - -%install -%py3_install -for exe in \ - avocado \ - avocado-runner \ - avocado-runner-noop \ - avocado-runner-dry-run \ - 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-software-manager -do - mv %{buildroot}%{_bindir}/$exe %{buildroot}%{_bindir}/$exe-%{python3_version} - ln -s $exe-%{python3_version} %{buildroot}%{_bindir}/$exe-3 - ln -s $exe-%{python3_version} %{buildroot}%{_bindir}/$exe -done -# configuration is held at /etc/avocado only and part of the -# python-avocado-common package -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 -%if %{with_resultsdb} -pushd optional_plugins/resultsdb - %py3_install -popd -%endif -pushd optional_plugins/varianter_yaml_to_mux - %py3_install -popd -pushd optional_plugins/golang - %py3_install -popd -pushd optional_plugins/varianter_pict - %py3_install -popd -pushd optional_plugins/varianter_cit - %py3_install -popd -pushd optional_plugins/result_upload - %py3_install -popd -# cleanup plugin test cruft -rm -rf %{buildroot}%{python3_sitelib}/tests -mkdir -p %{buildroot}%{_sysconfdir}/avocado -cp -r avocado/etc/avocado/scripts %{buildroot}%{_sysconfdir}/avocado/scripts -cp -r avocado/etc/avocado/sysinfo %{buildroot}%{_sysconfdir}/avocado/sysinfo -mkdir -p %{buildroot}%{_libexecdir}/avocado -cp avocado/libexec/avocado-bash-utils %{buildroot}%{_libexecdir}/avocado/avocado-bash-utils -cp avocado/libexec/avocado_debug %{buildroot}%{_libexecdir}/avocado/avocado_debug -cp avocado/libexec/avocado_error %{buildroot}%{_libexecdir}/avocado/avocado_error -cp avocado/libexec/avocado_info %{buildroot}%{_libexecdir}/avocado/avocado_info -cp avocado/libexec/avocado_warn %{buildroot}%{_libexecdir}/avocado/avocado_warn -mkdir -p %{buildroot}%{_mandir}/man1 -install -m 0644 man/avocado.1 %{buildroot}%{_mandir}/man1/avocado.1 -mkdir -p %{buildroot}%{_pkgdocdir} -install -m 0644 README.rst %{buildroot}%{_pkgdocdir} -install -d -m 0755 %{buildroot}%{_sharedstatedir}/avocado/data -# place examples in documentation directory -install -d -m 0755 %{buildroot}%{_docdir}/avocado -cp -r examples/gdb-prerun-scripts %{buildroot}%{_docdir}/avocado/gdb-prerun-scripts -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 -find %{buildroot}%{_docdir}/avocado -type f -name '*.py' -exec chmod -c -x {} ';' - - -%if 0%{?with_tests} -%check - # 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 - PATH=%{buildroot}%{_bindir}:%{buildroot}%{_libexecdir}/avocado:$PATH \ - PYTHONPATH=%{buildroot}%{python3_sitelib}:. \ - LANG=en_US.UTF-8 \ - AVOCADO_CHECK_LEVEL=0 \ - %{python3} selftests/check.py --job-api --nrunner-interface \ - --unit --jobs --functional --optional-plugins \ - --disable-plugin-checks robot -%endif - - -%package -n python3-avocado -Summary: %{summary} -Requires: python-avocado-common == %{version}-%{release} -Requires: gdb -Requires: gdb-gdbserver -Requires: procps-ng -%if ! 0%{?rhel} -Requires: python3-pycdlib -%endif - -%description -n python3-avocado -Avocado is a set of tools and libraries (what people call -these days a framework) to perform automated testing. - -%files -n python3-avocado -%license LICENSE -%{_pkgdocdir}/README.rst -%{python3_sitelib}/avocado/ -%{python3_sitelib}/avocado_framework-%{version}-py%{python3_version}.egg-info -%{_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-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 -%{_bindir}/avocado-runner-python-unittest-%{python3_version} -%{_bindir}/avocado-runner-python-unittest-3 -%{_bindir}/avocado-runner-python-unittest -%{_bindir}/avocado-runner-avocado-instrumented-%{python3_version} -%{_bindir}/avocado-runner-avocado-instrumented-3 -%{_bindir}/avocado-runner-avocado-instrumented -%{_bindir}/avocado-runner-tap-%{python3_version} -%{_bindir}/avocado-runner-tap-3 -%{_bindir}/avocado-runner-tap -%{_bindir}/avocado-runner-requirement-asset-%{python3_version} -%{_bindir}/avocado-runner-requirement-asset-3 -%{_bindir}/avocado-runner-requirement-asset -%{_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 - - -%package -n python-avocado-common -Summary: Avocado common files -# Automatically converted from old format: GPLv2+ - review is highly recommended. -License: GPL-2.0-or-later - -%description -n python-avocado-common -Common files (such as configuration) for the Avocado Testing Framework. - -%files -n python-avocado-common -%license LICENSE -%{_mandir}/man1/avocado.1.gz -%dir %{_docdir}/avocado -%dir %{_sharedstatedir}/avocado -%dir %{_sysconfdir}/avocado -%dir %{_sysconfdir}/avocado/sysinfo -%dir %{_sysconfdir}/avocado/scripts -%dir %{_sysconfdir}/avocado/scripts/job -%dir %{_sysconfdir}/avocado/scripts/job/pre.d -%dir %{_sysconfdir}/avocado/scripts/job/post.d -%config(noreplace) %{_sysconfdir}/avocado/sysinfo/commands -%config(noreplace) %{_sysconfdir}/avocado/sysinfo/files -%config(noreplace) %{_sysconfdir}/avocado/sysinfo/profilers -%{_sysconfdir}/avocado/scripts/job/pre.d/README -%{_sysconfdir}/avocado/scripts/job/post.d/README - - -%package -n python3-avocado-plugins-output-html -Summary: Avocado HTML report plugin -License: GPL-2.0-or-later AND MIT -Requires: python3-avocado == %{version}-%{release} - -%description -n python3-avocado-plugins-output-html -Adds to avocado the ability to generate an HTML report at every job results -directory. It also gives the user the ability to write a report on an -arbitrary filesystem location. - -%files -n python3-avocado-plugins-output-html -%{python3_sitelib}/avocado_result_html/ -%{python3_sitelib}/avocado_framework_plugin_result_html-%{version}-py%{python3_version}.egg-info - - -%if %{with_resultsdb} -%package -n python3-avocado-plugins-resultsdb -Summary: Avocado plugin to propagate job results to ResultsDB -# Automatically converted from old format: GPLv2+ - review is highly recommended. -License: GPL-2.0-or-later -Requires: python3-avocado == %{version}-%{release} - -%description -n python3-avocado-plugins-resultsdb -Allows Avocado to send job results directly to a ResultsDB -server. - -%files -n python3-avocado-plugins-resultsdb -%{python3_sitelib}/avocado_resultsdb/ -%{python3_sitelib}/avocado_framework_plugin_resultsdb-%{version}-py%{python3_version}.egg-info -%endif -# with_resultsdb - - -%package -n python3-avocado-plugins-varianter-yaml-to-mux -Summary: Avocado plugin to generate variants out of yaml files -# Automatically converted from old format: GPLv2+ - review is highly recommended. -License: GPL-2.0-or-later -Requires: python3-avocado == %{version}-%{release} - -%description -n python3-avocado-plugins-varianter-yaml-to-mux -Can be used to produce multiple test variants with test parameters -defined in a yaml file(s). - -%files -n python3-avocado-plugins-varianter-yaml-to-mux -%{python3_sitelib}/avocado_varianter_yaml_to_mux/ -%{python3_sitelib}/avocado_framework_plugin_varianter_yaml_to_mux-%{version}-py%{python3_version}.egg-info - - -%package -n python3-avocado-plugins-golang -Summary: Avocado plugin for execution of golang tests -# Automatically converted from old format: GPLv2+ - review is highly recommended. -License: GPL-2.0-or-later -Requires: python3-avocado == %{version}-%{release} -Requires: golang - -%description -n python3-avocado-plugins-golang -Allows Avocado to list golang tests, and if golang is installed, -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 - - -%package -n python3-avocado-plugins-varianter-pict -Summary: Varianter with combinatorial capabilities by PICT -# Automatically converted from old format: GPLv2+ - review is highly recommended. -License: GPL-2.0-or-later -Requires: python3-avocado == %{version}-%{release} - -%description -n python3-avocado-plugins-varianter-pict -This plugin uses a third-party tool to provide variants created by -Pair-Wise algorithms, also known as Combinatorial Independent Testing. - -%files -n python3-avocado-plugins-varianter-pict -%{python3_sitelib}/avocado_varianter_pict/ -%{python3_sitelib}/avocado_framework_plugin_varianter_pict-%{version}-py%{python3_version}.egg-info - - -%package -n python3-avocado-plugins-varianter-cit -Summary: Varianter with Combinatorial Independent Testing capabilities -# Automatically converted from old format: GPLv2+ - review is highly recommended. -License: GPL-2.0-or-later -Requires: python3-avocado == %{version}-%{release} - -%description -n python3-avocado-plugins-varianter-cit -A varianter plugin that generates variants using Combinatorial -Independent Testing (AKA Pair-Wise) algorithm developed in -collaboration with CVUT Prague. - -%files -n python3-avocado-plugins-varianter-cit -%{python3_sitelib}/avocado_varianter_cit/ -%{python3_sitelib}/avocado_framework_plugin_varianter_cit-%{version}-py%{python3_version}.egg-info - - -%package -n python3-avocado-plugins-result-upload -Summary: Avocado plugin propagate job results to a remote host -# Automatically converted from old format: GPLv2+ - review is highly recommended. -License: GPL-2.0-or-later -Requires: python3-avocado == %{version}-%{release} - -%description -n python3-avocado-plugins-result-upload -This optional plugin is intended to upload the Avocado Job results to -a dedicated sever. - -%files -n python3-avocado-plugins-result-upload -%{python3_sitelib}/avocado_result_upload/ -%{python3_sitelib}/avocado_framework_plugin_result_upload-%{version}-py%{python3_version}.egg-info - - -%package -n python-avocado-examples -Summary: Avocado Test Framework Example Tests -# Automatically converted from old format: GPLv2+ - review is highly recommended. -License: GPL-2.0-or-later -# documentation does not require main package, but needs to be in lock-step if present -Conflicts: python3-avocado < %{version}-%{release}, python3-avocado > %{version}-%{release} - -%description -n python-avocado-examples -The set of example tests present in the upstream tree of the Avocado framework. -Some of them are used as functional tests of the framework, others serve as -examples of how to write tests on your own. - -%files -n python-avocado-examples -%license LICENSE -%dir %{_docdir}/avocado -%{_docdir}/avocado/gdb-prerun-scripts -%{_docdir}/avocado/plugins -%{_docdir}/avocado/tests -%{_docdir}/avocado/varianter_cit -%{_docdir}/avocado/varianter_pict -%{_docdir}/avocado/wrappers -%{_docdir}/avocado/yaml_to_mux - - -%package -n python-avocado-bash -Summary: Avocado Test Framework Bash Utilities -License: GPL-2.0-or-later AND GPL-2.0-only -Requires: python-avocado-common == %{version}-%{release} - -%description -n python-avocado-bash -A small set of utilities to interact with Avocado from the Bourne -Again Shell code (and possibly other similar shells). - -%files -n python-avocado-bash -%license LICENSE -%dir %{_libexecdir}/avocado -%{_libexecdir}/avocado/avocado-bash-utils -%{_libexecdir}/avocado/avocado_debug -%{_libexecdir}/avocado/avocado_error -%{_libexecdir}/avocado/avocado_info -%{_libexecdir}/avocado/avocado_warn - - -%changelog -* Fri Jul 25 2025 Fedora Release Engineering - 92.3-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild - -* Tue Jun 03 2025 Python Maint - 92.3-5 -- Rebuilt for Python 3.14 - -* Mon Jan 20 2025 Miro Hrončok - 92.3-4 -- Loosen the PyYAML version requirement in python3-avocado-plugins-varianter-yaml-to-mux - -* Mon Jan 20 2025 Cleber Rosa - 92.3-3 -- convert remaining licenses to SPDX - -* Sat Jan 18 2025 Fedora Release Engineering - 92.3-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild - -* Mon Aug 19 2024 Cleber Rosa - 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ý - 92.1-8 -- convert license to SPDX - -* Fri Jul 19 2024 Fedora Release Engineering - 92.1-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild - -* Fri Jun 07 2024 Python Maint - 92.1-6 -- Rebuilt for Python 3.13 - -* Mon Jan 29 2024 Fedora Release Engineering - 92.1-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Fri Jan 26 2024 Fedora Release Engineering - 92.1-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Sun Jan 21 2024 Fedora Release Engineering - 92.1-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Fri Jul 21 2023 Fedora Release Engineering - 92.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - -* Mon Jul 17 2023 Cleber Rosa - 92.1-1 -- Updated to 92.1 -- Support building and running under Python 3.12 for F39 - -* Wed Jun 14 2023 Python Maint - 92.0-3 -- Rebuilt for Python 3.12 - -* Fri Jan 20 2023 Fedora Release Engineering - 92.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - -* Tue Aug 9 2022 Cleber Rosa - 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 - 82.0-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - -* Tue Jun 21 2022 Python Maint - 82.0-6 -- Rebuilt for Python 3.11 - -* Fri Jan 21 2022 Fedora Release Engineering - 82.0-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - -* Wed Jul 28 2021 Merlin Mathesius - 82.0-4 -- Loosen jinja2 version requirement to fix FTBFS in Rawhide - -* Fri Jul 23 2021 Fedora Release Engineering - 82.0-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - -* Thu Mar 18 2021 Merlin Mathesius - 82.0-2 -- Drop obsolete packages from BuildRequires -- Generate man page directly using 'rst2man' rather than requiring 'make' -- Adjust PATH to make sure self-tests find internal modules -- Spec file cleanup following package review. - -* Mon Sep 14 2020 Cleber Rosa - 82.0-1 -- Sync with upstream release 82.0. -- Removed python libvirt depedency as the vm runner has been removed - upstream -- Dropped configuration files to sync with upstream which made them - optional and doesn't ship them anymore -- Add on extra character to short commit to sync with upstream - -* Sat Jun 6 2020 Cleber Rosa - 80.0-1 -- Sync with upstream release 80.0. -- Dropped use of custom avocado command for tests -- Do not build deprecated runners - -* Tue May 12 2020 Cleber Rosa - 79.0-1 -- Sync with upstream release 79.0. -- Added Python's user base bin dir to the PATH environment variable - while running tests, so that avocado-runner-* scripts can be found -- Moved comment to new lines closing the conditionals, to avoid - errors from rpmlint and rpmbuild - -* Wed Apr 15 2020 Merlin Mathesius - 78.0-1 -- Sync with upstream release 78.0. - -* Tue Mar 17 2020 Merlin Mathesius - 77.0-1 -- Sync with upstream release 77.0. - -* Mon Mar 09 2020 Merlin Mathesius - 76.0-1 -- Sync with upstream release 76.0. - -* Mon Jan 20 2020 Merlin Mathesius - 75.1-1 -- Sync with upstream release 75.1. - -* Mon Dec 23 2019 Merlin Mathesius - 74.0-1 -- Sync with upstream release 74.0. - -* Wed Nov 27 2019 Merlin Mathesius - 73.0-1 -- Sync with upstream release 73.0. -- Adjustments to build for RHEL 8. - -* Wed Oct 02 2019 Merlin Mathesius - 72.0-1 -- Sync with upstream release 72.0. - -* Wed Aug 28 2019 Merlin Mathesius - 71.0-1 -- Sync with upstream release 71.0. - -* Wed Jun 26 2019 Merlin Mathesius - 70.0-1 -- Sync with upstream release 70.0. -- Drop all Python 2 support from SPEC file. - -* Wed May 22 2019 Merlin Mathesius - 69.0-4 -- pyliblzma is Python 2-only and no longer available as of F31. -- Unversioned executables should now be Python 3. - -* Mon May 20 2019 Merlin Mathesius - 69.0-3 -- Drop Python 2 support from F31 and RHEL8 onward. -- Disable components dependent upon Fiber in Fedora 31 and later, - since avocado is currently incompatible with the new Fiber API. - -* Tue Mar 19 2019 Merlin Mathesius - 69.0-2 -- python2-sphinx is no longer available or needed as of F31 - -* Wed Feb 27 2019 Merlin Mathesius - 69.0-1 -- Sync with upstream release 69.0. - -* Fri Feb 22 2019 Merlin Mathesius - 68.0-1 -- Sync with upstream release 68.0. - -* Thu Jan 31 2019 Merlin Mathesius - 67.0-1 -- Sync with upstream release 67.0. -- genisoimage, libcdio, and psmisc added as build deps so iso9660 tests run. -- Replace pystache requirement with jinja2. -- glibc-all-langpacks added as build dep for F30+ so vmimage tests run. -- python2-resultsdb_api package has been removed in F30 so - python2-avocado-plugins-resultsdb was also disabled. - -* Wed Nov 21 2018 Merlin Mathesius - 66.0-1 -- Sync with upstream release 66.0. -- python2-pycdlib package has been removed in F30 as part of - https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal - -* Thu Oct 04 2018 Merlin Mathesius - 65.0-1 -- Sync with upstream release 65.0. - -* Tue Aug 28 2018 Merlin Mathesius - 64.0-1 -- Sync with upstream release 64.0. - -* Thu Jul 26 2018 Merlin Mathesius - 63.0-2 -- Added missing python[2]-enum34 requirement. - -* Mon Jul 23 2018 Merlin Mathesius - 63.0-1 -- Sync with upstream release 63.0. (BZ#1602175) - Include upstream patches needed to build for Rawhide. - -* Wed Jun 13 2018 Merlin Mathesius - 62.0-1 -- Sync with upstream release 62.0. (BZ#1590572) -- Correct libvirt dependency for EPEL7/RHEL7 - -* Thu May 17 2018 Merlin Mathesius - 61.0-1 -- Sync with upstream release 61.0. -- Packaging updates for Python 3. -- Reorganize SPEC file. - -* Mon Apr 9 2018 Cleber Rosa - 52.1-2 -- Added Fedora CI tests - -* Tue Apr 03 2018 Merlin Mathesius - 52.1-1 -- Sync with upstream release 52.1 (LTS series). -- Correct deprecated use of unversioned python. - -* Mon Mar 26 2018 Iryna Shcherbina - 52.0-5 -- Update Python 2 dependency declarations to new packaging standards - (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3) - -* Fri Feb 09 2018 Fedora Release Engineering - 52.0-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Wed Aug 09 2017 Merlin Mathesius - 52.0-3 -- Fix FTBFS error by disabling selfcheck producing false failures -- Update SPEC to use pkgname instead of srcname macro where appropriate - -* Thu Jul 27 2017 Fedora Release Engineering - 52.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - -* Thu Jun 29 2017 Merlin Mathesius - 52.0-1 -- Sync with upstream release 52.0. (BZ#1465409) - -* Wed Jun 14 2017 Merlin Mathesius - 51.0-1 -- Sync with upstream release 51.0. (BZ#1460837) -- 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. - -* Tue Apr 25 2017 Merlin Mathesius - 49.0-1 -- Sync with upstream release 49.0. (BZ#1431413) - -* Tue Apr 18 2017 Merlin Mathesius - 48.0-1 -- Sync with upstream release 48.0. (BZ#1431413) -- Allow rel_build macro to be defined outside of the SPEC file. - -* Mon Mar 27 2017 Merlin Mathesius - 47.0-1 -- Sync with upstream release 47.0. -- Enable self-tests during build. -- Add example test to be run by Taskotron. - -* Mon Feb 27 2017 Merlin Mathesius - 46.0-2 -- Incorporate upstream SPEC file changes to split plugins into subpackages. -- Remove obsolete CC-BY-SA license, which went away with the halflings font. - -* Tue Feb 14 2017 Merlin Mathesius - 46.0-1 -- Sync with upstream release 46.0. -- Remove halflings license since font was removed from upstream. -- SPEC updates to easily switch between release and snapshot builds. - -* Sat Feb 11 2017 Fedora Release Engineering - 43.0-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Tue Jan 10 2017 Merlin Mathesius - 43.0-7 -- SPEC updates to build and install for EPEL. - -* Mon Nov 21 2016 Merlin Mathesius - 43.0-6 -- Initial packaging for Fedora. diff --git a/sources b/sources deleted file mode 100644 index 4a738a2..0000000 --- a/sources +++ /dev/null @@ -1 +0,0 @@ -SHA512 (avocado-92.3.tar.gz) = 97a0c113bc826537a02ebf6efcd7cf49b505a93e5fd9686c3a4c7e70902f2d367f78eb2fb23ddf9253b97f45e27b2e328fd6bd1c420ecbeb59e25e991b29c262 diff --git a/tests/gdbtest.py b/tests/gdbtest.py deleted file mode 100755 index c0cdc55..0000000 --- a/tests/gdbtest.py +++ /dev/null @@ -1,347 +0,0 @@ -import os - -from avocado import Test -from avocado.utils import gdb, genio, process - - -class GdbTest(Test): - - """ - Execute the gdb test - - :avocado: tags=requires_c_compiler - """ - - VALID_CMDS = ["-list-target-features", - "-break-info", - "-break-list", - "-thread-info", - "-stack-info-frame", - "-stack-info-depth"] - - INVALID_CMDS = ["-foobar", - "-magic8ball", - "-find-me-the-bug", - "-auto-debug-it"] - - def setUp(self): - 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): # pylint: disable=W0621 - """ - Checks if a process is still alive - - :param process: a :class:`subprocess.POpen` instance - :type process: :class:`subprocess.POpen` - :returns: True or False - :rtype: bool - """ - return process.poll() is None - - def test_start_exit(self): - """ - Tests execution of multiple GDB instances without any blocking or race - """ - self.log.info("Testing execution of multiple GDB instances") - process_count = 10 - gdb_instances = [] - for i in range(0, process_count): - gdb_instances.append(gdb.GDB()) - - for i in range(0, process_count): - self.assertEqual(gdb_instances[i].exit(), 0) - - def test_existing_commands_raw(self): - """ - Tests the GDB response to commands that exist and to those that do not - """ - g = gdb.GDB() - self.log.info("Testing existing (valid) GDB commands using raw commands") - for cmd in self.VALID_CMDS: - 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 = f"-info-gdb-mi-command {cmd[1:]}" - r = g.cmd(info_cmd) - self.assertEqual(r.result.result.command.exists, 'false') - - def test_existing_commands(self): - g = gdb.GDB() - - self.log.info("Testing existing (valid) GDB commands using utility " - "methods") - for cmd in self.VALID_CMDS: - self.assertTrue(g.cmd_exists(cmd)) - g.cmd(cmd) - - self.log.info("Testing non-existing (invalid) GDB commands using " - "utility methods") - for cmd in self.INVALID_CMDS: - self.assertFalse(g.cmd_exists(cmd)) - - def test_load_set_breakpoint_run_exit_raw(self): - """ - Test a common GDB cycle using raw commands: load, set break, run, exit - """ - self.log.info("Testing that GDB loads a file and sets a breakpoint") - g = gdb.GDB() - - file_cmd = f"-file-exec-and-symbols {self.return99_binary_path}" - r = g.cmd(file_cmd) - self.assertEqual(r.result.class_, 'done') - - break_cmd = "-break-insert 5" - r = g.cmd(break_cmd) - self.assertEqual(r.result.class_, 'done') - self.assertEqual(r.result.result.bkpt.number, '1') - self.assertEqual(r.result.result.bkpt.enabled, 'y') - - break_del_cmd = "-break-delete 1" - r = g.cmd(break_del_cmd) - self.assertEqual(r.result.class_, 'done') - - run_cmd = "-exec-run" - r = g.cmd(run_cmd) - self.assertEqual(r.result.class_, 'running') - - g.cmd("-gdb-exit") - self.assertEqual(g.process.wait(), 0) - - def test_load_set_breakpoint_run_exit(self): - """ - Test a common GDB cycle: load, set break, delete break, run, exit - """ - self.log.info("Testing a common GDB cycle") - g = gdb.GDB() - g.set_file(self.return99_binary_path) - g.set_break("5") - g.del_break(1) - g.run() - g.exit() - - def test_generate_core(self): - """ - Load a file that will cause a segfault and produce a core dump - """ - self.log.info("Testing that a core dump will be generated") - - g = gdb.GDB() - file_cmd = f"-file-exec-and-symbols {self.segfault_binary_path}" - r = g.cmd(file_cmd) - self.assertEqual(r.result.class_, 'done') - - run_cmd = "-exec-run" - r = g.cmd(run_cmd) - self.assertEqual(r.result.class_, 'running') - - other_messages = g.read_until_break() - core_path = None - for msg in other_messages: - 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 = 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') - - self.assertTrue(os.path.exists(core_path)) - g.exit() - - def test_set_multiple_break(self): - """ - Tests that multiple breakpoints do not interfere with each other - """ - self.log.info("Testing setting multiple breakpoints") - g = gdb.GDB() - g.set_file(self.return99_binary_path) - g.set_break('empty') - g.set_break('7') - g.exit() - - def test_disconnect_raw(self): - """ - Connect/disconnect repeatedly from a remote debugger using raw commands - """ - self.log.info("Testing connecting and disconnecting repeatedly using " - "raw commands") - s = gdb.GDBServer() - g = gdb.GDB() - - # Do 100 cycle of target (kind of connects) and disconnects - for _ in range(0, 100): - 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 = f'-target-select extended-remote :{s.port}' - r = g.cmd(cmd) - self.assertEqual(r.result.class_, 'connected') - r = g.cli_cmd('monitor exit') - self.assertEqual(r.result.class_, 'done') - - g.exit() - s.exit() - - def test_disconnect(self): - """ - Connect/disconnect repeatedly from a remote debugger using utilities - """ - self.log.info("Testing connecting and disconnecting repeatedly") - s = gdb.GDBServer() - g = gdb.GDB() - - for _ in range(0, 100): - r = g.connect(s.port) - self.assertEqual(r.result.class_, 'connected') - r = g.disconnect() - self.assertEqual(r.result.class_, 'done') - - g.exit() - s.exit() - - def test_remote_exec(self): - """ - Tests execution on a remote target - """ - self.log.info("Testing execution on a remote target") - hit_breakpoint = False - - s = gdb.GDBServer() - g = gdb.GDB() - - cmd = f'-file-exec-and-symbols {self.return99_binary_path}' - r = g.cmd(cmd) - self.assertEqual(r.result.class_, 'done') - - cmd = f'set remote exec-file {self.return99_binary_path}' - r = g.cmd(cmd) - self.assertEqual(r.result.class_, 'done') - - cmd = f"-break-insert {'main'}" - r = g.cmd(cmd) - self.assertEqual(r.result.class_, 'done') - - r = g.cmd('-exec-run') - - other_messages = g.read_until_break() - for msg in other_messages: - parsed_msg = gdb.parse_mi(msg.decode()) - if (hasattr(parsed_msg, 'class_') and - parsed_msg.class_ == 'stopped' and - parsed_msg.result.reason == 'breakpoint-hit'): - hit_breakpoint = True - - self.assertTrue(hit_breakpoint) - g.exit() - s.exit() - - def test_stream_messages(self): - """ - Tests if the expected response appears in the result stream messages - """ - self.log.info("Testing that messages appears in the result stream") - g = gdb.GDB() - r = g.cmd("-gdb-version") - self.assertIn("GNU GPL version", r.get_stream_messages_text()) - - def test_connect_multiple_clients(self): - """ - Tests two or more connections to the same server raise an exception - """ - self.log.info("Testing that multiple clients cannot connect at once") - s = gdb.GDBServer() - c1 = gdb.GDB() - c1.connect(s.port) - c2 = gdb.GDB() - with self.assertRaises(gdb.UnexpectedResponseError): - c2.connect(s.port) - s.exit() - - def test_server_exit(self): - """ - Tests that the server is shutdown by using a monitor exit command - """ - self.log.info("Testing that a single server exits cleanly") - s = gdb.GDBServer() - s.exit() - self.assertFalse(self.is_process_alive(s.process)) - - def test_multiple_servers(self): - """ - Tests multiple server instances without any blocking or race condition - """ - self.log.info("Testing execution of multiple GDB server instances") - process_count = 10 - server_instances = [] - for i in range(0, process_count): - s = gdb.GDBServer() - c = gdb.GDB() - c.connect(s.port) - c.cmd('show-version') - c.disconnect() - server_instances.append(s) - - for i in range(0, process_count): - self.assertTrue(self.is_process_alive(server_instances[i].process)) - server_instances[i].exit() - self.assertFalse(self.is_process_alive(server_instances[i].process)) - - def test_server_stderr(self): - self.log.info('Testing server stderr collection') - s = gdb.GDBServer() - s.exit() - self.assertTrue(os.path.exists(s.stderr_path)) - - stderr_lines = genio.read_all_lines(s.stderr_path) - listening_line = f"Listening on port {s.port}" - self.assertIn(listening_line, stderr_lines) - - def test_server_stdout(self): - self.log.info('Testing server stdout/stderr collection') - s = gdb.GDBServer() - c = gdb.GDB() - c.connect(s.port) - c.set_file(self.return99_binary_path) - c.run() - s.exit() - - self.assertTrue(os.path.exists(s.stdout_path)) - self.assertTrue(os.path.exists(s.stderr_path)) - - stdout_lines = genio.read_all_lines(s.stdout_path) - self.assertIn("return 99", stdout_lines) - - @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(b"qSupported") - r.cmd(b"qfThreadInfo") - s.exit() diff --git a/tests/gdbtest.py.data/return99.c b/tests/gdbtest.py.data/return99.c deleted file mode 100644 index bf14935..0000000 --- a/tests/gdbtest.py.data/return99.c +++ /dev/null @@ -1,47 +0,0 @@ -#include -#include - -void empty() -{ -} - -void write_stdout() -{ - fprintf(stdout, "testing output to stdout\n"); -} - -void write_stderr() -{ - fprintf(stderr, "testing output to stderr\n"); -} - -int forkme() -{ - int pid; - - pid = fork(); - if (pid != 0) - pid = fork(); - if (pid != 0) - pid = fork(); - - return pid; -} - -int main(int argc, char *argv[]) -{ - int exit_status = 99; - - if (argc > 1) - exit_status = atoi(argv[1]); - - empty(); - write_stdout(); - write_stderr(); - - if (forkme()) { - fprintf(stdout, "return %i\n", exit_status); - } - - return exit_status; -} diff --git a/tests/gdbtest.py.data/segfault.c b/tests/gdbtest.py.data/segfault.c deleted file mode 100644 index a685f86..0000000 --- a/tests/gdbtest.py.data/segfault.c +++ /dev/null @@ -1,9 +0,0 @@ -#include - -int main() -{ - int *p = NULL; - *p = 0xdead; - - return 0; -} diff --git a/tests/tests.yml b/tests/tests.yml deleted file mode 100644 index 7ff61ce..0000000 --- a/tests/tests.yml +++ /dev/null @@ -1,25 +0,0 @@ -- hosts: localhost - roles: - - role: standard-test-avocado - tests: - - gdbtest.py:GdbTest.test_start_exit - - gdbtest.py:GdbTest.test_existing_commands_raw - - gdbtest.py:GdbTest.test_existing_commands - - gdbtest.py:GdbTest.test_load_set_breakpoint_run_exit_raw - - gdbtest.py:GdbTest.test_load_set_breakpoint_run_exit - - gdbtest.py:GdbTest.test_generate_core - - gdbtest.py:GdbTest.test_set_multiple_break - - gdbtest.py:GdbTest.test_disconnect_raw - - gdbtest.py:GdbTest.test_disconnect - - gdbtest.py:GdbTest.test_remote_exec - - gdbtest.py:GdbTest.test_stream_messages - - gdbtest.py:GdbTest.test_connect_multiple_clients - - gdbtest.py:GdbTest.test_server_exit - - gdbtest.py:GdbTest.test_multiple_servers - - gdbtest.py:GdbTest.test_server_stderr - - gdbtest.py:GdbTest.test_server_stdout - - gdbtest.py:GdbTest.test_remote - required_packages: - - gcc - - gdb - - gdb-gdbserver From a0f088ed1846292903e38e6e605bfbd5db4fffdf Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 9 Oct 2025 12:01:58 +0000 Subject: [PATCH 28/29] Unretirement request: pagure.io/releng/issue/13001 Revert "Retired: Fails to install: https://pagure.io/releng/issue/12969" This reverts commit e350a6d8232ff6a11ed1240ebeab01c374125592. Signed-off-by: Fedora Release Engineering --- .gitignore | 34 ++ dead.package | 1 - python-avocado.spec | 699 +++++++++++++++++++++++++++++++ sources | 1 + tests/gdbtest.py | 347 +++++++++++++++ tests/gdbtest.py.data/return99.c | 47 +++ tests/gdbtest.py.data/segfault.c | 9 + tests/tests.yml | 25 ++ 8 files changed, 1162 insertions(+), 1 deletion(-) create mode 100644 .gitignore delete mode 100644 dead.package create mode 100644 python-avocado.spec create mode 100644 sources create mode 100755 tests/gdbtest.py create mode 100644 tests/gdbtest.py.data/return99.c create mode 100644 tests/gdbtest.py.data/segfault.c create mode 100644 tests/tests.yml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..bd8b053 --- /dev/null +++ b/.gitignore @@ -0,0 +1,34 @@ +/avocado-43.0.tar.gz +/avocado-46.0.tar.gz +/avocado-47.0.tar.gz +/avocado-48.0.tar.gz +/avocado-49.0.tar.gz +/avocado-50.0.tar.gz +/avocado-51.0.tar.gz +/avocado-52.0.tar.gz +/avocado-52.1.tar.gz +/avocado-61.0.tar.gz +/avocado-62.0.tar.gz +/avocado-63.0.tar.gz +/avocado-64.0.tar.gz +/avocado-65.0.tar.gz +/avocado-66.0.tar.gz +/avocado-67.0.tar.gz +/avocado-68.0.tar.gz +/avocado-69.0.tar.gz +/avocado-70.0.tar.gz +/avocado-71.0.tar.gz +/avocado-72.0.tar.gz +/avocado-73.0.tar.gz +/avocado-74.0.tar.gz +/avocado-75.1.tar.gz +/avocado-76.0.tar.gz +/avocado-77.0.tar.gz +/avocado-78.0.tar.gz +/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 diff --git a/dead.package b/dead.package deleted file mode 100644 index 505b74d..0000000 --- a/dead.package +++ /dev/null @@ -1 +0,0 @@ -Retired: Fails to install: https://pagure.io/releng/issue/12969 diff --git a/python-avocado.spec b/python-avocado.spec new file mode 100644 index 0000000..4c1803a --- /dev/null +++ b/python-avocado.spec @@ -0,0 +1,699 @@ +# Conditional for release vs. snapshot builds. Set to 1 for release build. +%if ! 0%{?rel_build:1} + %global rel_build 1 +%endif + +# Settings used for build from snapshots. +%if 0%{?rel_build} + %global gitref %{version} + %global gittar avocado-%{version}.tar.gz +%else + %if ! 0%{?commit:1} + %global commit 5b21f030001d6eed69c0357cc45b6128c73dc860 + %endif + %if ! 0%{?commit_date:1} + %global commit_date 20240819 + %endif + %global shortcommit %(c=%{commit};echo ${c:0:9}) + %global gitrel .%{commit_date}git%{shortcommit} + %global gitref %{commit} + %global gittar avocado-%{shortcommit}.tar.gz +%endif + +# Selftests are provided but may need to be skipped because many of +# 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 + +# resultsdb is not available for RHEL +%if ! 0%{?rhel} +%global with_resultsdb 1 +%else +%global with_resultsdb 0 +%endif + +Name: python-avocado +Version: 92.3 +Release: 6%{?gitrel}%{?dist} +Summary: Framework with tools and libraries for Automated Testing +# Found licenses: +# avocado/core/tapparser.py: MIT +# avocado/utils/external/gdbmi_parser.py: MIT +# avocado/utils/external/spark.py: MIT +# optional_plugins/html/avocado_result_html/templates/bootstrap.min.css: MIT +# optional_plugins/html/avocado_result_html/templates/bootstrap.min.js: MIT +# selftests/.data/jenkins-junit.xsd: MIT +# Other files: GPLv2 and GPLv2+ +License: GPL-2.0-or-later AND GPL-2.0-only AND MIT +URL: https://avocado-framework.github.io/ +Source0: https://github.com/avocado-framework/avocado/archive/%{gitref}/%{gittar} +BuildArch: noarch + +BuildRequires: kmod +BuildRequires: procps-ng +BuildRequires: python3-devel +BuildRequires: python3-docutils +BuildRequires: python3-jinja2 +BuildRequires: python3-lxml +BuildRequires: python3-psutil +BuildRequires: python3-setuptools +%if %{with_resultsdb} +BuildRequires: python3-resultsdb_api +BuildRequires: python3-pycdlib +%endif + +%if 0%{?with_tests} +BuildRequires: genisoimage +BuildRequires: libcdio +BuildRequires: psmisc +%if ! 0%{?rhel} +BuildRequires: perl-Test-Harness +%endif +BuildRequires: glibc-all-langpacks +BuildRequires: python3-netifaces +BuildRequires: python3-yaml +%endif +# with_tests + +%description +Avocado is a set of tools and libraries (what people call +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 +%endif +# drop unnecessary install requirement +sed -e "s/'markupsafe<2.0.0', //" -i optional_plugins/html/setup.py +# loosen jinja2 version requirement +sed -e "s/'jinja2<3.0.0'/'jinja2'/" -i optional_plugins/html/setup.py +# loosen pyyaml version requirement +sed -e "s/'PyYAML>=4.2b2,<6.0.2'/'PyYAML>=4.2b2'/" -i optional_plugins/varianter_yaml_to_mux/setup.py + +%build +%py3_build +pushd optional_plugins/html + %py3_build +popd +%if %{with_resultsdb} +pushd optional_plugins/resultsdb + %py3_build +popd +%endif +pushd optional_plugins/varianter_yaml_to_mux + %py3_build +popd +pushd optional_plugins/golang + %py3_build +popd +pushd optional_plugins/varianter_pict + %py3_build +popd +pushd optional_plugins/varianter_cit + %py3_build +popd +pushd optional_plugins/result_upload + %py3_build +popd +rst2man man/avocado.rst man/avocado.1 + +%install +%py3_install +for exe in \ + avocado \ + avocado-runner \ + avocado-runner-noop \ + avocado-runner-dry-run \ + 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-software-manager +do + mv %{buildroot}%{_bindir}/$exe %{buildroot}%{_bindir}/$exe-%{python3_version} + ln -s $exe-%{python3_version} %{buildroot}%{_bindir}/$exe-3 + ln -s $exe-%{python3_version} %{buildroot}%{_bindir}/$exe +done +# configuration is held at /etc/avocado only and part of the +# python-avocado-common package +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 +%if %{with_resultsdb} +pushd optional_plugins/resultsdb + %py3_install +popd +%endif +pushd optional_plugins/varianter_yaml_to_mux + %py3_install +popd +pushd optional_plugins/golang + %py3_install +popd +pushd optional_plugins/varianter_pict + %py3_install +popd +pushd optional_plugins/varianter_cit + %py3_install +popd +pushd optional_plugins/result_upload + %py3_install +popd +# cleanup plugin test cruft +rm -rf %{buildroot}%{python3_sitelib}/tests +mkdir -p %{buildroot}%{_sysconfdir}/avocado +cp -r avocado/etc/avocado/scripts %{buildroot}%{_sysconfdir}/avocado/scripts +cp -r avocado/etc/avocado/sysinfo %{buildroot}%{_sysconfdir}/avocado/sysinfo +mkdir -p %{buildroot}%{_libexecdir}/avocado +cp avocado/libexec/avocado-bash-utils %{buildroot}%{_libexecdir}/avocado/avocado-bash-utils +cp avocado/libexec/avocado_debug %{buildroot}%{_libexecdir}/avocado/avocado_debug +cp avocado/libexec/avocado_error %{buildroot}%{_libexecdir}/avocado/avocado_error +cp avocado/libexec/avocado_info %{buildroot}%{_libexecdir}/avocado/avocado_info +cp avocado/libexec/avocado_warn %{buildroot}%{_libexecdir}/avocado/avocado_warn +mkdir -p %{buildroot}%{_mandir}/man1 +install -m 0644 man/avocado.1 %{buildroot}%{_mandir}/man1/avocado.1 +mkdir -p %{buildroot}%{_pkgdocdir} +install -m 0644 README.rst %{buildroot}%{_pkgdocdir} +install -d -m 0755 %{buildroot}%{_sharedstatedir}/avocado/data +# place examples in documentation directory +install -d -m 0755 %{buildroot}%{_docdir}/avocado +cp -r examples/gdb-prerun-scripts %{buildroot}%{_docdir}/avocado/gdb-prerun-scripts +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 +find %{buildroot}%{_docdir}/avocado -type f -name '*.py' -exec chmod -c -x {} ';' + + +%if 0%{?with_tests} +%check + # 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 + PATH=%{buildroot}%{_bindir}:%{buildroot}%{_libexecdir}/avocado:$PATH \ + PYTHONPATH=%{buildroot}%{python3_sitelib}:. \ + LANG=en_US.UTF-8 \ + AVOCADO_CHECK_LEVEL=0 \ + %{python3} selftests/check.py --job-api --nrunner-interface \ + --unit --jobs --functional --optional-plugins \ + --disable-plugin-checks robot +%endif + + +%package -n python3-avocado +Summary: %{summary} +Requires: python-avocado-common == %{version}-%{release} +Requires: gdb +Requires: gdb-gdbserver +Requires: procps-ng +%if ! 0%{?rhel} +Requires: python3-pycdlib +%endif + +%description -n python3-avocado +Avocado is a set of tools and libraries (what people call +these days a framework) to perform automated testing. + +%files -n python3-avocado +%license LICENSE +%{_pkgdocdir}/README.rst +%{python3_sitelib}/avocado/ +%{python3_sitelib}/avocado_framework-%{version}-py%{python3_version}.egg-info +%{_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-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 +%{_bindir}/avocado-runner-python-unittest-%{python3_version} +%{_bindir}/avocado-runner-python-unittest-3 +%{_bindir}/avocado-runner-python-unittest +%{_bindir}/avocado-runner-avocado-instrumented-%{python3_version} +%{_bindir}/avocado-runner-avocado-instrumented-3 +%{_bindir}/avocado-runner-avocado-instrumented +%{_bindir}/avocado-runner-tap-%{python3_version} +%{_bindir}/avocado-runner-tap-3 +%{_bindir}/avocado-runner-tap +%{_bindir}/avocado-runner-requirement-asset-%{python3_version} +%{_bindir}/avocado-runner-requirement-asset-3 +%{_bindir}/avocado-runner-requirement-asset +%{_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 + + +%package -n python-avocado-common +Summary: Avocado common files +# Automatically converted from old format: GPLv2+ - review is highly recommended. +License: GPL-2.0-or-later + +%description -n python-avocado-common +Common files (such as configuration) for the Avocado Testing Framework. + +%files -n python-avocado-common +%license LICENSE +%{_mandir}/man1/avocado.1.gz +%dir %{_docdir}/avocado +%dir %{_sharedstatedir}/avocado +%dir %{_sysconfdir}/avocado +%dir %{_sysconfdir}/avocado/sysinfo +%dir %{_sysconfdir}/avocado/scripts +%dir %{_sysconfdir}/avocado/scripts/job +%dir %{_sysconfdir}/avocado/scripts/job/pre.d +%dir %{_sysconfdir}/avocado/scripts/job/post.d +%config(noreplace) %{_sysconfdir}/avocado/sysinfo/commands +%config(noreplace) %{_sysconfdir}/avocado/sysinfo/files +%config(noreplace) %{_sysconfdir}/avocado/sysinfo/profilers +%{_sysconfdir}/avocado/scripts/job/pre.d/README +%{_sysconfdir}/avocado/scripts/job/post.d/README + + +%package -n python3-avocado-plugins-output-html +Summary: Avocado HTML report plugin +License: GPL-2.0-or-later AND MIT +Requires: python3-avocado == %{version}-%{release} + +%description -n python3-avocado-plugins-output-html +Adds to avocado the ability to generate an HTML report at every job results +directory. It also gives the user the ability to write a report on an +arbitrary filesystem location. + +%files -n python3-avocado-plugins-output-html +%{python3_sitelib}/avocado_result_html/ +%{python3_sitelib}/avocado_framework_plugin_result_html-%{version}-py%{python3_version}.egg-info + + +%if %{with_resultsdb} +%package -n python3-avocado-plugins-resultsdb +Summary: Avocado plugin to propagate job results to ResultsDB +# Automatically converted from old format: GPLv2+ - review is highly recommended. +License: GPL-2.0-or-later +Requires: python3-avocado == %{version}-%{release} + +%description -n python3-avocado-plugins-resultsdb +Allows Avocado to send job results directly to a ResultsDB +server. + +%files -n python3-avocado-plugins-resultsdb +%{python3_sitelib}/avocado_resultsdb/ +%{python3_sitelib}/avocado_framework_plugin_resultsdb-%{version}-py%{python3_version}.egg-info +%endif +# with_resultsdb + + +%package -n python3-avocado-plugins-varianter-yaml-to-mux +Summary: Avocado plugin to generate variants out of yaml files +# Automatically converted from old format: GPLv2+ - review is highly recommended. +License: GPL-2.0-or-later +Requires: python3-avocado == %{version}-%{release} + +%description -n python3-avocado-plugins-varianter-yaml-to-mux +Can be used to produce multiple test variants with test parameters +defined in a yaml file(s). + +%files -n python3-avocado-plugins-varianter-yaml-to-mux +%{python3_sitelib}/avocado_varianter_yaml_to_mux/ +%{python3_sitelib}/avocado_framework_plugin_varianter_yaml_to_mux-%{version}-py%{python3_version}.egg-info + + +%package -n python3-avocado-plugins-golang +Summary: Avocado plugin for execution of golang tests +# Automatically converted from old format: GPLv2+ - review is highly recommended. +License: GPL-2.0-or-later +Requires: python3-avocado == %{version}-%{release} +Requires: golang + +%description -n python3-avocado-plugins-golang +Allows Avocado to list golang tests, and if golang is installed, +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 + + +%package -n python3-avocado-plugins-varianter-pict +Summary: Varianter with combinatorial capabilities by PICT +# Automatically converted from old format: GPLv2+ - review is highly recommended. +License: GPL-2.0-or-later +Requires: python3-avocado == %{version}-%{release} + +%description -n python3-avocado-plugins-varianter-pict +This plugin uses a third-party tool to provide variants created by +Pair-Wise algorithms, also known as Combinatorial Independent Testing. + +%files -n python3-avocado-plugins-varianter-pict +%{python3_sitelib}/avocado_varianter_pict/ +%{python3_sitelib}/avocado_framework_plugin_varianter_pict-%{version}-py%{python3_version}.egg-info + + +%package -n python3-avocado-plugins-varianter-cit +Summary: Varianter with Combinatorial Independent Testing capabilities +# Automatically converted from old format: GPLv2+ - review is highly recommended. +License: GPL-2.0-or-later +Requires: python3-avocado == %{version}-%{release} + +%description -n python3-avocado-plugins-varianter-cit +A varianter plugin that generates variants using Combinatorial +Independent Testing (AKA Pair-Wise) algorithm developed in +collaboration with CVUT Prague. + +%files -n python3-avocado-plugins-varianter-cit +%{python3_sitelib}/avocado_varianter_cit/ +%{python3_sitelib}/avocado_framework_plugin_varianter_cit-%{version}-py%{python3_version}.egg-info + + +%package -n python3-avocado-plugins-result-upload +Summary: Avocado plugin propagate job results to a remote host +# Automatically converted from old format: GPLv2+ - review is highly recommended. +License: GPL-2.0-or-later +Requires: python3-avocado == %{version}-%{release} + +%description -n python3-avocado-plugins-result-upload +This optional plugin is intended to upload the Avocado Job results to +a dedicated sever. + +%files -n python3-avocado-plugins-result-upload +%{python3_sitelib}/avocado_result_upload/ +%{python3_sitelib}/avocado_framework_plugin_result_upload-%{version}-py%{python3_version}.egg-info + + +%package -n python-avocado-examples +Summary: Avocado Test Framework Example Tests +# Automatically converted from old format: GPLv2+ - review is highly recommended. +License: GPL-2.0-or-later +# documentation does not require main package, but needs to be in lock-step if present +Conflicts: python3-avocado < %{version}-%{release}, python3-avocado > %{version}-%{release} + +%description -n python-avocado-examples +The set of example tests present in the upstream tree of the Avocado framework. +Some of them are used as functional tests of the framework, others serve as +examples of how to write tests on your own. + +%files -n python-avocado-examples +%license LICENSE +%dir %{_docdir}/avocado +%{_docdir}/avocado/gdb-prerun-scripts +%{_docdir}/avocado/plugins +%{_docdir}/avocado/tests +%{_docdir}/avocado/varianter_cit +%{_docdir}/avocado/varianter_pict +%{_docdir}/avocado/wrappers +%{_docdir}/avocado/yaml_to_mux + + +%package -n python-avocado-bash +Summary: Avocado Test Framework Bash Utilities +License: GPL-2.0-or-later AND GPL-2.0-only +Requires: python-avocado-common == %{version}-%{release} + +%description -n python-avocado-bash +A small set of utilities to interact with Avocado from the Bourne +Again Shell code (and possibly other similar shells). + +%files -n python-avocado-bash +%license LICENSE +%dir %{_libexecdir}/avocado +%{_libexecdir}/avocado/avocado-bash-utils +%{_libexecdir}/avocado/avocado_debug +%{_libexecdir}/avocado/avocado_error +%{_libexecdir}/avocado/avocado_info +%{_libexecdir}/avocado/avocado_warn + + +%changelog +* Fri Jul 25 2025 Fedora Release Engineering - 92.3-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + +* Tue Jun 03 2025 Python Maint - 92.3-5 +- Rebuilt for Python 3.14 + +* Mon Jan 20 2025 Miro Hrončok - 92.3-4 +- Loosen the PyYAML version requirement in python3-avocado-plugins-varianter-yaml-to-mux + +* Mon Jan 20 2025 Cleber Rosa - 92.3-3 +- convert remaining licenses to SPDX + +* Sat Jan 18 2025 Fedora Release Engineering - 92.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + +* Mon Aug 19 2024 Cleber Rosa - 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ý - 92.1-8 +- convert license to SPDX + +* Fri Jul 19 2024 Fedora Release Engineering - 92.1-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Fri Jun 07 2024 Python Maint - 92.1-6 +- Rebuilt for Python 3.13 + +* Mon Jan 29 2024 Fedora Release Engineering - 92.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Fri Jan 26 2024 Fedora Release Engineering - 92.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Sun Jan 21 2024 Fedora Release Engineering - 92.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Fri Jul 21 2023 Fedora Release Engineering - 92.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Mon Jul 17 2023 Cleber Rosa - 92.1-1 +- Updated to 92.1 +- Support building and running under Python 3.12 for F39 + +* Wed Jun 14 2023 Python Maint - 92.0-3 +- Rebuilt for Python 3.12 + +* Fri Jan 20 2023 Fedora Release Engineering - 92.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Tue Aug 9 2022 Cleber Rosa - 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 - 82.0-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Tue Jun 21 2022 Python Maint - 82.0-6 +- Rebuilt for Python 3.11 + +* Fri Jan 21 2022 Fedora Release Engineering - 82.0-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Wed Jul 28 2021 Merlin Mathesius - 82.0-4 +- Loosen jinja2 version requirement to fix FTBFS in Rawhide + +* Fri Jul 23 2021 Fedora Release Engineering - 82.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Thu Mar 18 2021 Merlin Mathesius - 82.0-2 +- Drop obsolete packages from BuildRequires +- Generate man page directly using 'rst2man' rather than requiring 'make' +- Adjust PATH to make sure self-tests find internal modules +- Spec file cleanup following package review. + +* Mon Sep 14 2020 Cleber Rosa - 82.0-1 +- Sync with upstream release 82.0. +- Removed python libvirt depedency as the vm runner has been removed + upstream +- Dropped configuration files to sync with upstream which made them + optional and doesn't ship them anymore +- Add on extra character to short commit to sync with upstream + +* Sat Jun 6 2020 Cleber Rosa - 80.0-1 +- Sync with upstream release 80.0. +- Dropped use of custom avocado command for tests +- Do not build deprecated runners + +* Tue May 12 2020 Cleber Rosa - 79.0-1 +- Sync with upstream release 79.0. +- Added Python's user base bin dir to the PATH environment variable + while running tests, so that avocado-runner-* scripts can be found +- Moved comment to new lines closing the conditionals, to avoid + errors from rpmlint and rpmbuild + +* Wed Apr 15 2020 Merlin Mathesius - 78.0-1 +- Sync with upstream release 78.0. + +* Tue Mar 17 2020 Merlin Mathesius - 77.0-1 +- Sync with upstream release 77.0. + +* Mon Mar 09 2020 Merlin Mathesius - 76.0-1 +- Sync with upstream release 76.0. + +* Mon Jan 20 2020 Merlin Mathesius - 75.1-1 +- Sync with upstream release 75.1. + +* Mon Dec 23 2019 Merlin Mathesius - 74.0-1 +- Sync with upstream release 74.0. + +* Wed Nov 27 2019 Merlin Mathesius - 73.0-1 +- Sync with upstream release 73.0. +- Adjustments to build for RHEL 8. + +* Wed Oct 02 2019 Merlin Mathesius - 72.0-1 +- Sync with upstream release 72.0. + +* Wed Aug 28 2019 Merlin Mathesius - 71.0-1 +- Sync with upstream release 71.0. + +* Wed Jun 26 2019 Merlin Mathesius - 70.0-1 +- Sync with upstream release 70.0. +- Drop all Python 2 support from SPEC file. + +* Wed May 22 2019 Merlin Mathesius - 69.0-4 +- pyliblzma is Python 2-only and no longer available as of F31. +- Unversioned executables should now be Python 3. + +* Mon May 20 2019 Merlin Mathesius - 69.0-3 +- Drop Python 2 support from F31 and RHEL8 onward. +- Disable components dependent upon Fiber in Fedora 31 and later, + since avocado is currently incompatible with the new Fiber API. + +* Tue Mar 19 2019 Merlin Mathesius - 69.0-2 +- python2-sphinx is no longer available or needed as of F31 + +* Wed Feb 27 2019 Merlin Mathesius - 69.0-1 +- Sync with upstream release 69.0. + +* Fri Feb 22 2019 Merlin Mathesius - 68.0-1 +- Sync with upstream release 68.0. + +* Thu Jan 31 2019 Merlin Mathesius - 67.0-1 +- Sync with upstream release 67.0. +- genisoimage, libcdio, and psmisc added as build deps so iso9660 tests run. +- Replace pystache requirement with jinja2. +- glibc-all-langpacks added as build dep for F30+ so vmimage tests run. +- python2-resultsdb_api package has been removed in F30 so + python2-avocado-plugins-resultsdb was also disabled. + +* Wed Nov 21 2018 Merlin Mathesius - 66.0-1 +- Sync with upstream release 66.0. +- python2-pycdlib package has been removed in F30 as part of + https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal + +* Thu Oct 04 2018 Merlin Mathesius - 65.0-1 +- Sync with upstream release 65.0. + +* Tue Aug 28 2018 Merlin Mathesius - 64.0-1 +- Sync with upstream release 64.0. + +* Thu Jul 26 2018 Merlin Mathesius - 63.0-2 +- Added missing python[2]-enum34 requirement. + +* Mon Jul 23 2018 Merlin Mathesius - 63.0-1 +- Sync with upstream release 63.0. (BZ#1602175) + Include upstream patches needed to build for Rawhide. + +* Wed Jun 13 2018 Merlin Mathesius - 62.0-1 +- Sync with upstream release 62.0. (BZ#1590572) +- Correct libvirt dependency for EPEL7/RHEL7 + +* Thu May 17 2018 Merlin Mathesius - 61.0-1 +- Sync with upstream release 61.0. +- Packaging updates for Python 3. +- Reorganize SPEC file. + +* Mon Apr 9 2018 Cleber Rosa - 52.1-2 +- Added Fedora CI tests + +* Tue Apr 03 2018 Merlin Mathesius - 52.1-1 +- Sync with upstream release 52.1 (LTS series). +- Correct deprecated use of unversioned python. + +* Mon Mar 26 2018 Iryna Shcherbina - 52.0-5 +- Update Python 2 dependency declarations to new packaging standards + (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3) + +* Fri Feb 09 2018 Fedora Release Engineering - 52.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Wed Aug 09 2017 Merlin Mathesius - 52.0-3 +- Fix FTBFS error by disabling selfcheck producing false failures +- Update SPEC to use pkgname instead of srcname macro where appropriate + +* Thu Jul 27 2017 Fedora Release Engineering - 52.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Thu Jun 29 2017 Merlin Mathesius - 52.0-1 +- Sync with upstream release 52.0. (BZ#1465409) + +* Wed Jun 14 2017 Merlin Mathesius - 51.0-1 +- Sync with upstream release 51.0. (BZ#1460837) +- 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. + +* Tue Apr 25 2017 Merlin Mathesius - 49.0-1 +- Sync with upstream release 49.0. (BZ#1431413) + +* Tue Apr 18 2017 Merlin Mathesius - 48.0-1 +- Sync with upstream release 48.0. (BZ#1431413) +- Allow rel_build macro to be defined outside of the SPEC file. + +* Mon Mar 27 2017 Merlin Mathesius - 47.0-1 +- Sync with upstream release 47.0. +- Enable self-tests during build. +- Add example test to be run by Taskotron. + +* Mon Feb 27 2017 Merlin Mathesius - 46.0-2 +- Incorporate upstream SPEC file changes to split plugins into subpackages. +- Remove obsolete CC-BY-SA license, which went away with the halflings font. + +* Tue Feb 14 2017 Merlin Mathesius - 46.0-1 +- Sync with upstream release 46.0. +- Remove halflings license since font was removed from upstream. +- SPEC updates to easily switch between release and snapshot builds. + +* Sat Feb 11 2017 Fedora Release Engineering - 43.0-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Tue Jan 10 2017 Merlin Mathesius - 43.0-7 +- SPEC updates to build and install for EPEL. + +* Mon Nov 21 2016 Merlin Mathesius - 43.0-6 +- Initial packaging for Fedora. diff --git a/sources b/sources new file mode 100644 index 0000000..4a738a2 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (avocado-92.3.tar.gz) = 97a0c113bc826537a02ebf6efcd7cf49b505a93e5fd9686c3a4c7e70902f2d367f78eb2fb23ddf9253b97f45e27b2e328fd6bd1c420ecbeb59e25e991b29c262 diff --git a/tests/gdbtest.py b/tests/gdbtest.py new file mode 100755 index 0000000..c0cdc55 --- /dev/null +++ b/tests/gdbtest.py @@ -0,0 +1,347 @@ +import os + +from avocado import Test +from avocado.utils import gdb, genio, process + + +class GdbTest(Test): + + """ + Execute the gdb test + + :avocado: tags=requires_c_compiler + """ + + VALID_CMDS = ["-list-target-features", + "-break-info", + "-break-list", + "-thread-info", + "-stack-info-frame", + "-stack-info-depth"] + + INVALID_CMDS = ["-foobar", + "-magic8ball", + "-find-me-the-bug", + "-auto-debug-it"] + + def setUp(self): + 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): # pylint: disable=W0621 + """ + Checks if a process is still alive + + :param process: a :class:`subprocess.POpen` instance + :type process: :class:`subprocess.POpen` + :returns: True or False + :rtype: bool + """ + return process.poll() is None + + def test_start_exit(self): + """ + Tests execution of multiple GDB instances without any blocking or race + """ + self.log.info("Testing execution of multiple GDB instances") + process_count = 10 + gdb_instances = [] + for i in range(0, process_count): + gdb_instances.append(gdb.GDB()) + + for i in range(0, process_count): + self.assertEqual(gdb_instances[i].exit(), 0) + + def test_existing_commands_raw(self): + """ + Tests the GDB response to commands that exist and to those that do not + """ + g = gdb.GDB() + self.log.info("Testing existing (valid) GDB commands using raw commands") + for cmd in self.VALID_CMDS: + 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 = f"-info-gdb-mi-command {cmd[1:]}" + r = g.cmd(info_cmd) + self.assertEqual(r.result.result.command.exists, 'false') + + def test_existing_commands(self): + g = gdb.GDB() + + self.log.info("Testing existing (valid) GDB commands using utility " + "methods") + for cmd in self.VALID_CMDS: + self.assertTrue(g.cmd_exists(cmd)) + g.cmd(cmd) + + self.log.info("Testing non-existing (invalid) GDB commands using " + "utility methods") + for cmd in self.INVALID_CMDS: + self.assertFalse(g.cmd_exists(cmd)) + + def test_load_set_breakpoint_run_exit_raw(self): + """ + Test a common GDB cycle using raw commands: load, set break, run, exit + """ + self.log.info("Testing that GDB loads a file and sets a breakpoint") + g = gdb.GDB() + + file_cmd = f"-file-exec-and-symbols {self.return99_binary_path}" + r = g.cmd(file_cmd) + self.assertEqual(r.result.class_, 'done') + + break_cmd = "-break-insert 5" + r = g.cmd(break_cmd) + self.assertEqual(r.result.class_, 'done') + self.assertEqual(r.result.result.bkpt.number, '1') + self.assertEqual(r.result.result.bkpt.enabled, 'y') + + break_del_cmd = "-break-delete 1" + r = g.cmd(break_del_cmd) + self.assertEqual(r.result.class_, 'done') + + run_cmd = "-exec-run" + r = g.cmd(run_cmd) + self.assertEqual(r.result.class_, 'running') + + g.cmd("-gdb-exit") + self.assertEqual(g.process.wait(), 0) + + def test_load_set_breakpoint_run_exit(self): + """ + Test a common GDB cycle: load, set break, delete break, run, exit + """ + self.log.info("Testing a common GDB cycle") + g = gdb.GDB() + g.set_file(self.return99_binary_path) + g.set_break("5") + g.del_break(1) + g.run() + g.exit() + + def test_generate_core(self): + """ + Load a file that will cause a segfault and produce a core dump + """ + self.log.info("Testing that a core dump will be generated") + + g = gdb.GDB() + file_cmd = f"-file-exec-and-symbols {self.segfault_binary_path}" + r = g.cmd(file_cmd) + self.assertEqual(r.result.class_, 'done') + + run_cmd = "-exec-run" + r = g.cmd(run_cmd) + self.assertEqual(r.result.class_, 'running') + + other_messages = g.read_until_break() + core_path = None + for msg in other_messages: + 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 = 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') + + self.assertTrue(os.path.exists(core_path)) + g.exit() + + def test_set_multiple_break(self): + """ + Tests that multiple breakpoints do not interfere with each other + """ + self.log.info("Testing setting multiple breakpoints") + g = gdb.GDB() + g.set_file(self.return99_binary_path) + g.set_break('empty') + g.set_break('7') + g.exit() + + def test_disconnect_raw(self): + """ + Connect/disconnect repeatedly from a remote debugger using raw commands + """ + self.log.info("Testing connecting and disconnecting repeatedly using " + "raw commands") + s = gdb.GDBServer() + g = gdb.GDB() + + # Do 100 cycle of target (kind of connects) and disconnects + for _ in range(0, 100): + 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 = f'-target-select extended-remote :{s.port}' + r = g.cmd(cmd) + self.assertEqual(r.result.class_, 'connected') + r = g.cli_cmd('monitor exit') + self.assertEqual(r.result.class_, 'done') + + g.exit() + s.exit() + + def test_disconnect(self): + """ + Connect/disconnect repeatedly from a remote debugger using utilities + """ + self.log.info("Testing connecting and disconnecting repeatedly") + s = gdb.GDBServer() + g = gdb.GDB() + + for _ in range(0, 100): + r = g.connect(s.port) + self.assertEqual(r.result.class_, 'connected') + r = g.disconnect() + self.assertEqual(r.result.class_, 'done') + + g.exit() + s.exit() + + def test_remote_exec(self): + """ + Tests execution on a remote target + """ + self.log.info("Testing execution on a remote target") + hit_breakpoint = False + + s = gdb.GDBServer() + g = gdb.GDB() + + cmd = f'-file-exec-and-symbols {self.return99_binary_path}' + r = g.cmd(cmd) + self.assertEqual(r.result.class_, 'done') + + cmd = f'set remote exec-file {self.return99_binary_path}' + r = g.cmd(cmd) + self.assertEqual(r.result.class_, 'done') + + cmd = f"-break-insert {'main'}" + r = g.cmd(cmd) + self.assertEqual(r.result.class_, 'done') + + r = g.cmd('-exec-run') + + other_messages = g.read_until_break() + for msg in other_messages: + parsed_msg = gdb.parse_mi(msg.decode()) + if (hasattr(parsed_msg, 'class_') and + parsed_msg.class_ == 'stopped' and + parsed_msg.result.reason == 'breakpoint-hit'): + hit_breakpoint = True + + self.assertTrue(hit_breakpoint) + g.exit() + s.exit() + + def test_stream_messages(self): + """ + Tests if the expected response appears in the result stream messages + """ + self.log.info("Testing that messages appears in the result stream") + g = gdb.GDB() + r = g.cmd("-gdb-version") + self.assertIn("GNU GPL version", r.get_stream_messages_text()) + + def test_connect_multiple_clients(self): + """ + Tests two or more connections to the same server raise an exception + """ + self.log.info("Testing that multiple clients cannot connect at once") + s = gdb.GDBServer() + c1 = gdb.GDB() + c1.connect(s.port) + c2 = gdb.GDB() + with self.assertRaises(gdb.UnexpectedResponseError): + c2.connect(s.port) + s.exit() + + def test_server_exit(self): + """ + Tests that the server is shutdown by using a monitor exit command + """ + self.log.info("Testing that a single server exits cleanly") + s = gdb.GDBServer() + s.exit() + self.assertFalse(self.is_process_alive(s.process)) + + def test_multiple_servers(self): + """ + Tests multiple server instances without any blocking or race condition + """ + self.log.info("Testing execution of multiple GDB server instances") + process_count = 10 + server_instances = [] + for i in range(0, process_count): + s = gdb.GDBServer() + c = gdb.GDB() + c.connect(s.port) + c.cmd('show-version') + c.disconnect() + server_instances.append(s) + + for i in range(0, process_count): + self.assertTrue(self.is_process_alive(server_instances[i].process)) + server_instances[i].exit() + self.assertFalse(self.is_process_alive(server_instances[i].process)) + + def test_server_stderr(self): + self.log.info('Testing server stderr collection') + s = gdb.GDBServer() + s.exit() + self.assertTrue(os.path.exists(s.stderr_path)) + + stderr_lines = genio.read_all_lines(s.stderr_path) + listening_line = f"Listening on port {s.port}" + self.assertIn(listening_line, stderr_lines) + + def test_server_stdout(self): + self.log.info('Testing server stdout/stderr collection') + s = gdb.GDBServer() + c = gdb.GDB() + c.connect(s.port) + c.set_file(self.return99_binary_path) + c.run() + s.exit() + + self.assertTrue(os.path.exists(s.stdout_path)) + self.assertTrue(os.path.exists(s.stderr_path)) + + stdout_lines = genio.read_all_lines(s.stdout_path) + self.assertIn("return 99", stdout_lines) + + @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(b"qSupported") + r.cmd(b"qfThreadInfo") + s.exit() diff --git a/tests/gdbtest.py.data/return99.c b/tests/gdbtest.py.data/return99.c new file mode 100644 index 0000000..bf14935 --- /dev/null +++ b/tests/gdbtest.py.data/return99.c @@ -0,0 +1,47 @@ +#include +#include + +void empty() +{ +} + +void write_stdout() +{ + fprintf(stdout, "testing output to stdout\n"); +} + +void write_stderr() +{ + fprintf(stderr, "testing output to stderr\n"); +} + +int forkme() +{ + int pid; + + pid = fork(); + if (pid != 0) + pid = fork(); + if (pid != 0) + pid = fork(); + + return pid; +} + +int main(int argc, char *argv[]) +{ + int exit_status = 99; + + if (argc > 1) + exit_status = atoi(argv[1]); + + empty(); + write_stdout(); + write_stderr(); + + if (forkme()) { + fprintf(stdout, "return %i\n", exit_status); + } + + return exit_status; +} diff --git a/tests/gdbtest.py.data/segfault.c b/tests/gdbtest.py.data/segfault.c new file mode 100644 index 0000000..a685f86 --- /dev/null +++ b/tests/gdbtest.py.data/segfault.c @@ -0,0 +1,9 @@ +#include + +int main() +{ + int *p = NULL; + *p = 0xdead; + + return 0; +} diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..7ff61ce --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,25 @@ +- hosts: localhost + roles: + - role: standard-test-avocado + tests: + - gdbtest.py:GdbTest.test_start_exit + - gdbtest.py:GdbTest.test_existing_commands_raw + - gdbtest.py:GdbTest.test_existing_commands + - gdbtest.py:GdbTest.test_load_set_breakpoint_run_exit_raw + - gdbtest.py:GdbTest.test_load_set_breakpoint_run_exit + - gdbtest.py:GdbTest.test_generate_core + - gdbtest.py:GdbTest.test_set_multiple_break + - gdbtest.py:GdbTest.test_disconnect_raw + - gdbtest.py:GdbTest.test_disconnect + - gdbtest.py:GdbTest.test_remote_exec + - gdbtest.py:GdbTest.test_stream_messages + - gdbtest.py:GdbTest.test_connect_multiple_clients + - gdbtest.py:GdbTest.test_server_exit + - gdbtest.py:GdbTest.test_multiple_servers + - gdbtest.py:GdbTest.test_server_stderr + - gdbtest.py:GdbTest.test_server_stdout + - gdbtest.py:GdbTest.test_remote + required_packages: + - gcc + - gdb + - gdb-gdbserver From ee5cf26e92cedda66aa656f5cb9dc608c114953d Mon Sep 17 00:00:00 2001 From: Cleber Rosa Date: Tue, 14 Oct 2025 12:55:50 -0400 Subject: [PATCH 29/29] Sync with upstream release 112.0 Signed-off-by: Cleber Rosa --- .gitignore | 1 + python-avocado.spec | 211 ++++++++++++++++++++++++++++++++------------ sources | 2 +- tests/tests.yml | 10 ++- 4 files changed, 163 insertions(+), 61 deletions(-) diff --git a/.gitignore b/.gitignore index bd8b053..00ef136 100644 --- a/.gitignore +++ b/.gitignore @@ -32,3 +32,4 @@ /avocado-92.1.tar.gz /avocado-92.1-python312.patch /avocado-92.3.tar.gz +/avocado-112.0.tar.gz diff --git a/python-avocado.spec b/python-avocado.spec index 4c1803a..8dd8cf4 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 5b21f030001d6eed69c0357cc45b6128c73dc860 + %global commit e4ede79f097dcc1dbd30e43ffe3b7daf52d2204d %endif %if ! 0%{?commit_date:1} - %global commit_date 20240819 + %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: 92.3 -Release: 6%{?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 @@ -45,7 +47,7 @@ Summary: Framework with tools and libraries for Automated Testing # optional_plugins/html/avocado_result_html/templates/bootstrap.min.js: MIT # selftests/.data/jenkins-junit.xsd: MIT # Other files: GPLv2 and GPLv2+ -License: GPL-2.0-or-later AND GPL-2.0-only AND MIT +License: GPLv2+ and GPLv2 and MIT URL: https://avocado-framework.github.io/ Source0: https://github.com/avocado-framework/avocado/archive/%{gitref}/%{gittar} BuildArch: noarch @@ -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,14 +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 -# loosen jinja2 version requirement -sed -e "s/'jinja2<3.0.0'/'jinja2'/" -i optional_plugins/html/setup.py -# loosen pyyaml version requirement -sed -e "s/'PyYAML>=4.2b2,<6.0.2'/'PyYAML>=4.2b2'/" -i optional_plugins/varianter_yaml_to_mux/setup.py %build %py3_build @@ -109,6 +121,11 @@ 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 @@ -118,22 +135,33 @@ popd pushd optional_plugins/result_upload %py3_build popd +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-dry-run \ 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-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} @@ -145,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 @@ -162,6 +187,11 @@ 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 @@ -171,6 +201,14 @@ popd pushd optional_plugins/result_upload %py3_install popd +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 @@ -194,12 +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 +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. @@ -210,9 +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/check.py --job-api --nrunner-interface \ - --unit --jobs --functional --optional-plugins \ - --disable-plugin-checks robot + %{python3} selftests/check.py --skip static-checks --disable-plugin-checks robot %endif @@ -238,9 +274,6 @@ 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 @@ -259,24 +292,35 @@ 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-requirement-asset-%{python3_version} -%{_bindir}/avocado-runner-requirement-asset-3 -%{_bindir}/avocado-runner-requirement-asset -%{_bindir}/avocado-runner-requirement-package-%{python3_version} -%{_bindir}/avocado-runner-requirement-package-3 -%{_bindir}/avocado-runner-requirement-package +%{_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 Summary: Avocado common files -# Automatically converted from old format: GPLv2+ - review is highly recommended. -License: GPL-2.0-or-later +License: GPLv2+ %description -n python-avocado-common Common files (such as configuration) for the Avocado Testing Framework. @@ -292,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 @@ -301,7 +349,7 @@ Common files (such as configuration) for the Avocado Testing Framework. %package -n python3-avocado-plugins-output-html Summary: Avocado HTML report plugin -License: GPL-2.0-or-later AND MIT +License: GPLv2+ and MIT Requires: python3-avocado == %{version}-%{release} %description -n python3-avocado-plugins-output-html @@ -317,8 +365,7 @@ arbitrary filesystem location. %if %{with_resultsdb} %package -n python3-avocado-plugins-resultsdb Summary: Avocado plugin to propagate job results to ResultsDB -# Automatically converted from old format: GPLv2+ - review is highly recommended. -License: GPL-2.0-or-later +License: GPLv2+ Requires: python3-avocado == %{version}-%{release} %description -n python3-avocado-plugins-resultsdb @@ -334,8 +381,7 @@ server. %package -n python3-avocado-plugins-varianter-yaml-to-mux Summary: Avocado plugin to generate variants out of yaml files -# Automatically converted from old format: GPLv2+ - review is highly recommended. -License: GPL-2.0-or-later +License: GPLv2+ Requires: python3-avocado == %{version}-%{release} %description -n python3-avocado-plugins-varianter-yaml-to-mux @@ -349,8 +395,7 @@ defined in a yaml file(s). %package -n python3-avocado-plugins-golang Summary: Avocado plugin for execution of golang tests -# Automatically converted from old format: GPLv2+ - review is highly recommended. -License: GPL-2.0-or-later +License: GPLv2+ Requires: python3-avocado == %{version}-%{release} Requires: golang @@ -364,10 +409,27 @@ also run them. %{_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 Summary: Varianter with combinatorial capabilities by PICT -# Automatically converted from old format: GPLv2+ - review is highly recommended. -License: GPL-2.0-or-later +License: GPLv2+ Requires: python3-avocado == %{version}-%{release} %description -n python3-avocado-plugins-varianter-pict @@ -381,8 +443,7 @@ Pair-Wise algorithms, also known as Combinatorial Independent Testing. %package -n python3-avocado-plugins-varianter-cit Summary: Varianter with Combinatorial Independent Testing capabilities -# Automatically converted from old format: GPLv2+ - review is highly recommended. -License: GPL-2.0-or-later +License: GPLv2+ Requires: python3-avocado == %{version}-%{release} %description -n python3-avocado-plugins-varianter-cit @@ -397,8 +458,7 @@ collaboration with CVUT Prague. %package -n python3-avocado-plugins-result-upload Summary: Avocado plugin propagate job results to a remote host -# Automatically converted from old format: GPLv2+ - review is highly recommended. -License: GPL-2.0-or-later +License: GPLv2+ Requires: python3-avocado == %{version}-%{release} %description -n python3-avocado-plugins-result-upload @@ -409,11 +469,36 @@ 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-result-mail +Summary: Avocado Mail Notification for Jobs +License: GPLv2+ +Requires: python3-avocado == %{version}-%{release} + +%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-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 -# Automatically converted from old format: GPLv2+ - review is highly recommended. -License: GPL-2.0-or-later +License: GPLv2+ # documentation does not require main package, but needs to be in lock-step if present Conflicts: python3-avocado < %{version}-%{release}, python3-avocado > %{version}-%{release} @@ -430,13 +515,12 @@ 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 %package -n python-avocado-bash Summary: Avocado Test Framework Bash Utilities -License: GPL-2.0-or-later AND GPL-2.0-only +License: GPLv2+ and GPLv2 Requires: python-avocado-common == %{version}-%{release} %description -n python-avocado-bash @@ -454,6 +538,19 @@ Again Shell code (and possibly other similar shells). %changelog +* Fri Oct 10 2025 Cleber Rosa - 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 - 92.3-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild diff --git a/sources b/sources index 4a738a2..6494afc 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (avocado-92.3.tar.gz) = 97a0c113bc826537a02ebf6efcd7cf49b505a93e5fd9686c3a4c7e70902f2d367f78eb2fb23ddf9253b97f45e27b2e328fd6bd1c420ecbeb59e25e991b29c262 +SHA512 (avocado-112.0.tar.gz) = 1872eda730f5cd28f0562732464ce14b2c7731cedb298fcc4b093a04235d26cc5e3db7f92c3ae3edcd6104ad2db4fce66fa7a6148da754e4bdb8120fa12a75a3 diff --git a/tests/tests.yml b/tests/tests.yml index 7ff61ce..be4a031 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -3,8 +3,8 @@ - role: standard-test-avocado tests: - gdbtest.py:GdbTest.test_start_exit - - gdbtest.py:GdbTest.test_existing_commands_raw - gdbtest.py:GdbTest.test_existing_commands + - gdbtest.py:GdbTest.test_existing_commands_raw - gdbtest.py:GdbTest.test_load_set_breakpoint_run_exit_raw - gdbtest.py:GdbTest.test_load_set_breakpoint_run_exit - gdbtest.py:GdbTest.test_generate_core @@ -15,9 +15,13 @@ - gdbtest.py:GdbTest.test_stream_messages - gdbtest.py:GdbTest.test_connect_multiple_clients - gdbtest.py:GdbTest.test_server_exit - - gdbtest.py:GdbTest.test_multiple_servers - - gdbtest.py:GdbTest.test_server_stderr - gdbtest.py:GdbTest.test_server_stdout + - gdbtest.py:GdbTest.test_server_stderr + - gdbtest.py:GdbTest.test_multiple_servers + - gdbtest.py:GdbTest.test_interactive + - gdbtest.py:GdbTest.test_interactive_args + - gdbtest.py:GdbTest.test_exit_status + - gdbtest.py:GdbTest.test_interactive_stdout - gdbtest.py:GdbTest.test_remote required_packages: - gcc