From 0e017d59d7664941eb68decb810df1b4b5a45782 Mon Sep 17 00:00:00 2001 From: Betty Lin Date: Thu, 8 Aug 2019 16:39:58 +0800 Subject: Fix redundant suspend test 1. Modify the manual suspend test "suspend/{index}_suspend_after_switch_to_card_{product_slug}_auto" to auto suspend. The reason we changed here is because in full test, if the platform has both intergrated card and discreted card, it will run manual suspend twice. And in current test plan "after-suspend-graphics-integrated-gpu-cert-full", the first job "graphics/1_auto_switch_card_.*" will reboot the machine and then it runs two jobs "suspend/1_suspend-time-check_.*_auto" and "suspend/1_suspend-single-log-attach_.*_auto" which are not running after suspend. This modification can avoid the problem and user only run manual suspend once. 2. Separated manual and automated test plan. This will be more clear when we nested test plan. --- units/suspend/suspend-graphics.pxu | 27 ++++++--------------------- 1 file changed, 6 insertions(+), 21 deletions(-) (limited to 'units/suspend') diff --git a/units/suspend/suspend-graphics.pxu b/units/suspend/suspend-graphics.pxu index b6fb230..d4fe923 100644 --- a/units/suspend/suspend-graphics.pxu +++ b/units/suspend/suspend-graphics.pxu @@ -14,7 +14,7 @@ command: unit: template template-resource: graphics_card template-filter: graphics_card.prime_gpu_offload == 'Off' -plugin: user-interact-verify +plugin: shell category_id: com.canonical.plainbox::suspend id: suspend/{index}_suspend_after_switch_to_card_{product_slug}_auto requires: @@ -24,27 +24,12 @@ after: graphics/{index}_auto_switch_card_{product_slug} user: root environ: PLAINBOX_SESSION_SHARE command: - if type -P fwts >/dev/null; then - echo "Calling fwts" - set -o pipefail; checkbox-support-fwts_test -f none -l $PLAINBOX_SESSION_SHARE/{index}_suspend_single -s s3 --s3-sleep-delay=30 --s3-device-check --s3-device-check-delay=45 | tee $PLAINBOX_SESSION_SHARE/{index}_suspend_single_times.log - else - echo "Calling sleep_test" - set -o pipefail; sleep_test -p | tee $PLAINBOX_SESSION_SHARE/{index}_suspend_single_times.log + if [[ -v SNAP ]]; then + export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$SNAP/usr/lib/fwts" fi -estimated_duration: 90.0 -_summary: Test suspend/resume after switching to {vendor} {product} -_description: - PURPOSE: - This test will check suspend and resume after switching to {vendor} {product} graphics card. - STEPS: - 1. Ensure you have switched to {vendor} {product} graphics card. - 2. Click "Test" and your system will suspend for about 30 - 60 seconds - 3. Observe the Power LED to see if it blinks or changes color during suspend - 4. If your system does not wake itself up after 60 seconds, please press the power button momentarily to wake the system manually - 5. If your system fails to wake at all and must be rebooted, restart System Testing after reboot and mark this test as Failed - VERIFICATION: - Did your system suspend and resume correctly after switching to {vendor} {product} graphics card? - (NOTE: Please only consider whether the system successfully suspended and resumed. Power/Suspend LED verification will occur after this test is completed.) + set -o pipefail; checkbox-support-fwts_test -f none -l $PLAINBOX_SESSION_SHARE/{index}_suspend_single -s s3 --s3-sleep-delay=30 --s3-device-check --s3-device-check-delay=45 | tee $PLAINBOX_SESSION_SHARE/{index}_suspend_single_times.log +estimated_duration: 1m30s +_summary: Test auto suspend/resume after switching to {vendor} {product} unit: template template-resource: graphics_card -- cgit v1.2.3