3 %bcond_with tests # testr (python 2 only because of bzr dependency, broken as of 0.0.20)
4 %bcond_without python2 # CPython 2.x module
5 %bcond_without python3 # CPython 3.x module
7 Summary: A repository of test results
8 Summary(pl.UTF-8): Repozytorium wyników testów
9 Name: python-testrepository
12 License: Apache v2.0 or BSD
13 Group: Libraries/Python
14 #Source0Download: https://pypi.org/simple/testrepository/
15 Source0: https://pypi.python.org/packages/source/t/testrepository/testrepository-%{version}.tar.gz
16 # Source0-md5: f648b0aceeca4fcd5f8a62eeedea289b
17 URL: https://launchpad.net/testrepository
18 BuildRequires: rpm-pythonprov
19 BuildRequires: rpmbuild(macros) >= 1.714
21 BuildRequires: python-modules >= 1:2.6
22 BuildRequires: python-setuptools
24 BuildRequires: python-bzr
25 BuildRequires: python-fixtures
26 BuildRequires: python-pytz
27 BuildRequires: python-subunit >= 0.0.18
28 BuildRequires: python-testresources
29 BuildRequires: python-testscenarios
30 BuildRequires: python-testtools >= 0.9.30
34 BuildRequires: python3-modules >= 1:3.2
35 BuildRequires: python3-setuptools
36 # no bzr for python3, so no tests
37 %if %{with python3_tests}
38 BuildRequires: python3-bzr
39 BuildRequires: python3-fixtures
40 BuildRequires: python3-pytz
41 BuildRequires: python3-subunit >= 0.0.18
42 BuildRequires: python3-testresources
43 BuildRequires: python3-testscenarios
44 BuildRequires: python3-testtools >= 0.9.30
47 Requires: python-modules >= 1:2.6
49 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
52 This project provides a database of test results which can be used as
53 part of developer workflow to ensure/check things like:
54 - No commits without having had a test failure, test fixed cycle.
55 - No commits without new tests being added.
56 - What tests have failed since the last commit (to run just a subset).
57 - What tests are currently failing and need work.
59 Test results are inserted using subunit (and thus anything that can
60 output subunit or be converted into a subunit stream can be accepted).
62 %description -l pl.UTF-8
63 Ten projekt zapewnia bazę danych wyników testów, które można używać
64 jako część ciągu pracy programistów, mającą na celu
65 zapewnienie/sprawdzenie, że:
66 - nie wejdą zmiany bez naprawienia nieprzechodzących testów
67 - nie wejdą zmiany bez dodania nowych testów
68 - które testy nie powiodły się od ostatnich zmian (aby uruchomić
70 - które testy obecnie nie przechodzą i wymagają pracy
72 Wyniki testów są wprowadzane przy użyciu modułu subunit (więc może być
73 przyjęte wszystko, co na wyjściu ma format subunit albo może być
74 przekonwertowane do takiego strumienia).
76 %package -n python3-testrepository
77 Summary: A repository of test results
78 Summary(pl.UTF-8): Repozytorium wyników testów
79 Group: Libraries/Python
80 Requires: python3-modules >= 1:3.2
82 %description -n python3-testrepository
83 This project provides a database of test results which can be used as
84 part of developer workflow to ensure/check things like:
85 - No commits without having had a test failure, test fixed cycle.
86 - No commits without new tests being added.
87 - What tests have failed since the last commit (to run just a subset).
88 - What tests are currently failing and need work.
90 Test results are inserted using subunit (and thus anything that can
91 output subunit or be converted into a subunit stream can be accepted).
93 %description -n python3-testrepository -l pl.UTF-8
94 Ten projekt zapewnia bazę danych wyników testów, które można używać
95 jako część ciągu pracy programistów, mającą na celu
96 zapewnienie/sprawdzenie, że:
97 - nie wejdą zmiany bez naprawienia nieprzechodzących testów
98 - nie wejdą zmiany bez dodania nowych testów
99 - które testy nie powiodły się od ostatnich zmian (aby uruchomić
101 - które testy obecnie nie przechodzą i wymagają pracy
103 Wyniki testów są wprowadzane przy użyciu modułu subunit (więc może być
104 przyjęte wszystko, co na wyjściu ma format subunit albo może być
105 przekonwertowane do takiego strumienia).
108 %setup -q -n testrepository-%{version}
113 %{?with_tests:%{__python} testr init && %{__python} testr run}
117 %py3_build %{?with_tests:test}
118 %{?with_python3_tests:%{__python3} testr init && %{__python3} testr run}
122 rm -rf $RPM_BUILD_ROOT
126 %{__mv} $RPM_BUILD_ROOT%{_bindir}/testr{,-2}
129 %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/testrepository/tests
134 %{__mv} $RPM_BUILD_ROOT%{_bindir}/testr{,-3}
136 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/testrepository/tests
140 ln -sf testr-2 $RPM_BUILD_ROOT%{_bindir}/testr
144 rm -rf $RPM_BUILD_ROOT
148 %defattr(644,root,root,755)
149 %doc BSD COPYING NEWS README.txt doc
150 %attr(755,root,root) %{_bindir}/testr
151 %attr(755,root,root) %{_bindir}/testr-2
152 %{py_sitescriptdir}/testrepository
153 %{py_sitescriptdir}/testrepository-%{version}-py*.egg-info
157 %files -n python3-testrepository
158 %defattr(644,root,root,755)
159 %doc BSD COPYING NEWS README.txt doc
160 %attr(755,root,root) %{_bindir}/testr-3
161 %{py3_sitescriptdir}/testrepository
162 %{py3_sitescriptdir}/testrepository-%{version}-py*.egg-info