diff options
author | Po-Hsu Lin <po-hsu.lin@canonical.com> | 2015-09-09 15:25:52 +0800 |
---|---|---|
committer | Po-Hsu Lin <po-hsu.lin@canonical.com> | 2015-09-09 15:25:52 +0800 |
commit | 712aa4bb51bf97e34f9cac478c154bfbe27efeac (patch) | |
tree | c12171255a3eb5523fb0345541ffa0d14bb2b05e | |
parent | a3a0546226fb56b8da899a67556f5b67366eee7a (diff) |
provider:checkbox remove the outdated obex_send script and tests
Remove the outdated obex_send script, which has already been replaced by bluetooth_test script, also remove those corresponding test cases.
-rwxr-xr-x | bin/obex_send | 84 | ||||
-rw-r--r-- | jobs/suspend.txt.in | 125 |
2 files changed, 0 insertions, 209 deletions
diff --git a/bin/obex_send b/bin/obex_send deleted file mode 100755 index b9de23f..0000000 --- a/bin/obex_send +++ /dev/null @@ -1,84 +0,0 @@ -#!/usr/bin/env python3 - -import os -import sys -import time -import dbus -import dbus.service -import dbus.mainloop.glib - -from gi.repository import GObject - -class Agent(dbus.service.Object): - def __init__(self, conn=None, obj_path=None): - dbus.service.Object.__init__(self, conn, obj_path) - - @dbus.service.method("org.openobex.Agent", - in_signature="o", out_signature="s") - def Request(self, path): - print("Transfer Request") - self.transfer = dbus.Interface(bus.get_object("org.openobex.client", - path), - "org.openobex.Transfer") - properties = self.transfer.GetProperties() - for key in list(properties.keys()): - print(" %s = %s" % (key, properties[key])) - self.start = True - return "" - - @dbus.service.method("org.openobex.Agent", - in_signature="ot", out_signature="") - def Progress(self, path, transferred): - if (self.start): - print("Transfer Started") - properties = self.transfer.GetProperties() - self.transfer_size = properties['Size'] - self.start_time = time.time() - self.start = False - else: - speed = transferred / abs((time.time() - self.start_time) * 1000) - progress = ("(" + str(transferred) + "/" + str(self.transfer_size) - + " bytes) @ " + str(int(speed)) + " kB/s") - out = "\rTransfer progress " + progress - sys.stdout.write(out) - sys.stdout.flush() - return - - @dbus.service.method("org.openobex.Agent", - in_signature="o", out_signature="") - def Complete(self, path): - print("\nTransfer finished") - return - - @dbus.service.method("org.openobex.Agent", - in_signature="os", out_signature="") - def Error(self, path, error): - print("\nTransfer finished with an error: %s" % (error)) - return - - @dbus.service.method("org.openobex.Agent", - in_signature="", out_signature="") - def Release(self): - mainloop.quit() - return - -if __name__ == '__main__': - dbus.mainloop.glib.DBusGMainLoop(set_as_default=True) - - bus = dbus.SessionBus() - client = dbus.Interface(bus.get_object("org.openobex.client", "/"), - "org.openobex.Client") - - if (len(sys.argv) < 3): - print("Usage: %s <device> <file> [file*]" % (sys.argv[0])) - sys.exit(1) - - path = "/test/agent" - agent = Agent(bus, path) - - mainloop = GObject.MainLoop() - files = [os.path.realpath(f) for f in sys.argv[2:]] - - client.SendFiles({"Destination": sys.argv[1]}, files, path) - - mainloop.run() diff --git a/jobs/suspend.txt.in b/jobs/suspend.txt.in index e450b9f..3c6a45a 100644 --- a/jobs/suspend.txt.in +++ b/jobs/suspend.txt.in @@ -132,35 +132,6 @@ command: _description: This test executes iperf connection performance/stability against the broadband device found on the system before suspend. - -plugin: shell -category_id: 2013.com.canonical.plainbox::suspend -id: suspend/bluetooth_obex_before_suspend -estimated_duration: 10.0 -requires: - package.name == 'bluez' - package.name == 'obexd-client' - device.category == 'BLUETOOTH' -command: - if [ -z "$BTDEVADDR" ] - then - echo "btdevaddr option not set to device address of Bluetooth target in checkbox.ini" - exit 1 - fi - if rfkill list bluetooth | grep -q 'Hard blocked: yes' - then - echo "rfkill shows BT is hard blocked" - fi - if rfkill list bluetooth | grep -q 'Soft blocked: yes' - then - echo "rfkill shows BT is soft blocked, removing before testing." - rfkill unblock bluetooth - sleep 3 - fi - obex_send $BTDEVADDR $PLAINBOX_PROVIDER_DATA/images/JPEG_Color_Image_Ubuntu.jpg -_description: - This is an automated Bluetooth file transfer test. It sends an image to the device specified by the BTDEVADDR environment variable. - plugin: shell category_id: 2013.com.canonical.plainbox::suspend id: suspend/bluetooth_obex_send_before_suspend @@ -247,25 +218,6 @@ _description: plugin: user-interact-verify category_id: 2013.com.canonical.plainbox::suspend -id: suspend/bluetooth_obex_before_suspend_manual -estimated_duration: 120.0 -requires: - package.name == 'bluez' - package.name == 'obexd-client' - device.category == 'BLUETOOTH' -command: rfkill unblock bluetooth; obex_send `bluetooth_scan` $PLAINBOX_PROVIDER_DATA/images/JPEG_Color_Image_Ubuntu.jpg -_description: - PURPOSE: - This test will send the image 'JPEG_Color_Image_Ubuntu.jpg' to a specified device - STEPS: - 1. Make sure Bluetooth is enabled by checking the Bluetooth indicator applet - 2. Click "Test" and you will be prompted to enter the Bluetooth device name of a device that can accept file transfers (It may take a few moments after entering the name for the file to begin sending) - 3. Accept any prompts that appear on both devices - VERIFICATION: - Was the data correctly transferred? - -plugin: user-interact-verify -category_id: 2013.com.canonical.plainbox::suspend id: suspend/suspend_advanced requires: sleep.mem == 'supported' @@ -1295,64 +1247,6 @@ _description: plugin: shell category_id: 2013.com.canonical.plainbox::suspend -id: suspend/bluetooth_obex_after_suspend -depends: suspend/suspend_advanced suspend/bluetooth_obex_before_suspend -estimated_duration: 10.0 -requires: - package.name == 'bluez' - package.name == 'obexd-client' - device.category == 'BLUETOOTH' -command: - if [ -z "$BTDEVADDR" ] - then - echo "btdevaddr option not set to device address of Bluetooth target in checkbox.ini" - exit 1 - fi - if rfkill list bluetooth | grep -q 'Hard blocked: yes' - then - echo "rfkill shows BT is hard blocked" - fi - if rfkill list bluetooth | grep -q 'Soft blocked: yes' - then - echo "rfkill shows BT is soft blocked, removing before testing." - rfkill unblock bluetooth - sleep 3 - fi - obex_send $BTDEVADDR $PLAINBOX_PROVIDER_DATA/images/JPEG_Color_Image_Ubuntu.jpg -_description: - This is an automated Bluetooth file transfer test. It sends an image to the device specified by the BTDEVADDR environment variable. - -plugin: shell -category_id: 2013.com.canonical.plainbox::suspend -id: suspend/bluetooth_obex_after_suspend_auto -depends: suspend/suspend_advanced_auto suspend/bluetooth_obex_before_suspend -estimated_duration: 10.0 -requires: - package.name == 'bluez' - package.name == 'obexd-client' - device.category == 'BLUETOOTH' -command: - if [ -z "$BTDEVADDR" ] - then - echo "btdevaddr option not set to device address of Bluetooth target in checkbox.ini" - exit 1 - fi - if rfkill list bluetooth | grep -q 'Hard blocked: yes' - then - echo "rfkill shows BT is hard blocked" - fi - if rfkill list bluetooth | grep -q 'Soft blocked: yes' - then - echo "rfkill shows BT is soft blocked, removing before testing." - rfkill unblock bluetooth - sleep 3 - fi - obex_send $BTDEVADDR $PLAINBOX_PROVIDER_DATA/images/JPEG_Color_Image_Ubuntu.jpg -_description: - This is an automated Bluetooth file transfer test. It sends an image to the device specified by the BTDEVADDR environment variable. - -plugin: shell -category_id: 2013.com.canonical.plainbox::suspend id: suspend/bluetooth_obex_send_after_suspend depends: suspend/suspend_advanced estimated_duration: 10.0 @@ -1527,25 +1421,6 @@ _description: plugin: user-interact-verify category_id: 2013.com.canonical.plainbox::suspend -id: suspend/bluetooth_obex_after_suspend_manual -depends: suspend/suspend_advanced suspend/bluetooth_obex_before_suspend_manual -estimated_duration: 120.0 -requires: - package.name == 'bluez' - package.name == 'obexd-client' - device.category == 'BLUETOOTH' -command: rfkill unblock bluetooth; obex_send `bluetooth_scan` $PLAINBOX_PROVIDER_DATA/images/JPEG_Color_Image_Ubuntu.jpg -_description: - PURPOSE: - This test will send the image 'JPEG_Color_Image_Ubuntu.jpg' to a specified device - STEPS: - 1. Click "Test" and you will be prompted to enter the Bluetooth device name of a device that can accept file transfers (It may take a few moments after entering the name for the file to begin sending) - 2. Accept any prompts that appear on both devices - VERIFICATION: - Was the data correctly transferred? - -plugin: user-interact-verify -category_id: 2013.com.canonical.plainbox::suspend id: suspend/cycle_resolutions_after_suspend estimated_duration: 120.0 requires: package.name == 'xorg' |