File openstack-tempest.spec of Package openstack-tempest

#
# spec file for package openstack-tempest
#
# Copyright (c) 2020 SUSE LLC
#
# 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/
#


%global sname tempest
Name:           openstack-tempest
Version:        19.0.0
Release:        0
Summary:        The OpenStack Integration Test Suite
License:        Apache-2.0
Group:          Development/Languages/Python
URL:            https://launchpad.net/tempest
Source0:        https://files.pythonhosted.org/packages/source/T/Tempest/%{sname}-%{version}.tar.gz
BuildRequires:  openstack-macros
BuildRequires:  python-PrettyTable
BuildRequires:  python-PyYAML
BuildRequires:  python-cliff
BuildRequires:  python-debtcollector
BuildRequires:  python-devel
BuildRequires:  python-fixtures
BuildRequires:  python-jsonschema
BuildRequires:  python-mock
BuildRequires:  python-netaddr
BuildRequires:  python-openstackdocstheme
BuildRequires:  python-os-testr
BuildRequires:  python-oslo.concurrency
BuildRequires:  python-oslo.config
BuildRequires:  python-oslo.log
BuildRequires:  python-oslo.serialization
BuildRequires:  python-oslo.utils
BuildRequires:  python-oslotest
BuildRequires:  python-paramiko
BuildRequires:  python-pep8
BuildRequires:  python-python-subunit
BuildRequires:  python-six
BuildRequires:  python-stevedore
BuildRequires:  python-testrepository
BuildRequires:  python-testscenarios
BuildRequires:  python-testtools
BuildRequires:  python-urllib3
Requires:       python-PrettyTable
Requires:       python-PyYAML
Requires:       python-cliff
Requires:       python-debtcollector
Requires:       python-fixtures
Requires:       python-jsonschema
Requires:       python-netaddr
Requires:       python-os-testr
Requires:       python-oslo.concurrency
Requires:       python-oslo.config
Requires:       python-oslo.log
Requires:       python-oslo.serialization
Requires:       python-oslo.utils
Requires:       python-paramiko
Requires:       python-python-subunit
Requires:       python-six
Requires:       python-stevedore
Requires:       python-testrepository
Requires:       python-testscenarios
Requires:       python-testtools
Requires:       python-urllib3
BuildArch:      noarch

%description
Tempest is a set of integration tests to be run against a live OpenStack
cluster. Tempest has batteries of tests for OpenStack API validation,
Scenarios, and other specific tests useful in validating an OpenStack
deployment.

%package doc
Summary:        Documentation for the OpenStack Integration Test Suite
Group:          Development/Languages/Python
BuildRequires:  python-Sphinx
BuildRequires:  python-oslosphinx

%description doc
Documentation for the OpenStack Integration Test Suite.

%prep
%autosetup -n %{sname}-%{version}
%py_req_cleanup
sed -i 's/^warning-is-error.*/warning-is-error = 0/g' setup.cfg

%build
%{py2_build}

%install
%{py2_install}

# NOTE(toabctl): config files are installed into usr/etc/
install -d -m 755 %{buildroot}%{_sysconfdir}/tempest
mv %{buildroot}/%{_prefix}/%{_sysconfdir}/%{sname}/accounts.yaml.sample %{buildroot}/%{_sysconfdir}/%{sname}/accounts.yaml
mv %{buildroot}/%{_prefix}/%{_sysconfdir}/%{sname}/logging.conf.sample %{buildroot}/%{_sysconfdir}/%{sname}/logging.conf
mv %{buildroot}/%{_prefix}/%{_sysconfdir}/%{sname}/whitelist.yaml %{buildroot}/%{_sysconfdir}/%{sname}/whitelist.yaml

# generate html docs
sphinx-build -b html doc/source doc/build/html
# remove the sphinx-build leftovers
rm -rf doc/build/html/.{doctrees,buildinfo}

##%check
##export OS_TEST_PATH=./tempest/tests
##PYTHONPATH=. %{__python2} setup.py testr

%files
%license LICENSE
%doc README.rst ChangeLog
%{python2_sitelib}/tempest
%{python2_sitelib}/*.egg-info
%{_bindir}/tempest
%{_bindir}/verify-tempest-config
%{_bindir}/tempest-account-generator
%{_bindir}/skip-tracker
%{_bindir}/check-uuid
%{_bindir}/subunit-describe-calls
%dir %{_sysconfdir}/tempest
%config(noreplace) %{_sysconfdir}/tempest/logging.conf
%config(noreplace) %{_sysconfdir}/tempest/accounts.yaml
%config(noreplace) %{_sysconfdir}/tempest/whitelist.yaml

%files doc
%license LICENSE
%doc doc/build/html

%changelog
openSUSE Build Service is sponsored by