From: Wu Zheng Date: Tue, 2 Apr 2013 04:57:16 +0000 (+0800) Subject: obexd-test package is needed for testing X-Git-Tag: accepted/2.0/20130402.211621^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fheads%2F2.0alpha;p=profile%2Fivi%2Fobexd.git obexd-test package is needed for testing --- diff --git a/packaging/obexd.spec b/packaging/obexd.spec index 659ff08..d7b1d25 100644 --- a/packaging/obexd.spec +++ b/packaging/obexd.spec @@ -14,6 +14,17 @@ BuildRequires: pkgconfig(glib-2.0) %description OBEX Server A basic OBEX server implementation. +%package test +Summary: Test Programs for OBEX +Group: Development/Tools +Requires: %{name} = %{version}-%{release} +Requires: dbus-python +Requires: pygobject +Requires: python-xml + +%description test +Scripts for testing OBEX and its functionality + %prep %setup -q @@ -39,6 +50,8 @@ rm -rf %{buildroot} install -D -m 0755 %SOURCE101 %{buildroot}%{_bindir}/obex-root-setup install -D -m 0755 %SOURCE102 %{buildroot}%{_sysconfdir}/obex/root-setup.d/000_create-symlinks +chmod 755 test/* + %files %{_sysconfdir}/obex/root-setup.d/000_create-symlinks %{_datadir}/dbus-1/services/obexd.service @@ -48,3 +61,6 @@ install -D -m 0755 %SOURCE102 %{buildroot}%{_sysconfdir}/obex/root-setup.d/000_c /usr/lib/obex/obex-client %dir /usr/lib/obex/plugins +%files test +%defattr(-,root,root,-) +%doc test/* diff --git a/test/pbap-client b/test/pbap-client index 7456c01..1311cfd 100755 --- a/test/pbap-client +++ b/test/pbap-client @@ -3,6 +3,9 @@ import sys import dbus +reload(sys) +sys.setdefaultencoding('utf8') + bus = dbus.SessionBus() client = dbus.Interface(bus.get_object("org.openobex.client", "/"), @@ -38,4 +41,4 @@ for path in paths: pbap.SetFormat("vcard30") pbap.SetFilter(["VERSION", "FN", "TEL"]); ret = pbap.PullAll() - print "%s" % (ret) + print "%s" % (ret.encode('utf8'))