diff --git a/python-boto.spec b/python-boto.spec index 88c2f96..91587cb 100644 --- a/python-boto.spec +++ b/python-boto.spec @@ -1,3 +1,9 @@ +# Enabling the unit tests is blocked on several bugs: +# https://bugzilla.redhat.com/show_bug.cgi?id=1072925 +# https://bugzilla.redhat.com/show_bug.cgi?id=1072928 +# Tracker: https://bugzilla.redhat.com/show_bug.cgi?id=1072946 +%bcond_with unittests + %if 0%{?fedora} %bcond_without python3 %else @@ -29,6 +35,19 @@ BuildRequires: python3-devel BuildRequires: python3-setuptools %endif # with python3 +%if %{with unittests} +BuildRequires: python-httpretty +BuildRequires: python-mock +BuildRequires: python-nose +BuildRequires: python-requests +%if %{with python3} +BuildRequires: python3-httpretty +BuildRequires: python3-mock +BuildRequires: python3-nose +BuildRequires: python3-requests +%endif # with python3 +%endif # with unittests + Provides: python2-boto = %{version}-%{release} BuildArch: noarch @@ -94,6 +113,17 @@ popd %{__python2} setup.py install --skip-build --root $RPM_BUILD_ROOT +%check +%if %{with unittests} +%{__python2} tests/test.py default +%if %{with python3} +pushd %{py3dir} +%{__python3} tests/test.py default +popd +%endif # with python3 +%endif # with unittests + + %files # For some reason this definition really does have to go in this section. %{!?_licensedir: %global license %%doc} @@ -134,6 +164,7 @@ popd * Thu Aug 21 2014 Garrett Holmstrom - 2.32.1-1 - Updated to 2.32.1 (RH #1126056, RH #1132348) - Added python3-boto (RH #1024363) +- Added (but did not enable) unit tests (RH #1072946, RH #1072923) * Thu Jul 31 2014 Tom Callaway - 2.27.0-3 - fix license handling