forked from avocado-framework/avocado
-
Notifications
You must be signed in to change notification settings - Fork 0
/
python-avocado.spec
525 lines (436 loc) · 16.6 KB
/
python-avocado.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
%global srcname avocado
# 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 gittar %{srcname}-%{version}.tar.gz
%else
%if ! 0%{?commit:1}
%global commit 87d40d3e84b505e8e7c56912d62910d084aa9d3d
%endif
%if ! 0%{?commit_date:1}
%global commit_date 20210517
%endif
%global shortcommit %(c=%{commit};echo ${c:0:9})
%global gitrel .%{commit_date}git%{shortcommit}
%global gittar %{srcname}-%{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
Summary: Framework with tools and libraries for Automated Testing
Name: python-%{srcname}
Version: 89.0
Release: 1%{?gitrel}%{?dist}
License: GPLv2
Group: Development/Tools
URL: http://avocado-framework.github.io/
%if 0%{?rel_build}
Source0: https://github.com/avocado-framework/%{srcname}/archive/%{version}.tar.gz#/%{gittar}
%else
Source0: https://github.com/avocado-framework/%{srcname}/archive/%{commit}.tar.gz#/%{gittar}
%endif
BuildArch: noarch
BuildRequires: procps-ng
BuildRequires: kmod
%if 0%{?fedora} >= 30
BuildRequires: glibc-all-langpacks
%endif
BuildRequires: python3-jinja2
BuildRequires: python3-devel
BuildRequires: python3-docutils
BuildRequires: python3-lxml
BuildRequires: python3-psutil
BuildRequires: python3-setuptools
%if ! 0%{?rhel}
BuildRequires: python3-resultsdb_api
BuildRequires: python3-pycdlib
%endif
%if %{with_tests}
BuildRequires: genisoimage
BuildRequires: libcdio
BuildRequires: psmisc
BuildRequires: python3-yaml
BuildRequires: python3-netifaces
%if ! 0%{?rhel}
BuildRequires: perl-Test-Harness
%endif
%endif
%description
Avocado is a set of tools and libraries (what people call
these days a framework) to perform automated testing.
%package -n python3-%{srcname}
Summary: %{summary}
Requires: python3-%{srcname}-common == %{version}
Requires: gdb
Requires: gdb-gdbserver
Requires: procps-ng
Requires: python3
Requires: python3-setuptools
%if ! 0%{?rhel}
Requires: python3-pycdlib
%endif
%description -n python3-%{srcname}
Avocado is a set of tools and libraries (what people call
these days a framework) to perform automated testing.
%prep
%if 0%{?rel_build}
%setup -q -n %{srcname}-%{version}
%else
%setup -q -n %{srcname}-%{commit}
%endif
%build
%if 0%{?rhel}
sed -e "s/'PyYAML>=4.2b2'/'PyYAML>=3.12'/" -i optional_plugins/varianter_yaml_to_mux/setup.py
%endif
%if 0%{?rhel}
%endif
%py3_build
pushd optional_plugins/html
%py3_build
popd
%if ! 0%{?rhel}
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
%{__mv} %{buildroot}%{python3_sitelib}/avocado/etc %{buildroot}
pushd optional_plugins/html
%py3_install
popd
%if ! 0%{?rhel}
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
%{__mkdir} -p %{buildroot}%{_mandir}/man1
%{__install} -m 0644 man/avocado.1 %{buildroot}%{_mandir}/man1/avocado.1
%{__install} -d -m 0755 %{buildroot}%{_sharedstatedir}/avocado/data
%{__install} -d -m 0755 %{buildroot}%{_docdir}/avocado
%{__cp} -r examples/gdb-prerun-scripts %{buildroot}%{_docdir}/avocado
%{__cp} -r examples/plugins %{buildroot}%{_docdir}/avocado
%{__cp} -r examples/tests %{buildroot}%{_docdir}/avocado
%{__cp} -r examples/wrappers %{buildroot}%{_docdir}/avocado
%{__cp} -r examples/yaml_to_mux %{buildroot}%{_docdir}/avocado
%{__cp} -r examples/varianter_pict %{buildroot}%{_docdir}/avocado
%{__cp} -r examples/varianter_cit %{buildroot}%{_docdir}/avocado
find %{buildroot}%{_docdir}/avocado -type f -name '*.py' -exec %{__chmod} -c -x {} ';'
%{__mkdir} -p %{buildroot}%{_libexecdir}/avocado
%{__mv} %{buildroot}%{python3_sitelib}/avocado/libexec/* %{buildroot}%{_libexecdir}/avocado
%check
%if %{with_tests}
%{__python3} setup.py develop --user
pushd optional_plugins/html
%{__python3} setup.py develop --user
popd
%if ! 0%{?rhel}
pushd optional_plugins/resultsdb
%{__python3} setup.py develop --user
popd
%endif
pushd optional_plugins/varianter_yaml_to_mux
%{__python3} setup.py develop --user
popd
pushd optional_plugins/golang
%{__python3} setup.py develop --user
popd
pushd optional_plugins/varianter_pict
%{__python3} setup.py develop --user
popd
pushd optional_plugins/varianter_cit
%{__python3} setup.py develop --user
popd
pushd optional_plugins/result_upload
%{__python3} setup.py develop --user
popd
# 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=$HOME/.local/bin:$PATH LANG=en_US.UTF-8 AVOCADO_CHECK_LEVEL=0 %{__python3} selftests/check.py --disable-static-checks --disable-plugin-checks=robot
%endif
%files -n python3-%{srcname}
%defattr(-,root,root,-)
%doc README.rst LICENSE
%{_bindir}/avocado
%{_bindir}/avocado-runner
%{_bindir}/avocado-runner-noop
%{_bindir}/avocado-runner-dry-run
%{_bindir}/avocado-runner-exec
%{_bindir}/avocado-runner-exec-test
%{_bindir}/avocado-runner-python-unittest
%{_bindir}/avocado-runner-avocado-instrumented
%{_bindir}/avocado-runner-tap
%{_bindir}/avocado-runner-requirement-asset
%{_bindir}/avocado-runner-requirement-package
%{_bindir}/avocado-software-manager
%{python3_sitelib}/avocado*
%exclude %{python3_sitelib}/avocado_result_html*
%exclude %{python3_sitelib}/avocado_resultsdb*
%exclude %{python3_sitelib}/avocado_golang*
%exclude %{python3_sitelib}/avocado_varianter_yaml_to_mux*
%exclude %{python3_sitelib}/avocado_varianter_pict*
%exclude %{python3_sitelib}/avocado_varianter_cit*
%exclude %{python3_sitelib}/avocado_result_upload*
%exclude %{python3_sitelib}/avocado_framework_plugin_result_html*
%exclude %{python3_sitelib}/avocado_framework_plugin_resultsdb*
%exclude %{python3_sitelib}/avocado_framework_plugin_varianter_yaml_to_mux*
%exclude %{python3_sitelib}/avocado_framework_plugin_varianter_pict*
%exclude %{python3_sitelib}/avocado_framework_plugin_varianter_cit*
%exclude %{python3_sitelib}/avocado_framework_plugin_golang*
%exclude %{python3_sitelib}/avocado_framework_plugin_result_upload*
%exclude %{python3_sitelib}/tests*
%package -n python3-%{srcname}-common
Summary: Avocado common files
%description -n python3-%{srcname}-common
Common files (such as configuration) for the Avocado Testing Framework.
%files -n python3-%{srcname}-common
%{_mandir}/man1/avocado.1.gz
%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
%dir %{_sharedstatedir}/avocado
%config(noreplace)%{_sysconfdir}/avocado/sysinfo/commands
%config(noreplace)%{_sysconfdir}/avocado/sysinfo/files
%config(noreplace)%{_sysconfdir}/avocado/sysinfo/profilers
%config(noreplace)%{_sysconfdir}/avocado/scripts/job/pre.d/README
%config(noreplace)%{_sysconfdir}/avocado/scripts/job/post.d/README
%package -n python3-%{srcname}-plugins-output-html
Summary: Avocado HTML report plugin
Requires: python3-%{srcname} == %{version}, python3-jinja2
%description -n python3-%{srcname}-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-%{srcname}-plugins-output-html
%{python3_sitelib}/avocado_result_html*
%{python3_sitelib}/avocado_framework_plugin_result_html*
%if ! 0%{?rhel}
%package -n python3-%{srcname}-plugins-resultsdb
Summary: Avocado plugin to propagate job results to ResultsDB
Requires: python3-%{srcname} == %{version}
Requires: python3-resultsdb_api
%description -n python3-%{srcname}-plugins-resultsdb
Allows Avocado to send job results directly to a ResultsDB
server.
%files -n python3-%{srcname}-plugins-resultsdb
%{python3_sitelib}/avocado_resultsdb*
%{python3_sitelib}/avocado_framework_plugin_resultsdb*
%endif
%package -n python3-%{srcname}-plugins-varianter-yaml-to-mux
Summary: Avocado plugin to generate variants out of yaml files
Requires: python3-%{srcname} == %{version}
Requires: python3-yaml
%description -n python3-%{srcname}-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-%{srcname}-plugins-varianter-yaml-to-mux
%{python3_sitelib}/avocado_varianter_yaml_to_mux*
%{python3_sitelib}/avocado_framework_plugin_varianter_yaml_to_mux*
%package -n python3-%{srcname}-plugins-golang
Summary: Avocado Plugin for Execution of golang tests
Requires: python3-%{srcname} == %{version}
Requires: golang
%description -n python3-%{srcname}-plugins-golang
Allows Avocado to list golang tests, and if golang is installed,
also run them.
%files -n python3-%{srcname}-plugins-golang
%{python3_sitelib}/avocado_golang*
%{python3_sitelib}/avocado_framework_plugin_golang*
%{_bindir}/avocado-runner-golang
%package -n python3-%{srcname}-plugins-varianter-pict
Summary: Varianter with combinatorial capabilities by PICT
Requires: python3-%{srcname} == %{version}
%description -n python3-%{srcname}-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-%{srcname}-plugins-varianter-pict
%{python3_sitelib}/avocado_varianter_pict*
%{python3_sitelib}/avocado_framework_plugin_varianter_pict*
%package -n python3-%{srcname}-plugins-varianter-cit
Summary: Varianter with Combinatorial Independent Testing capabilities
Requires: python3-%{srcname} == %{version}
%description -n python3-%{srcname}-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-%{srcname}-plugins-varianter-cit
%{python3_sitelib}/avocado_varianter_cit*
%{python3_sitelib}/avocado_framework_plugin_varianter_cit*
%package -n python3-%{srcname}-plugins-result-upload
Summary: Avocado Plugin to propagate Job results to a remote host
Requires: python3-%{srcname} == %{version}
%description -n python3-%{srcname}-plugins-result-upload
This optional plugin is intended to upload the Avocado Job results to
a dedicated sever.
%files -n python3-%{srcname}-plugins-result-upload
%{python3_sitelib}/avocado_result_upload*
%{python3_sitelib}/avocado_framework_plugin_result_upload*
%package -n python3-%{srcname}-examples
Summary: Avocado Test Framework Example Tests
Requires: python3-%{srcname} == %{version}
%description -n python3-%{srcname}-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 python3-%{srcname}-examples
%dir %{_docdir}/avocado
%{_docdir}/avocado/gdb-prerun-scripts
%{_docdir}/avocado/plugins
%{_docdir}/avocado/tests
%{_docdir}/avocado/wrappers
%{_docdir}/avocado/yaml_to_mux
%{_docdir}/avocado/varianter_pict
%{_docdir}/avocado/varianter_cit
%package -n python3-%{srcname}-bash
Summary: Avocado Test Framework Bash Utilities
Requires: python3-%{srcname} == %{version}
%description -n python3-%{srcname}-bash
A small set of utilities to interact with Avocado from the Bourne
Again Shell code (and possibly other similar shells).
%files -n python3-%{srcname}-bash
%{_libexecdir}/avocado*
%changelog
* Mon Jun 21 2021 Cleber Rosa <[email protected]> - 89.0-1
- New release
* Sun May 23 2021 Cleber Rosa <[email protected]> - 88.1-2
- Remove /usr/bin/python[23] requirement exclusion
* Mon May 17 2021 Cleber Rosa <[email protected]> - 88.1-1
- New release with readthedocs.org documentation hotfix
* Fri May 14 2021 Cleber Rosa <[email protected]> - 88.0-1
- New release
* Wed Apr 14 2021 Cleber Rosa <[email protected]> - 87.0-1
- New release
* Mon Mar 15 2021 Cleber Rosa <[email protected]> - 86.0-1
- New release
* Thu Feb 18 2021 Cleber Rosa <[email protected]> - 85.0-2
- Do not depend on make to build man page
* Tue Feb 9 2021 Cleber Rosa <[email protected]> - 85.0-1
- New release
* Mon Dec 21 2020 Cleber Rosa <[email protected]> - 84.0-1
- New release
* Tue Dec 8 2020 Cleber Rosa <[email protected]> - 83.0-2
- Drop old Fedora conditionals
- Use selftests/check.py job instead of more limited selftests/run
* Mon Nov 16 2020 Cleber Rosa <[email protected]> - 83.0-1
- New release
* Thu Sep 17 2020 Cleber Rosa <[email protected]> - 82.0-3
- Added avocado-runner-golang script to golang package
* Wed Sep 16 2020 Cleber Rosa <[email protected]> - 82.0-2
- Removed yaml to mux loader plugin
- Removed glib plugin
* Fri Sep 11 2020 Cleber Rosa <[email protected]> - 82.0-1
- New release
* Mon Aug 31 2020 Cleber Rosa <[email protected]> - 81.0-1
- New release
* Tue Jun 23 2020 Cleber Rosa <[email protected]> - 80.0-2
- Add on extra character to short commit
* Fri Jun 5 2020 Cleber Rosa <[email protected]> - 80.0-2
- Removed python3-libvirt build requirement
* Fri Jun 5 2020 Cleber Rosa <[email protected]> - 80.0-1
- New release
* Thu Jun 4 2020 Cleber Rosa <[email protected]> - 79.0-2
- Dropped use of custom avocado command for tests
* Tue May 12 2020 Cleber Rosa <[email protected]> - 79.0-1
- Do not build deprecated runners
* Mon May 11 2020 Cleber Rosa <[email protected]> - 79.0-0
- New release
- Added current user's ~/local/.bin 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
* Mon Apr 13 2020 Cleber Rosa <[email protected]> - 78.0-0
- New release
* Tue Mar 17 2020 Cleber Rosa <[email protected]> - 77.0-0
- New release
* Mon Mar 16 2020 Cleber Rosa <[email protected]> - 76.0-1
- Removed PYTHONWARNINGS environment variable when running tests
* Fri Feb 21 2020 Cleber Rosa <[email protected]> - 76.0-0
- New release
* Thu Feb 20 2020 Cleber Rosa <[email protected]> - 75.1-3
- Added new avocado-software-manager script
* Thu Feb 20 2020 Cleber Rosa <[email protected]> - 75.1-2
- Added new avocado-runner-tap script
* Thu Feb 20 2020 Cleber Rosa <[email protected]> - 75.1-1
- Ignore Avocado warnings that use Python's warning module when
running tests
* Mon Jan 20 2020 Cleber Rosa <[email protected]> - 75.1-0
- New release
* Mon Jan 20 2020 Cleber Rosa <[email protected]> - 75.0-0
- New release
* Sun Dec 22 2019 Cleber Rosa <[email protected]> - 74.0-0
- New release
* Fri Nov 22 2019 Cleber Rosa <[email protected]> - 73.0-0
- New release
* Fri Nov 22 2019 Cleber Rosa <[email protected]> - 72.0-3
- Update sysinfo configuration files location
* Mon Nov 18 2019 Cleber Rosa <[email protected]> - 72.0-2
- Add EL/EPEL8 support
* Fri Sep 27 2019 Cleber Rosa <[email protected]> - 72.0-1
- Added new avocado-runner-* runner scripts
* Tue Sep 17 2019 Cleber Rosa <[email protected]> - 72.0-0
- New release
* Thu Sep 5 2019 Cleber Rosa <[email protected]> - 71.0-2
- Added nrunner standalone scripts
* Mon Aug 19 2019 Cleber Rosa <[email protected]> - 71.0-1
- Use newer libvirt Python bindings package name
- Dropped older libvirt Python lack of egg info workaround
* Thu Aug 15 2019 Cleber Rosa <[email protected]> - 71.0-0
- New release
* Tue Jul 9 2019 Cleber Rosa <[email protected]> - 70.0-1
- Add config file to glib plugin subpackage
* Wed Jun 26 2019 Cleber Rosa <[email protected]> - 70.0-0
- New release
* Tue Jun 25 2019 Cleber Rosa <[email protected]> - 69.0-3
- Drop python3-sphinx build requirement
- Cleaned up some of the changelog history
* Tue Jun 25 2019 Cleber Rosa <[email protected]> - 69.0-2
- Build without python3-aexpect on Fedora 30 and later
* Tue May 28 2019 Merlin Mathesius <[email protected]> - 69.0-1
- Disable components dependent upon Fiber in Fedora 31 and later,
since avocado is currently incompatible with the new Fiber API.
- Remove pyliblzma as it has always been Python 2-only, and it is
no longer available as of F31.
* Tue Feb 26 2019 Cleber Rosa <[email protected]> - 69.0-0
- New release