Commit af833977 authored by Lily  Nie's avatar Lily Nie
Browse files

Add a elaborate user guide and put it into a -doc subpackage


Signed-off-by: Lily  Nie's avatarLily Nie <lnie@redhat.com>
parent 5f77e971
......@@ -13,18 +13,5 @@ guests.
Documentation:
An user guide is available in publican/DocBook sources
under docs/User_Guide/libvirt-test-API_Guide it describes
the software goals, explain how to write new test software
and the configuration files for it, and then how to run the
tests. The last section explain how to hook it into Autotest.
An elaborate user guide is available at docs/Libvirt-test-API.pdf
A pregenerated PDF version is available at
ftp://libvirt.org/libvirt/libvirt-test-API/Libvirt-test-API.pdf
or
http://libvirt.org/sources/libvirt-test-API/Libvirt-test-API.pdf
To regenerate the documentation, you must have publican installed,
then cd to docs/User_Guide/libvirt-test-API_Guide, double check the
publican.cfg config file and then run make, the resulting files
will be generated in a tmp subdirectory.
# Disable the shebangs checks on scripts that currently don't
# define a Python version..The point here is that these scripts
#will be copied to guest VM instances,which may be running
#Operating Systems that can haveeither Python 2 or Python 3,
#but it's impossible to know for sure at packaging time.
# define a Python version. The point here is that these scripts
# will be copied to guest VM instances, which may be running
# operating systems that can have either Python 2 or Python 3,
# but it's impossible to know for sure at packaging time.
%global __brp_mangle_shebangs_exclude_from virtlab.py|jenkins.py
%global with_python2 1
......@@ -15,15 +15,24 @@
%global with_python3 1
%endif
%if %{with_python3}
%global __python %{__python3}
%else
%global __python %{__python2}
%endif
Summary: Python based regression tests for libvirt API
Name: libvirt-test-api
Version: 1.0
Version: 1.1
Release: 1%{?dist}
License: GPLv2
URL: https://gitlab.com/libvirt/libvirt-test-API
Source0: https://gitlab.com/libvirt/libvirt-test-API/-/archive/1.0/%{name}-%{version}.tar.gz
BuildRequires: mock
%if %{with_python3}
BuildRequires: python3-devel
BuildRequires: python3-lxml
......@@ -33,15 +42,10 @@ BuildRequires: python3-six
BuildRequires: python3-attrs
BuildRequires: python3-libvirt
BuildRequires: python3-pexpect
BuildRequires: mock
Requires: libvirt
Requires: qemu-kvm
Requires: qemu-img
Requires: python3-six
Requires: python3-lxml
Requires: python3-libvirt
Requires: virt-install
%else
......@@ -53,17 +57,18 @@ BuildRequires: python-six
BuildRequires: python2-pexpect
BuildRequires: mock
Requires: libvirt
Requires: qemu-kvm
Requires: python-six
Requires: python-lxml
Requires: virt-install
%endif
Requires: libvirt
Requires: qemu-kvm
Requires: qemu-img
Requires: virt-install
%if 0%{?rhel} && 0%{?rhel} < 8
Requires:libvirt-python
%endif
%endif
BuildArch: noarch
......@@ -74,52 +79,40 @@ by using the Python language. It supports testing for KVM and
Xen either paravirt (for which only Fedora and Red Hat Enterprise
Linux guests are currently supported) as well as fully virtualized guests.
%package doc
Summary: Documentation files for libvirt-test-api
BuildArch: noarch
%description doc
This package installs the detailed documentation of libvirt-test-api
%prep
%setup -q -n %{name}-%{version}
%check
%if %{with_python3}
%{__python3} setup.py test
%else
%{__python2} setup.py test
%endif
%{__python} setup.py test
%build
%if %{with_python3}
%py3_build
%else
%py2_build
%endif
%py_build
%install
%if %{with_python3}
%py3_install
%else
%py2_install
%endif
%py_install
%if %{with_python2}
%files
%doc README.md
%license LICENSE
%{_bindir}/%{name}
%{python2_sitelib}/libvirt_test_api*
%{python2_sitelib}/libvirttestapi*
%{python_sitelib}/libvirt_test_api*
%{python_sitelib}/libvirttestapi*
%{_datadir}/libvirt-test-api*
%endif
%if %{with_python3}
%files
%doc README.md
%files doc
%license LICENSE
%{_bindir}/%{name}
%{python3_sitelib}/libvirt_test_api*
%{python3_sitelib}/libvirttestapi*
%{_datadir}/libvirt-test-api*
%endif
%doc docs/
%changelog
* Sat Apr 18 2020 Lily Nie <lnie@redhat.com> - 1.0-1
- New release
* Tue Jun 16 2020 Lily Nie <lnie@redhat.com> - 1.1-1
- add an elaborate user guide
......@@ -40,7 +40,7 @@ def get_data_files():
os.path.isfile(path)]
return [(os.path.join(*(['/'] + installed_location)), files_found)]
data_files = add_files(["excute"])
data_files_dirs = ['templates','cases','xmls','config']
data_files_dirs = ['templates','cases','xmls','config', 'docs']
for data_file_dir in data_files_dirs:
for root, dirs, files in os.walk(data_file_dir):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment