# # spec file for package python-testrepository # # Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # %{?!python_module:%define python_module() python-%{**} python3-%{**}} %define skip_python2 1 Name: python-testrepository Version: 0.0.20 Release: 8.6 Summary: A repository of test results License: BSD-3-Clause OR Apache-2.0 Group: Development/Languages/Python URL: https://github.com/testing-cabal/testrepository Source: https://files.pythonhosted.org/packages/source/t/testrepository/testrepository-%{version}.tar.gz BuildRequires: %{python_module extras} BuildRequires: %{python_module fixtures} BuildRequires: %{python_module pbr} BuildRequires: %{python_module python-mimeparse} BuildRequires: %{python_module python-subunit} BuildRequires: %{python_module pytz} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module testresources} BuildRequires: %{python_module testscenarios} BuildRequires: %{python_module testtools} BuildRequires: fdupes BuildRequires: python-rpm-macros BuildRequires: python3-dbm Requires: python-extras Requires: python-fixtures Requires: python-python-subunit >= 0.0.10 Requires: python-testscenarios Requires: python-testtools >= 0.9.30 Requires(post): update-alternatives Requires(postun): update-alternatives BuildArch: noarch %ifpython3 Requires: python-dbm %endif %python_subpackages %description This project provides a database of test results which can be used as part of developer workflow to ensure/check things like: * No commits without having had a test failure, test fixed cycle. * No commits without new tests being added. * What tests have failed since the last commit (to run just a subset). * What tests are currently failing and need work. Test results are inserted using subunit (and thus anything that can output subunit or be converted into a subunit stream can be accepted). %prep %setup -q -n testrepository-%{version} %build %python_build %install %python_install %python_expand %fdupes %{buildroot}%{$python_sitelib} %python_clone -a %{buildroot}%{_bindir}/testr %check #mv .testr.conf .testr.conf.orig #%%{python_expand # first line can't be empty #rm -rf .testrepository #sed 's/python/$python/' .testr.conf.orig >| .testr.conf #$python ./testr init #$python ./testr run --parallel #} %post %python_install_alternative testr %preun %python_uninstall_alternative testr %files %{python_files} %license COPYING Apache-2.0 BSD %doc NEWS README.txt %python_alternative %{_bindir}/testr %{python_sitelib}/* %changelog * Tue Mar 26 2019 Tomáš Chvátal - Remove accidental runtime dep on python-dbm * Tue Mar 26 2019 Tomáš Chvátal - The tests are failing in the release but work on the git so lets hope there is some release in future that will allow us to enable them * Mon Feb 11 2019 Tomáš Chvátal - Fix the buildrequires to match up properly * Mon Feb 11 2019 John Vandenberg - Add missing dependencies pytz and dbm - Activate tests, currently broken - Fix %%license * Tue Dec 4 2018 Matej Cepl - Remove superfluous devel dependency for noarch package * Wed Jul 5 2017 tbechtold@suse.com - add Requires for python3-dbm * Fri May 19 2017 tbechtold@suse.com - Convert to singlespec * Thu Jul 14 2016 dmueller@suse.com - add license * Mon Jan 11 2016 toddrme2178@gmail.com - Add python-pbr dependency. * Thu Sep 10 2015 tbechtold@suse.com - Fix python-python-subunit Requires version * Tue Sep 16 2014 tbechtold@suse.com - update to version 0.0.20: * Tests will be reliably tagged with worker-%%d. The previous tagging logic had an implicit race - the tag id was looked up via a closure which gets the state of the pos variable at the position the overall loop has advanced too, not the position when the closure was created. (Robert Collins, #1316858) * Passing --subunit to all testr commands will now consistently output subunit v2. Previously it would output v1 for stored streams and v2 for live streams. (Robert Collins) * ``run`` was outputting bad MIME types - test/plain, not text/plain. (Robert Collins) * Test filtering was failing under python3 and would only apply the filters to the first test listed by discover. (Clark Boylan, #1317607) * Tests that are enumerated but not executed will no longer reset the test timing data. Enumeration was incorrectly recording a 0 timestamp for enumerated tests. This leads to poor scheduling after an interrupted test run. (Robert Collins, #1322763) * Version 0.0.18 of subunit is now a hard dependency - the v2 protocol solves key issues in concurrency and stream handling. Users that cannot use subunit v2 can run an older testrepository, or contact upstream to work through whatever issue is blocking them. (Robert Collins) * When list-tests encounters an error, a much clearer response will now be shown. (Robert Collins, #1271133) * The ``get_subunit_stream`` methods now return subunit v2 streams rather than v1 streams, preparing the way for storage of native v2 streams in the repository. (Robert Collins) * ``UI.output_stream`` is now tested for handling of non-utf8 bytestreams. (Robert Collins) * Thu Feb 13 2014 speilicke@suse.com - Implement update-alternatives * Thu Jan 30 2014 dmueller@suse.com - fix requires * Sun Nov 17 2013 p.drouand@gmail.com - Update to version 0.0.18 + ``run`` now accepts ``--isolated`` as a parameter, which will cause each selected test to be run independently. This can be useful to both workaround isolation bugs and detect tests that can not be run independently. + ``capture_ids`` in test_run now returns a list of captures, permitting tests that need to test multiple runs to do so. * Thu Oct 24 2013 speilicke@suse.com - Require python-setuptools instead of distribute (upstreams merged) * Fri Jul 19 2013 dmueller@suse.com - update to 0.0.17: * Restore the ability to import testrepository.repository.memory on Python 2.6. * A new testr.conf option ``group_regex`` can be used for grouping tests so that they get run in the same backend runner. (Matthew Treinish) * Fix Python 3.* support for entrypoints; the initial code was Python3 incompatible. (Robert Collins, Clark Boylan, #1187192) * Switch to using multiprocessing to determine CPU counts. (Chris Jones, #1092276) * The cli UI now has primitive differentiation between multiple stream types. This is not yet exposed to the end user, but is sufficient to enable the load command to take interactive input without it reading from the raw subunit stream on stdin. (Robert Collins) * The scheduler can now groups tests together permitting co-dependent tests to always be scheduled onto the same backend. Note that this does not force co-dependent tests to be executed, so partial test runs (e.g. --failing) may still fail. (Matthew Treinish, Robert Collins) * When test listing fails, testr will now report an error rather than incorrectly trying to run zero tests. A test listing failure is detected by the returncode of the test listing process. (Robert Collins, #1185231) * Thu Jul 11 2013 dmueller@suse.com - tighten runtime requires * Tue Apr 30 2013 dmueller@suse.com - add buildrequires to satisfy test suite run * Mon Apr 29 2013 dmueller@suse.com - update to 0.0.15: * Expects subunit v2 if the local library has v2 support in the subunit library. This should be seamless if the system under test shares the Python libraries. If it doesn't, either arrange to use ``subunit-2to1`` or upgrade the subunit libraries for the system under test. * Sat Apr 20 2013 toddrme2178@gmail.com - Add BuildRequires: python-extras * Tue Jan 15 2013 dmueller@suse.com - add requires to python-discover for SLE11 * Tue Jan 15 2013 saschpe@suse.de - Run testsuite - Package some documentation * Tue Jan 15 2013 dmueller@suse.com - Initial package (0.0.13)