client/rhel/rhn-client-tools/Makefile.rhn-client-tools | 33 +---------------- client/rhel/rhn-client-tools/rhn-client-tools.spec | 14 +++++++ client/rhel/rhn-client-tools/test/alltests.py | 9 ++-- 3 files changed, 21 insertions(+), 35 deletions(-)
New commits: commit 9bc6bc91a71ac9fd0cbe7f72c743fbd3d52d2a34 Author: Jan Pazdziora jpazdziora@redhat.com Date: Wed Feb 17 10:01:34 2010 +0100
Add testRpcServer and haltreetests back to rhn-client-tools tests.
diff --git a/client/rhel/rhn-client-tools/test/alltests.py b/client/rhel/rhn-client-tools/test/alltests.py index 5688d37..54930a9 100644 --- a/client/rhel/rhn-client-tools/test/alltests.py +++ b/client/rhel/rhn-client-tools/test/alltests.py @@ -31,6 +31,7 @@ import testSSLSocketTimeout import testTransactions import testUp2dateAuth import testUp2dateUtils +import haltreetests ### import testrhnregGui
from unittest import TestSuite @@ -43,14 +44,14 @@ def suite(): testConfig.suite(), testRhnChannel.suite(), testRhnErrata.suite(), -## testRpcServer.suite(), + testRpcServer.suite(), testRpmUtils.suite(), testSSLSocketTimeout.suite(), testTransactions.suite(), testUp2dateAuth.suite(), testUp2dateUtils.suite(), ### testrhnregGui.suite(), -## haltreetests.suite() + haltreetests.suite() ))
if __name__ == "__main__":
commit b419e78d2f7b6847982816c10e0737516fea42df Author: Jan Pazdziora jpazdziora@redhat.com Date: Wed Feb 17 10:00:23 2010 +0100
We do not have display in koji environment, comment out the testrhnregGui.
diff --git a/client/rhel/rhn-client-tools/test/alltests.py b/client/rhel/rhn-client-tools/test/alltests.py index f4bda16..5688d37 100644 --- a/client/rhel/rhn-client-tools/test/alltests.py +++ b/client/rhel/rhn-client-tools/test/alltests.py @@ -31,7 +31,7 @@ import testSSLSocketTimeout import testTransactions import testUp2dateAuth import testUp2dateUtils -import testrhnregGui +### import testrhnregGui
from unittest import TestSuite
@@ -49,7 +49,7 @@ def suite(): testTransactions.suite(), testUp2dateAuth.suite(), testUp2dateUtils.suite(), - testrhnregGui.suite(), +### testrhnregGui.suite(), ## haltreetests.suite() ))
commit cca586e8d33d08d799fdebbfe873c236acd8ed91 Author: Jan Pazdziora jpazdziora@redhat.com Date: Wed Feb 17 09:59:47 2010 +0100
Add %check to rhn-client-tools for Fedora 12+, using python-coverage.
diff --git a/client/rhel/rhn-client-tools/Makefile.rhn-client-tools b/client/rhel/rhn-client-tools/Makefile.rhn-client-tools index cf751d8..d0ac0bb 100644 --- a/client/rhel/rhn-client-tools/Makefile.rhn-client-tools +++ b/client/rhel/rhn-client-tools/Makefile.rhn-client-tools @@ -44,35 +44,6 @@ rpm: tardist rpmbuild -ta rhn-client-tools-$(VERSION).tar.gz
test:: clean -# trace2html is very fragile about what directory it run in and what -# packages you have to start in when specifying the modules to report -# on (eg backend.rhnpush... or rhnpush...). To help figure out what to -# pass to -w, you can try running -# "python /usr/lib/python2.4/trace.py -mc -C coverage_dir -f counts -# testall.py" manually from test/ and see what's in coverage_dir/. + cd test && coverage run --branch alltests.py || : + cd test && coverage report || :
-# Also, at least sometimes, the .pyc files generated by -# the make all rule don't work or work differently with trace and -# therefore trace2html. So for now I just clean them all out before -# running the coverage test. - -# Oh yeah, I also can't get the -W option to trace2html to work, which -# causes the nuisance of needing to list all the modules here. - cd test && trace2html.py \ - -w ...src.up2date_client.capabilities \ - -w ...src.up2date_client.clientCaps \ - -w ...src.up2date_client.config \ - -w ...src.up2date_client.rhnChannel \ - -w ...src.up2date_client.rhnErrata \ - -w ...src.up2date_client.rpcServer \ - -w ...src.up2date_client.rpmUtils \ - -w ...src.up2date_client.transaction \ - -w ...src.up2date_client.up2dateAuth \ - -w ...src.up2date_client.up2dateErrors \ - -w ...src.up2date_client.up2dateLog \ - -w ...src.up2date_client.up2dateUtils \ - -w ...src.up2date_client.up2wrapperUtils \ - -w ...src.up2date_client.rhnregGui \ - -o ../coverage/ \ - --run-command alltests.py -#sfghs diff --git a/client/rhel/rhn-client-tools/rhn-client-tools.spec b/client/rhel/rhn-client-tools/rhn-client-tools.spec index 03a0fd7..b1d5475 100644 --- a/client/rhel/rhn-client-tools/rhn-client-tools.spec +++ b/client/rhel/rhn-client-tools/rhn-client-tools.spec @@ -32,6 +32,15 @@ BuildRequires: gettext BuildRequires: intltool BuildRequires: desktop-file-utils
+# The following BuildRequires are for check only +%if 0%{?fedora} >= 12 +BuildRequires: python-coverage +BuildRequires: rhnlib +# python-setuptools can be removed when 556290 gets fixed +BuildRequires: python-setuptools +BuildRequires: rpm-python +%endif + %description Red Hat Network Client Tools provides programs and libraries to allow your system to receive software updates from Red Hat Network or Spacewalk. @@ -107,6 +116,11 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %clean rm -rf $RPM_BUILD_ROOT
+%if 0%{?fedora} >= 12 +%check + +make -f Makefile.rhn-client-tools test +%endif
%files -f %{name}.lang %defattr(-,root,root,-)
spacewalk-commits@lists.fedorahosted.org