Browse code

Fixed check command to run unittests in python-daemon 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 <photon-checkins@vmware.com>
Reviewed-by: Alexey Makhalov <amakhalov@vmware.com>

dthaluru authored on 2017/07/18 07:04:40
Showing 1 changed files
... ...
@@ -4,7 +4,7 @@
4 4
 Summary:        Library to implement a well-behaved Unix daemon process.
5 5
 Name:           python-daemon
6 6
 Version:        2.1.2
7
-Release:        3%{?dist}
7
+Release:        4%{?dist}
8 8
 License:        Apache-2
9 9
 Url:            https://pypi.python.org/pypi/python-daemon/
10 10
 Group:          Development/Languages/Python
... ...
@@ -16,7 +16,9 @@ Source0:        https://files.pythonhosted.org/packages/source/p/python-daemon/p
16 16
 BuildRequires:  python2-devel
17 17
 BuildRequires:  python-setuptools
18 18
 BuildRequires:  python-docutils
19
+BuildRequires:  python-lockfile
19 20
 Requires:       python2
21
+Requires:       python-lockfile
20 22
 
21 23
 BuildArch:      noarch
22 24
 
... ...
@@ -31,7 +33,9 @@ BuildRequires:  python3-devel
31 31
 BuildRequires:  python3-docutils
32 32
 BuildRequires:  python3-setuptools
33 33
 BuildRequires:  python3-xml
34
+BuildRequires:  python3-lockfile
34 35
 Requires:       python3
36
+Requires:       python3-lockfile
35 37
 
36 38
 %description -n python3-daemon
37 39
 Python 3 version.
... ...
@@ -61,10 +65,18 @@ python3 setup.py install --root=%{buildroot}
61 61
 popd
62 62
 
63 63
 %check
64
-python2 setup.py test
64
+easy_install_2=$(ls /usr/bin |grep easy_install |grep 2)
65
+$easy_install_2 mock
66
+$easy_install_2 testscenarios
67
+$easy_install_2 testtools
68
+python2 -m unittest discover
65 69
 
66 70
 pushd ../p3dir
67
-python3 setup.py test
71
+easy_install_3=$(ls /usr/bin |grep easy_install |grep 3)
72
+$easy_install_3 mock
73
+$easy_install_3 testscenarios
74
+$easy_install_3 testtools
75
+python3 -m unittest discover
68 76
 popd
69 77
 
70 78
 %files
... ...
@@ -75,6 +87,10 @@ popd
75 75
 %{python3_sitelib}/*
76 76
 
77 77
 %changelog
78
+*   Mon Jul 17 2017 Divya Thaluru <dthaluru@vmware.com> 2.1.2-4
79
+-   Fixed check command to run unit tests
80
+-   Added packages required to run tests
81
+-   Added missing runtime dependent packages
78 82
 *   Wed Jun 07 2017 Xiaolin Li <xiaolinl@vmware.com> 2.1.2-3
79 83
 -   Add python3-setuptools and python3-xml to python3 sub package Buildrequires.
80 84
 *   Thu Jun 01 2017 Dheeraj Shetty <dheerajs@vmware.com> 2.1.2-2