Skip to content

Commit

Permalink
Fixed check command to run unittests in python-daemon
Browse files Browse the repository at this point in the history
Added packages required to run tests
Added missing runtime dependent packages

Change-Id: I37551114708335bcfdc125f1d07fce03d216deb2
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/3269
Tested-by: gerrit-photon <[email protected]>
Reviewed-by: Alexey Makhalov <[email protected]>
  • Loading branch information
dthaluru authored and YustasSwamp committed Jul 19, 2017
1 parent 5f845a1 commit 76d9395
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions SPECS/python-daemon/python-daemon.spec
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Summary: Library to implement a well-behaved Unix daemon process.
Name: python-daemon
Version: 2.1.2
Release: 3%{?dist}
Release: 4%{?dist}
License: Apache-2
Url: https://pypi.python.org/pypi/python-daemon/
Group: Development/Languages/Python
Expand All @@ -16,7 +16,9 @@ Source0: https://files.pythonhosted.org/packages/source/p/python-daemon/p
BuildRequires: python2-devel
BuildRequires: python-setuptools
BuildRequires: python-docutils
BuildRequires: python-lockfile
Requires: python2
Requires: python-lockfile

BuildArch: noarch

Expand All @@ -31,7 +33,9 @@ BuildRequires: python3-devel
BuildRequires: python3-docutils
BuildRequires: python3-setuptools
BuildRequires: python3-xml
BuildRequires: python3-lockfile
Requires: python3
Requires: python3-lockfile

%description -n python3-daemon
Python 3 version.
Expand Down Expand Up @@ -61,10 +65,18 @@ python3 setup.py install --root=%{buildroot}
popd

%check
python2 setup.py test
easy_install_2=$(ls /usr/bin |grep easy_install |grep 2)
$easy_install_2 mock
$easy_install_2 testscenarios
$easy_install_2 testtools
python2 -m unittest discover

pushd ../p3dir
python3 setup.py test
easy_install_3=$(ls /usr/bin |grep easy_install |grep 3)
$easy_install_3 mock
$easy_install_3 testscenarios
$easy_install_3 testtools
python3 -m unittest discover
popd

%files
Expand All @@ -75,6 +87,10 @@ popd
%{python3_sitelib}/*

%changelog
* Mon Jul 17 2017 Divya Thaluru <[email protected]> 2.1.2-4
- Fixed check command to run unit tests
- Added packages required to run tests
- Added missing runtime dependent packages
* Wed Jun 07 2017 Xiaolin Li <[email protected]> 2.1.2-3
- Add python3-setuptools and python3-xml to python3 sub package Buildrequires.
* Thu Jun 01 2017 Dheeraj Shetty <[email protected]> 2.1.2-2
Expand Down

0 comments on commit 76d9395

Please sign in to comment.