diff --git a/openstack-tempest.spec b/openstack-tempest.spec index 863a290757e021168f656ef05e22f930cc87db48..d709b1eaf47270fcd8fc1a833a62a5147838dd1d 100644 --- a/openstack-tempest.spec +++ b/openstack-tempest.spec @@ -1,164 +1,190 @@ -%if 0%{?rhel} || 0%{?fedora} -%global rdo 1 -%endif -%if 0%{?rhel} == 7 -%global skip_python3 1 -%endif - -Name: openstack-tempest -Version: 25.0.1 -Release: 1%{?dist} -Epoch: 0 -Summary: The OpenStack Integration Test Suite (Tempest) +%global project tempest +%{!?upstream_version: %global upstream_version %{version}%{?milestone}} +%global with_doc 0 +%global common_desc \ +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. + +Name: openstack-%{project} +Version: 27.0.0 +Release: 1 +Summary: OpenStack Integration Test Suite (Tempest) License: ASL 2.0 -Group: Development/Languages/Python -URL: https://docs.openstack.org/tempest -Source0: https://files.pythonhosted.org/packages/source/t/tempest/tempest-25.0.1.tar.gz -Source1: openstack-tempest.tmpfiles +Url: https://launchpad.net/tempest +Source0: http://tarballs.openstack.org/tempest/tempest-%{upstream_version}.tar.gz +# Required for tarball sources verification +BuildArch: noarch + +# Required for tarball sources verification + +BuildRequires: git-core +BuildRequires: python3-oslo-config +BuildRequires: python3-pbr +BuildRequires: python3-setuptools +BuildRequires: python3-devel BuildRequires: openstack-macros -BuildRequires: python3-prettytable -BuildRequires: python3-PyYAML -BuildRequires: python3-cliff -BuildRequires: python3-debtcollector -BuildRequires: python3-fixtures + +Requires: python3-tempest = %{version}-%{release} + +%description +%{common_desc} + +%package -n python3-%{project} +Summary: Tempest Python library + +%{?python_provide:%python_provide python3-%{project}} + +# Obsoletes python-tempest-lib to avoid breakage +# during upgrade from Newton onwards to till this +# release +Obsoletes: python-tempest-lib + +Requires: python3-cliff >= 2.8.0 +Requires: python3-debtcollector >= 1.2.0 +Requires: python3-fixtures >= 3.0.0 +Requires: python3-jsonschema >= 3.2.0 +Requires: python3-netaddr >= 0.7.18 +Requires: python3-oslo-concurrency >= 3.26.0 +Requires: python3-oslo-config >= 5.2.0 +Requires: python3-oslo-log >= 3.36.0 +Requires: python3-oslo-serialization >= 2.18.0 +Requires: python3-oslo-utils >= 3.33.0 +Requires: python3-os-testr >= 0.8.0 +Requires: python3-paramiko >= 2.7.0 +Requires: python3-pbr >= 2.0.0 +Requires: python3-prettytable >= 0.7.1 +Requires: python3-six >= 1.10.0 +Requires: python3-stevedore >= 1.20.0 +Requires: python3-stestr +Requires: python3-testtools +Requires: python3-urllib3 +Requires: python3-subunit + +Requires: python3-unittest2 >= 1.1.0 +Requires: python3-yaml >= 3.12 + +%description -n python3-%{project} +%{common_desc} + +This package contains the tempest python library. + +%package -n python3-%{project}-tests +Summary: Python Tempest tests +Requires: python3-tempest = %{version}-%{release} + +BuildRequires: python3-mock +BuildRequires: python3-oslotest +BuildRequires: python3-subunit +BuildRequires: python3-oslo-log BuildRequires: python3-jsonschema -BuildRequires: python3-netaddr +BuildRequires: python3-urllib3 BuildRequires: python3-oslo-concurrency -BuildRequires: python3-oslo-config -BuildRequires: python3-oslo-log -BuildRequires: python3-oslo-serialization -BuildRequires: python3-oslo-utils BuildRequires: python3-paramiko -BuildRequires: python3-subunit -BuildRequires: python3-six +BuildRequires: python3-cliff +BuildRequires: python3-pycodestyle +BuildRequires: python3-os-testr BuildRequires: python3-stestr -BuildRequires: python3-stevedore -BuildRequires: python3-testtools -BuildRequires: python3-unittest2 -BuildRequires: python3-urllib3 -Requires: python3-tempest = %{epoch}:%{version}-%{release} -BuildArch: noarch -%if 0%{?suse_version} -# to be compatible with older tempest packages -Provides: openstack-tempest-test = %{epoch}:%{version}-%{release} -Obsoletes: openstack-tempest-test < %{epoch}:%{version}-%{release} -%endif -%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 -n python3-tempest -Summary: Documentation for the OpenStack Integration Test Suite -Group: Development/Languages/Python -Requires: python3-prettytable -Requires: python3-PyYAML -Requires: python3-cliff -Requires: python3-debtcollector -Requires: python3-fixtures -Requires: python3-jsonschema -Requires: python3-netaddr -Requires: python3-oslo-concurrency -Requires: python3-oslo-config -Requires: python3-oslo-log -Requires: python3-oslo-serialization -Requires: python3-oslo-utils -Requires: python3-paramiko -Requires: python3-subunit -Requires: python3-six -Requires: python3-stestr -Requires: python3-stevedore -Requires: python3-testtools -Requires: python3-unittest2 -Requires: python3-urllib3 - -%description -n python3-tempest -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. - -This package contains the python module. - -%package doc -Summary: Documentation for the OpenStack Integration Test Suite +BuildRequires: python3-PyYAML + + +Requires: python3-mock +Requires: python3-oslotest + +%description -n python3-%{project}-tests +%{common_desc} + +%if 0%{?with_doc} +%package -n %{name}-doc +Summary: %{name} documentation + BuildRequires: python3-sphinx BuildRequires: python3-openstackdocstheme -BuildRequires: python3-sphinxcontrib-svg2pdfconverter +# BuildRequires: python3-sphinxcontrib-rsvgconverter -%description doc -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. +%description -n %{name}-doc +%{common_desc} -This package contains the documentation. +It contains the documentation for Tempest. +%endif %prep -%autosetup -p1 -n tempest-25.0.1 +%autosetup -n tempest-%{upstream_version} +# have dependencies being handled by rpms, rather than requirement files %py_req_cleanup +# remove shebangs and fix permissions +RPMLINT_OFFENDERS="tempest/cmd/list_plugins.py \ +tempest/cmd/cleanup.py \ +tempest/cmd/cleanup_service.py \ +tempest/cmd/verify_tempest_config.py \ +tempest/cmd/account_generator.py \ +tempest/lib/cmd/skip_tracker.py \ +tempest/lib/cmd/check_uuid.py" +sed -i '1{/^#!/d}' $RPMLINT_OFFENDERS +chmod u=rw,go=r $RPMLINT_OFFENDERS + %build %{py3_build} -# generate html docs +%if 0%{?with_doc} +# Disable Build the plugin registry step as it uses git to clone +# projects and then generate tempest plugin projects list. +# It is also time taking. +export PYTHONPATH=. export GENERATE_TEMPEST_PLUGIN_LIST='False' -PBR_VERSION=25.0.1 sphinx-build -b html doc/source doc/build/html +sphinx-build -b html doc/source doc/build/html # remove the sphinx-build leftovers rm -rf doc/build/html/.{doctrees,buildinfo} - +%endif %install %{py3_install} -# NOTE(toabctl): config files are installed into usr/etc/ -install -d -m 755 %{buildroot}%{_sysconfdir}/tempest -mv %{buildroot}/%{_prefix}/%{_sysconfdir}/tempest/accounts.yaml.sample %{buildroot}/%{_sysconfdir}/tempest/accounts.yaml -mv %{buildroot}/%{_prefix}/%{_sysconfdir}/tempest/logging.conf.sample %{buildroot}/%{_sysconfdir}/tempest/logging.conf -mv %{buildroot}/%{_prefix}/%{_sysconfdir}/tempest/whitelist.yaml %{buildroot}/%{_sysconfdir}/tempest/whitelist.yaml +# Generate tempest config +mkdir -p %{buildroot}%{_sysconfdir}/%{project}/ +oslo-config-generator --config-file tempest/cmd/config-generator.tempest.conf \ + --output-file %{buildroot}%{_sysconfdir}/%{project}/tempest.conf -# install config -PYTHONPATH=. oslo-config-generator --config-file %{_builddir}/tempest-25.0.1/tempest/cmd/config-generator.tempest.conf --output-file %{buildroot}%{_sysconfdir}/tempest/tempest.conf +mkdir -p %{buildroot}/etc/tempest +mv %{buildroot}/usr/etc/tempest/* %{buildroot}/etc/tempest -# install tmpfiles -install -D -m 644 %{SOURCE1} %{buildroot}/%_tmpfilesdir/%{name}.conf - -%if 0%{?suse_version} -# to be compatible with older tempest packages -%openstack_test_package_install tempest -cp -av .stestr.conf %{buildroot}/%{_localstatedir}/lib/%{name}-test/ -%endif - -%post -%tmpfiles_create %{_tmpfilesdir}/%{name}.conf +%check +export OS_TEST_PATH='./tempest/tests' +export PATH=$PATH:$RPM_BUILD_ROOT/usr/bin +export PYTHONPATH=$PWD +rm -f $OS_TEST_PATH/test_hacking.py +PYTHON=%{__python3} stestr --test-path $OS_TEST_PATH run %files %license LICENSE -%doc README.rst ChangeLog -%_tmpfilesdir/%{name}.conf +%doc README.rst %{_bindir}/tempest - -%{_bindir}/skip-tracker %{_bindir}/check-uuid +%{_bindir}/skip-tracker %{_bindir}/subunit-describe-calls -%dir %{_sysconfdir}/tempest -%config(noreplace) %{_sysconfdir}/tempest/tempest.conf -%config(noreplace) %{_sysconfdir}/tempest/logging.conf -%config(noreplace) %{_sysconfdir}/tempest/accounts.yaml -%config(noreplace) %{_sysconfdir}/tempest/whitelist.yaml -%if 0%{?suse_version} -%{_localstatedir}/lib/openstack-tempest-test -%endif +%{_sysconfdir}/%{project}/*sample +%{_sysconfdir}/%{project}/*yaml +%config(noreplace) %{_sysconfdir}/%{project}/*.conf -%files -n python3-tempest +%files -n python3-%{project} %license LICENSE -%{python3_sitelib}/tempest -%{python3_sitelib}/*.egg-info +%{python3_sitelib}/%{project} +%{python3_sitelib}/%{project}*.egg-info +%exclude %{python3_sitelib}/tempest/tests -%files doc +%files -n python3-%{project}-tests %license LICENSE +%{python3_sitelib}/tempest/tests + +%if 0%{?with_doc} +%files -n %{name}-doc %doc doc/build/html +%license LICENSE +%endif %changelog +* Fri Jul 23 2021 liksh 1:27.0.0-1 +- Update to 27.0.0 + diff --git a/openstack-tempest.tmpfiles b/openstack-tempest.tmpfiles deleted file mode 100644 index 40433f8094f08270cf95b5b9e0f44b8b11ff4f30..0000000000000000000000000000000000000000 --- a/openstack-tempest.tmpfiles +++ /dev/null @@ -1 +0,0 @@ -d /run/tempest 0755 root root - \ No newline at end of file diff --git a/tempest-25.0.1.tar.gz b/tempest-25.0.1.tar.gz deleted file mode 100644 index 38ffdfb66fccc47d10769e1617fe45bd3a58416d..0000000000000000000000000000000000000000 Binary files a/tempest-25.0.1.tar.gz and /dev/null differ diff --git a/tempest-27.0.0.tar.gz b/tempest-27.0.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..2e8443c66a278744d12dfbf63c758b3143e7d227 Binary files /dev/null and b/tempest-27.0.0.tar.gz differ