diff options
author | Jonathan Cave <jonathan.cave@canonical.com> | 2019-08-20 15:39:23 +0100 |
---|---|---|
committer | Jonathan Cave <jonathan.cave@canonical.com> | 2019-08-20 15:39:23 +0100 |
commit | 1ab2b7af5c629822dc3e19d996cc6f679eed300f (patch) | |
tree | 89c6524713e4b82c7f99cf14627a645e837c467b /units/bluetooth | |
parent | 255e942d610715d781a8d4a3ba07c6064f599d75 (diff) |
bluetooth: import from p-p-snappy
Diffstat (limited to 'units/bluetooth')
-rw-r--r-- | units/bluetooth/category.pxu | 11 | ||||
-rw-r--r-- | units/bluetooth/jobs.pxu | 131 | ||||
-rw-r--r-- | units/bluetooth/resource.pxu | 84 | ||||
-rw-r--r-- | units/bluetooth/test-plan.pxu | 116 |
4 files changed, 342 insertions, 0 deletions
diff --git a/units/bluetooth/category.pxu b/units/bluetooth/category.pxu new file mode 100644 index 00000000..0afc46af --- /dev/null +++ b/units/bluetooth/category.pxu @@ -0,0 +1,11 @@ +unit: category +id: bluetooth +_name: Bluetooth + +unit: category +id: bluetooth_bluez5_selftests +_name: Bluetooth - BlueZ Self Tests + +unit: category +id: after-suspend-bluetooth_bluez5_selftests +_name: Suspend - Bluetooth - BlueZ Self Tests diff --git a/units/bluetooth/jobs.pxu b/units/bluetooth/jobs.pxu index 6160e766..2fa2606a 100644 --- a/units/bluetooth/jobs.pxu +++ b/units/bluetooth/jobs.pxu @@ -261,3 +261,134 @@ user: root flags: also-after-suspend also-after-suspend-manual category_id: com.canonical.plainbox::bluetooth estimated_duration: 10 + +unit: template +template-resource: bluez-internal-rfcomm-tests +template-unit: job +id: bluetooth/bluez-internal-rfcomm-tests_{bluez-internal-rfcomm-test} +category_id: bluetooth_bluez5_selftests +_summary: BlueZ-{bluez-internal-rfcomm-test} +_description: + Runs a specific test from the rfcomm test suite +plugin: shell +user: root +flags: also-after-suspend +command: + rfcomm-tester -p "{bluez-internal-rfcomm-test}" +requires: device.category == 'BLUETOOTH' +estimated_duration: 2.0 + +unit: template +template-resource: bluez-internal-hci-tests +template-unit: job +id: bluetooth/bluez-internal-hci-tests_{bluez-internal-hci-test} +category_id: bluetooth_bluez5_selftests +_summary: BlueZ-{bluez-internal-hci-test} +_description: + Runs a specific test from the hci test suite +plugin: shell +user: root +flags: also-after-suspend +command: + hci-tester -p "{bluez-internal-hci-test}" +requires: device.category == 'BLUETOOTH' +estimated_duration: 2.0 + +unit: template +template-resource: bluez-internal-mgmt-tests +template-unit: job +id: bluetooth/bluez-internal-mgmt-tests_{bluez-internal-mgmt-test} +category_id: bluetooth_bluez5_selftests +_summary: BlueZ-{bluez-internal-mgmt-test} +_description: + Runs a specific test from the mgmt test suite +plugin: shell +user: root +flags: also-after-suspend +command: + mgmt-tester -p "{bluez-internal-mgmt-test}" +requires: device.category == 'BLUETOOTH' +estimated_duration: 2.0 + +unit: template +template-resource: bluez-internal-uc-tests +template-unit: job +id: bluetooth/bluez-internal-uc-tests_{bluez-internal-uc-test} +category_id: bluetooth_bluez5_selftests +_summary: BlueZ-{bluez-internal-uc-test} +_description: + Runs a specific test from the user channel test suite +plugin: shell +user: root +flags: also-after-suspend +command: + userchan-tester -p "{bluez-internal-uc-test}" +requires: device.category == 'BLUETOOTH' +estimated_duration: 2.0 + +unit: template +template-resource: bluez-internal-bnep-tests +template-unit: job +id: bluetooth/bluez-internal-bnep-tests_{bluez-internal-bnep-test} +category_id: bluetooth_bluez5_selftests +_summary: BlueZ-{bluez-internal-bnep-test} +_description: + Runs a specific test from the bnep test suite +plugin: shell +user: root +flags: also-after-suspend +command: + bnep-tester -p "{bluez-internal-bnep-test}" +requires: device.category == 'BLUETOOTH' +estimated_duration: 2.0 + +id: bluetooth/keyboard +_summary: Bluetooth keyboard works +_purpose: + Check if bluetooth keyboard works +_verification: + Did the keyboard work? +plugin: user-verify +user: root +flags: also-after-suspend +command: test_bt_keyboard +category_id: bluetooth +estimated_duration: 1m + +id: bluetooth/keyboard-manual +_summary: Bluetooth keyboard manual test +_purpose: + Check bluetooth input device works +_steps: + 1. Run the following command to start bluetoothctl console: + sudo bluetoothctl -a + ***Following steps are run in bluetoothctl console*** + 2. Power on the device: + power on + 3. Register agent for keyboard: + agent KeyboardOnly + default-agent + 4. Put controller in pairable mode: + pairable on + 5. Scan nearby bluetooth device: + scan on + 6. Stop Scanning after bluetooth keyboard is found: + scan off + 7. Pair bluetooth + pair [MAC address of bluetooth keyboard] + 8. Enter PIN Code on bluetooth keyboard if needed + 9. Trust the bluetooth keyboard + trust [MAC address of bluetooth keyboard] + 10. Connect to bluetooth keyboard: + connect [MAC address of bluetooth keyboard] + 11. Quit bluetoothctl console + quit + 12. Use bluetooth keyboard to input + **for headless please check the input outside the bluetooth console by using: + $ sudo cat /dev/tty1 +_verification: + Confirm characters from Bluetooth input device are displayed correctly +plugin: manual +flags: also-after-suspend-manual +category_id: bluetooth +estimated_duration: 5m diff --git a/units/bluetooth/resource.pxu b/units/bluetooth/resource.pxu new file mode 100644 index 00000000..24783e28 --- /dev/null +++ b/units/bluetooth/resource.pxu @@ -0,0 +1,84 @@ +unit: job +id: bluez-internal-rfcomm-tests +plugin: resource +_summary: Gather list of tests provided by bluez rfcomm test binary +_description: + Bluez includes some internal test that exercise the stack. This resource + collects a list of the provided rfcomm tests. +requires: device.category == 'BLUETOOTH' +command: + rfcomm-tester -l | while read i + do + echo "bluez-internal-rfcomm-test: $i" + echo + done +estimated_duration: 2s +flags: preserve-locale + +unit: job +id: bluez-internal-hci-tests +plugin: resource +_summary: Gather list of tests provided by bluez hci test binary +_description: + Bluez includes some internal test that exercise the stack. This resource + collects a list of the provided hci tests. +requires: device.category == 'BLUETOOTH' +command: + hci-tester -l | while read i + do + echo "bluez-internal-hci-test: $i" + echo + done +estimated_duration: 2s +flags: preserve-locale + +unit: job +id: bluez-internal-mgmt-tests +plugin: resource +_summary: Gather list of tests provided by bluez mgmt test binary +_description: + Bluez includes some internal test that exercise the stack. This resource + collects a list of the provided mgmt tests. +requires: device.category == 'BLUETOOTH' +command: + mgmt-tester -l | while read i + do + echo "bluez-internal-mgmt-test: $i" + echo + done +estimated_duration: 2s +flags: preserve-locale + +unit: job +id: bluez-internal-uc-tests +plugin: resource +_summary: Gather list of tests provided by bluez user channel test binary +_description: + Bluez includes some internal test that exercise the stack. This resource + collects a list of the provided user channel tests. +requires: device.category == 'BLUETOOTH' +command: + userchan-tester -l | while read i + do + echo "bluez-internal-uc-test: $i" + echo + done +estimated_duration: 2s +flags: preserve-locale + +unit: job +id: bluez-internal-bnep-tests +plugin: resource +_summary: Gather list of tests provided by bluez bnep test binary +_description: + Bluez includes some internal test that exercise the stack. This resource + collects a list of the provided bnep tests. +requires: device.category == 'BLUETOOTH' +command: + bnep-tester -l | while read i + do + echo "bluez-internal-bnep-test: $i" + echo + done +estimated_duration: 2s +flags: preserve-locale diff --git a/units/bluetooth/test-plan.pxu b/units/bluetooth/test-plan.pxu index 2b1819bb..69497aeb 100644 --- a/units/bluetooth/test-plan.pxu +++ b/units/bluetooth/test-plan.pxu @@ -34,3 +34,119 @@ include: bluetooth4/HOGP-mouse certification-status=blocker bluetooth4/HOGP-keyboard certification-status=blocker bluetooth/audio-a2dp certification-status=blocker + +id: bluetooth-full +unit: test plan +_name: Bluetooth tests +_description: QA tests for Bluetooth +estimated_duration: 6m +include: +nested_part: + bluetooth-manual + bluez-automated + +id: bluetooth-manual +unit: test plan +_name: Manual Bluetooth tests +_description: Manual QA tests for Bluetooth +estimated_duration: 5m +include: + bluetooth/keyboard-manual + +id: bluez-automated +unit: test plan +_name: Automated tests for bluez +_description: + Automated tests for bluez +estimated_duration: 1m +include: + bluetooth/detect + bluetooth/bluez-controller-detect + bluetooth/bluez-internal-rfcomm-tests_.* + bluetooth/bluez-internal-hci-tests_.* + # Blacklist all mngt tests since they randomly fail + # (even with upstream 5.45) + # Note: The mgmt tests are not that much critical as these just test + # the management interface. + # Next line is commented out until upstream fixes the issue + # bluetooth/bluez-internal-mgmt-tests_.* + bluetooth/bluez-internal-uc-tests_.* + bluetooth/bluez-internal-bnep-tests_.* + bluetooth4/beacon_eddystone_url_.* +bootstrap_include: + device + bluez-internal-rfcomm-tests + bluez-internal-hci-tests + # Blacklist all mngt tests since they randomly fail + # (even with upstream 5.45) + # Note: The mgmt tests are not that much critical as these just test + # the management interface. + # Next line is commented out until upstream fixes the issue + # bluez-internal-mgmt-tests + bluez-internal-uc-tests + bluez-internal-bnep-tests +exclude: + # Read Country Code is deprecated + "bluetooth/bluez-internal-hci-tests_Read Country Code" + # Blacklist the following three hci tests, they randomly fail + # (even with upstream 5.45) + "bluetooth/bluez-internal-hci-tests_LE Read Local PK" + "bluetooth/bluez-internal-hci-tests_Read Local Supported Codecs" + "bluetooth/bluez-internal-hci-tests_LE Generate DHKey" + +id: after-suspend-bluetooth-full +unit: test plan +_name: Bluetooth tests (after suspend) +_description: QA tests for Bluetooth +estimated_duration: 6m +include: +nested_part: + after-suspend-bluetooth-manual + after-suspend-bluez-automated + +id: after-suspend-bluetooth-manual +unit: test plan +_name: Manual Bluetooth tests +_description: Manual QA tests for Bluetooth +estimated_duration: 5m +include: + after-suspend-manual-bluetooth/keyboard-manual + +id: after-suspend-bluez-automated +unit: test plan +_name: Automated tests for bluez +_description: + Automated tests for bluez +estimated_duration: 1m +include: + after-suspend-bluetooth/bluez-internal-rfcomm-tests_.* + after-suspend-bluetooth/bluez-internal-hci-tests_.* + # Blacklist all mngt tests since they randomly fail + # (even with upstream 5.45) + # Note: The mgmt tests are not that much critical as these just test + # the management interface. + # Next line is commented out until upstream fixes the issue + # after-suspend-bluetooth/bluez-internal-mgmt-tests_.* + after-suspend-bluetooth/bluez-internal-uc-tests_.* + after-suspend-bluetooth/bluez-internal-bnep-tests_.* + after-suspend-bluetooth4/beacon_eddystone_url_.* +bootstrap_include: + device + bluez-internal-rfcomm-tests + bluez-internal-hci-tests + # Blacklist all mngt tests since they randomly fail + # (even with upstream 5.45) + # Note: The mgmt tests are not that much critical as these just test + # the management interface. + # Next line is commented out until upstream fixes the issue + # bluez-internal-mgmt-tests + bluez-internal-uc-tests + bluez-internal-bnep-tests +exclude: + # Read Country Code is deprecated + "after-suspend-bluetooth/bluez-internal-hci-tests_Read Country Code" + # Blacklist the following three hci tests, they randomly fail + # (even with upstream 5.45) + "after-suspend-bluetooth/bluez-internal-hci-tests_LE Read Local PK" + "after-suspend-bluetooth/bluez-internal-hci-tests_Read Local Supported Codecs" + "after-suspend-bluetooth/bluez-internal-hci-tests_LE Generate DHKey" |