File openstack-tempest.spec of Package openstack-tempest
#
# spec file for package openstack-tempest
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2013 B1 Systems GmbH, Vohburg, 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 http://bugs.opensuse.org/
#
%define component tempest
%define groupname openstack-%{component}
%define username openstack-%{component}
Name: openstack-%{component}
Version: 2013.1.a976.gfc1808b
Release: 0
Summary: OpenStack Integration Test Suite (Tempest)
License: Apache-2.0
Group: System/Management
Url: https://launchpad.net/tempest
Source0: tempest-stable-grizzly.tar.gz
BuildRequires: fdupes
BuildRequires: openstack-suse-macros
BuildRequires: openstack-utils
BuildRequires: python-Sphinx
BuildRequires: python-base
BuildRequires: python-distribute
%if 0%{?suse_version} > 1110
Requires(pre): pwdutils
%else
Requires(pre): shadow-utils
%endif
Requires: git-core
Requires: python >= 2.6.8
Requires: python-openstack.nose_plugin
Requires: python-tempest = %{version}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%else
BuildArch: noarch
%endif
%description
This 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 test
Summary: OpenStack Integration Test Suite (Tempest) - Test Package
Group: Development/Languages/Python
Requires: %{name} = %{version}
%description test
This 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 -n python-tempest
Summary: OpenStack Integration Test Suite (Tempest) - Python module
Group: Development/Languages/Python
Requires: python >= 2.6.8
Requires: python-anyjson
Requires: python-boto >= 2.2.1
Requires: python-eventlet
Requires: python-glanceclient >= 0.5.0
Requires: python-httplib2 >= 0.7.0
Requires: python-keystoneclient >= 0.2.0
Requires: python-lxml
Requires: python-netaddr
Requires: python-nose
Requires: python-novaclient >= 2.10.0
Requires: python-oslo.config >= 1.1.0
Requires: python-paramiko
Requires: python-quantumclient >= 2.1
Requires: python-sqlalchemy
Requires: python-testrepository
Requires: python-testresources
Requires: python-testtools >= 0.9.29
%description -n python-tempest
This package contains the core Python module of OpenStack Tempest.
%prep
%setup -q -n tempest-2013.1.a976.gfc1808b
%openstack_cleanup_prep
%build
python setup.py build
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
install -d -m 755 %{buildroot}%{_localstatedir}/lib/tempest
install -d -m 0755 %{buildroot}%{_sysconfdir}/tempest
install -m 0644 etc/tempest.conf.sample %{buildroot}%{_sysconfdir}/tempest/tempest.conf
%fdupes %{buildroot}%{python_sitelib}/%{component}
# configuration fixes
openstack-config --set %{buildroot}/etc/tempest/tempest.conf whitebox bin_dir /usr/bin
### test subpackage
%openstack_test_package_install
%pre
getent group %{groupname} >/dev/null || groupadd -r %{groupname}
getent passwd %{username} >/dev/null || useradd -r -g %{groupname} -d %{_localstatedir}/lib/tempest -s /sbin/nologin -c "OpenStack Tempest" %{username}
exit 0
%files
%defattr(-,root,root)
%doc LICENSE
%dir %{_sysconfdir}/tempest
%config(noreplace) %{_sysconfdir}/tempest/tempest.conf
%files test
%defattr(-,root,root)
%doc LICENSE README.rst
%{_bindir}/tempest
%{_localstatedir}/lib/openstack-%{component}-test
%dir %attr(0755, %{username}, %{username}) %{_localstatedir}/lib/tempest
%files -n python-tempest
%defattr(-,root,root,-)
%doc LICENSE
%{python_sitelib}/cli/
%{python_sitelib}/stress/
%{python_sitelib}/%{component}/
%{python_sitelib}/%{component}-*.egg-info
%changelog