diff options
-rw-r--r-- | units/suspend/suspend-graphics.pxu | 7 | ||||
-rw-r--r-- | units/suspend/suspend.pxu | 24 |
2 files changed, 27 insertions, 4 deletions
diff --git a/units/suspend/suspend-graphics.pxu b/units/suspend/suspend-graphics.pxu index 22012ec..ea17757 100644 --- a/units/suspend/suspend-graphics.pxu +++ b/units/suspend/suspend-graphics.pxu @@ -93,7 +93,12 @@ estimated_duration: 120.0 command: # shellcheck disable=SC1091 source graphics_env.sh {{ driver }} {{ index }} - xrandr_cycle.py --keyword={{ index }}_after_suspend --screenshot-dir "$PLAINBOX_SESSION_SHARE" + if [[ $XDG_SESSION_TYPE == "wayland" ]] + then + gnome_randr_cycle.py --keyword={{ index }}_after_suspend --screenshot-dir="$PLAINBOX_SESSION_SHARE" + else + xrandr_cycle.py --keyword={{ index }}_after_suspend --screenshot-dir="$PLAINBOX_SESSION_SHARE" + fi _description: PURPOSE: This test will cycle through the detected display modes diff --git a/units/suspend/suspend.pxu b/units/suspend/suspend.pxu index 73a56dc..d778f82 100644 --- a/units/suspend/suspend.pxu +++ b/units/suspend/suspend.pxu @@ -1175,7 +1175,13 @@ id: suspend/cycle_resolutions_after_suspend estimated_duration: 120.0 requires: package.name == 'xorg' depends: suspend/suspend_advanced_auto -command: xrandr_cycle.py --keyword=after_suspend --screenshot-dir "$PLAINBOX_SESSION_SHARE" +command: + if [[ $XDG_SESSION_TYPE == "wayland" ]] + then + gnome_randr_cycle.py --keyword=after_suspend --screenshot-dir="$PLAINBOX_SESSION_SHARE" + else + xrandr_cycle.py --keyword=after_suspend --screenshot-dir="$PLAINBOX_SESSION_SHARE" + fi _description: PURPOSE: This test will cycle through the detected display modes @@ -1193,7 +1199,13 @@ id: suspend/{index}_cycle_resolutions_after_suspend_{product_slug} requires: package.name == 'xorg' depends: suspend/{index}_suspend_after_switch_to_card_{product_slug} estimated_duration: 120.0 -command: xrandr_cycle.py --keyword={index}_after_suspend --screenshot-dir "$PLAINBOX_SESSION_SHARE" +command: + if [[ $XDG_SESSION_TYPE == "wayland" ]] + then + gnome_randr_cycle.py --keyword={index}_after_suspend --screenshot-dir="$PLAINBOX_SESSION_SHARE" + else + xrandr_cycle.py --keyword={index}_after_suspend --screenshot-dir="$PLAINBOX_SESSION_SHARE" + fi _description: PURPOSE: This test will cycle through the detected display modes @@ -1211,7 +1223,13 @@ depends: suspend/suspend_advanced_auto _description: This test will check to make sure supported video modes work after a suspend and resume. This is done automatically by taking screenshots and uploading them as an attachment. -command: xrandr_cycle.py --keyword=after_suspend --screenshot-dir "$PLAINBOX_SESSION_SHARE" +command: + if [[ $XDG_SESSION_TYPE == "wayland" ]] + then + gnome_randr_cycle.py --keyword=after_suspend --screenshot-dir="$PLAINBOX_SESSION_SHARE" + else + xrandr_cycle.py --keyword=after_suspend --screenshot-dir="$PLAINBOX_SESSION_SHARE" + fi plugin: attachment category_id: com.canonical.plainbox::suspend |