TIVI-319 [2.0] no bluez-test found in repo 88/2388/2 submit/2.0alpha/20121120.075533
authorChengyi Zhao <chengyix.zhao@intel.com>
Tue, 20 Nov 2012 07:13:53 +0000 (15:13 +0800)
committerChengyi Zhao <chengyix.zhao@intel.com>
Tue, 20 Nov 2012 07:13:53 +0000 (15:13 +0800)
Makefile.am
packaging/bluez.spec
test/simple-agent
test/test-device [changed mode: 0755->0644]
test/test-discovery [changed mode: 0755->0644]
test/test-manager [changed mode: 0755->0644]

index ecbe335..a4f87ab 100644 (file)
@@ -418,6 +418,26 @@ CLEANFILES += $(rules_DATA)
 
 EXTRA_DIST += scripts/bluetooth-hid2hci.rules scripts/bluetooth-serial.rules
 
+test_scripts = test/hsplay \
+       test/hsmicro \
+       test/list-devices \
+       test/monitor-bluetooth \
+       test/simple-agent \
+       test/simple-service \
+       test/test-adapter \
+       test/test-audio \
+       test/test-device \
+       test/test-discovery \
+       test/test-input \
+       test/test-manager \
+       test/test-network \
+       test/test-serial \
+       test/test-service \
+       test/test-telephony
+
+testdir = ${pkglibdir}/test
+test_SCRIPTS = ${test_scripts}
+
 EXTRA_DIST += doc/manager-api.txt \
                doc/adapter-api.txt doc/device-api.txt \
                doc/service-api.txt doc/agent-api.txt doc/attribute-api.txt \
index ca813be..feb6a0a 100644 (file)
@@ -50,6 +50,17 @@ Requires:   libbluetooth3 = %{version}
 bluez-libs-devel contains development libraries and headers for
 use in Bluetooth applications.
 
+%package test
+Summary:    Test Programs for BlueZ
+Group:      Development/Tools
+Requires:   %{name} = %{version}-%{release}
+Requires:   dbus-python
+Requires:   pygobject
+Requires:   python-xml
+
+%description test
+Scripts for testing BlueZ and its functionality
+
 %prep
 %setup -q
 %patch1 -p1
@@ -77,7 +88,8 @@ export LDFLAGS=" -lncurses -Wl,--as-needed "
                         --disable-cups \
                        --enable-health \
                        --enable-dbusoob \
-                        --with-telephony=ofono
+                        --with-telephony=ofono \
+                       --enable-test
 
 make %{?jobs:-j%jobs}
 
@@ -126,3 +138,7 @@ install -D -m 0644 network/network.conf %{buildroot}%{_prefix}/etc/bluetooth/net
 %{_includedir}/bluetooth/*
 %{_libdir}/libbluetooth.so
 %{_libdir}/pkgconfig/bluez.pc
+
+%files test
+%defattr(-,root,root,-)
+%{_libdir}/bluez/test/*
index a25eaf0..a089cbc 100644 (file)
@@ -2,7 +2,7 @@
 
 from __future__ import absolute_import, print_function, unicode_literals
 
-from gi.repository import GObject
+import gobject
 
 import sys
 import dbus
@@ -122,7 +122,7 @@ if __name__ == '__main__':
        path = "/test/agent"
        agent = Agent(bus, path)
 
-       mainloop = GObject.MainLoop()
+       mainloop = gobject.MainLoop()
 
        if len(args) > 1:
                if len(args) > 2:
old mode 100755 (executable)
new mode 100644 (file)
index 81a44f8..32bcfba
@@ -2,7 +2,7 @@
 
 from __future__ import absolute_import, print_function, unicode_literals
 
-from gi.repository import GObject
+import gobject
 
 import sys
 import dbus
@@ -12,7 +12,7 @@ from optparse import OptionParser, make_option
 
 dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
 bus = dbus.SystemBus()
-mainloop = GObject.MainLoop()
+mainloop = gobject.MainLoop()
 
 manager = dbus.Interface(bus.get_object("org.bluez", "/"), "org.bluez.Manager")
 
old mode 100755 (executable)
new mode 100644 (file)
index 269c51c..43ee072
@@ -2,7 +2,7 @@
 
 from __future__ import absolute_import, print_function, unicode_literals
 
-from gi.repository import GObject
+import gobject
 
 import dbus
 import dbus.mainloop.glib
@@ -59,5 +59,5 @@ if __name__ == '__main__':
 
        adapter.StartDiscovery()
 
-       mainloop = GObject.MainLoop()
+       mainloop = gobject.MainLoop()
        mainloop.run()
old mode 100755 (executable)
new mode 100644 (file)
index 8a7e2f6..321adf8
@@ -2,7 +2,7 @@
 
 from __future__ import absolute_import, print_function, unicode_literals
 
-from gi.repository import GObject
+import gobject
 
 import dbus
 import dbus.mainloop.glib
@@ -36,5 +36,5 @@ if __name__ == "__main__":
        except:
                pass
 
-       mainloop = GObject.MainLoop()
+       mainloop = gobject.MainLoop()
        mainloop.run()