From d9118530391b54a3c1fb50766d733cddc1cafb67 Mon Sep 17 00:00:00 2001 From: Wu Zheng Date: Tue, 2 Apr 2013 12:57:16 +0800 Subject: [PATCH] obexd-test package is needed for testing --- packaging/obexd.spec | 16 ++++++++++++++++ test/pbap-client | 5 ++++- 2 files changed, 20 insertions(+), 1 deletion(-) 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')) -- 2.7.4