From cab32f1715157fabd8cb60029cf8eb4abdeead23 Mon Sep 17 00:00:00 2001 From: Betty Lin Date: Tue, 22 Sep 2020 14:56:42 +0800 Subject: update depends to suspend_advanced_auto To let the test plan 'after-suspend-reference-cert-automated' and 'after-suspend-reference-cert-blockers' can run fully automatically, do the following changes: 1. Create the _auto jobs for 'network_after_suspend'and 'bluetooth_detect_after_suspend' 2. Use the jobs which depends 'suspend_adavanced_auto' in the test plans --- units/suspend/suspend.pxu | 34 ++++++++++++++++++++++++++++++++++ units/suspend/test-plan.pxu | 28 ++++++++++++++-------------- 2 files changed, 48 insertions(+), 14 deletions(-) (limited to 'units/suspend') diff --git a/units/suspend/suspend.pxu b/units/suspend/suspend.pxu index 9a9ced6..034f97b 100644 --- a/units/suspend/suspend.pxu +++ b/units/suspend/suspend.pxu @@ -409,6 +409,14 @@ depends: suspend/suspend_advanced suspend/network_before_suspend _description: Test the network after resuming. command: network_wait.sh; gateway_ping_test.py | diff "$PLAINBOX_SESSION_SHARE"/network_before_suspend.txt - +plugin: shell +category_id: com.canonical.plainbox::suspend +id: suspend/network_after_suspend_auto +estimated_duration: 20.0 +depends: suspend/suspend_advanced_auto suspend/network_before_suspend +_description: Test the network after resuming. +command: network_wait.sh; gateway_ping_test.py | diff "$PLAINBOX_SESSION_SHARE"/network_before_suspend.txt - + plugin: shell category_id: com.canonical.plainbox::suspend id: suspend/resolution_after_suspend @@ -947,6 +955,32 @@ command: _description: This test grabs the hardware address of the bluetooth adapter after suspend and compares it to the address grabbed before suspend. +plugin: shell +category_id: com.canonical.plainbox::suspend +id: suspend/bluetooth_detect_after_suspend_auto +depends: suspend/suspend_advanced_auto bluetooth/detect-output +estimated_duration: 1.2 +requires: + package.name == 'bluez' + device.category == 'BLUETOOTH' +command: + 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 + output=$(hcitool dev | tail -n+2 | awk '{print $2}') + echo "$output" | diff "$PLAINBOX_SESSION_SHARE"/bluetooth_address - + if [ -z "$output" ]; then + echo "BT hardware not available" + exit 1 + fi +_description: + This test grabs the hardware address of the bluetooth adapter after suspend and compares it to the address grabbed before suspend. + plugin: shell category_id: com.canonical.plainbox::suspend id: suspend/bluetooth_obex_send_after_suspend diff --git a/units/suspend/test-plan.pxu b/units/suspend/test-plan.pxu index 4bc26bf..66b38a2 100644 --- a/units/suspend/test-plan.pxu +++ b/units/suspend/test-plan.pxu @@ -44,13 +44,13 @@ unit: test plan _name: After suspend reference tests (automated) _description: After suspend reference tests (automated) include: - suspend/network_after_suspend certification-status=blocker - suspend/audio_after_suspend certification-status=blocker - suspend/cpu_after_suspend certification-status=blocker - suspend/memory_after_suspend certification-status=blocker - suspend/bluetooth_detect_after_suspend certification-status=blocker - suspend/bluetooth_obex_send_after_suspend certification-status=blocker - after-suspend-manual-bluetooth4/beacon_eddystone_url_.* certification-status=blocker + suspend/network_after_suspend_auto certification-status=blocker + suspend/audio_after_suspend_auto certification-status=blocker + suspend/cpu_after_suspend_auto certification-status=blocker + suspend/memory_after_suspend_auto certification-status=blocker + suspend/bluetooth_detect_after_suspend_auto certification-status=blocker + suspend/bluetooth_obex_send_after_suspend_auto certification-status=blocker + after-suspend-bluetooth4/beacon_eddystone_url_.* certification-status=blocker bootstrap_include: device @@ -73,13 +73,13 @@ unit: test plan _name: After suspend reference tests (certification blockers only) _description: After suspend reference tests (certification blockers only) include: - suspend/network_after_suspend certification-status=blocker - suspend/audio_after_suspend certification-status=blocker - suspend/cpu_after_suspend certification-status=blocker - suspend/memory_after_suspend certification-status=blocker - suspend/bluetooth_detect_after_suspend certification-status=blocker - suspend/bluetooth_obex_send_after_suspend certification-status=blocker - after-suspend-manual-bluetooth4/beacon_eddystone_url_.* certification-status=blocker + suspend/network_after_suspend_auto certification-status=blocker + suspend/audio_after_suspend_auto certification-status=blocker + suspend/cpu_after_suspend_auto certification-status=blocker + suspend/memory_after_suspend_auto certification-status=blocker + suspend/bluetooth_detect_after_suspend_auto certification-status=blocker + suspend/bluetooth_obex_send_after_suspend_auto certification-status=blocker + after-suspend-bluetooth4/beacon_eddystone_url_.* certification-status=blocker bootstrap_include: device -- cgit v1.2.3