summaryrefslogtreecommitdiff
path: root/jobs
diff options
authorPierre Equoy <pierre.equoy@canonical.com>2016-09-12 18:26:58 +0800
committerPierre Equoy <pierre.equoy@canonical.com>2016-09-12 18:26:58 +0800
commit2916c166fe827941d8e37d355418a136cfb2897d (patch)
tree199b31fa9a73af09415171ce6d1e31d22e602933 /jobs
parent83a3ca8bcc86bb191ec682811463ebf3585d55f0 (diff)
providers:checkbox: Adapt graphics jobs to take amdgpu-pro drivers into account
The amdgpu-pro drivers are based on the open source amdgpu drivers (so udev shows the same driver name for both amdgpu and amdgpu-pro installs), but use a dedicated script (amdgpu-pro-px) to switch between integrated and discrete GPUs. We adapt the existing jobs and scripts to take this into account, based on Sylvain's modification to graphics_card resource job that allows to show 'amdgpu-pro' as driver name when the amdgpu-pro metapackage is present on the system. Fixes: https://bugs.launchpad.net/plainbox-provider-certification-client/+bug/1622477
Diffstat (limited to 'jobs')
-rw-r--r--jobs/graphics.txt.in23
-rw-r--r--jobs/suspend-graphics.txt.in14
2 files changed, 20 insertions, 17 deletions
diff --git a/jobs/graphics.txt.in b/jobs/graphics.txt.in
index b171a56..ad4bce2 100644
--- a/jobs/graphics.txt.in
+++ b/jobs/graphics.txt.in
@@ -4,7 +4,7 @@ plugin: shell
category_id: 2013.com.canonical.plainbox::graphics
id: graphics/{index}_driver_version_{product_slug}
command:
- source graphics_env {vendor_slug} {index}
+ source graphics_env {driver} {index}
graphics_driver
estimated_duration: 0.5
_description: Parses Xorg.0.Log and discovers the running X driver and version for the {vendor} {product} graphics card
@@ -106,7 +106,7 @@ id: graphics/{index}_minimum_resolution_{product_slug}
requires:
device.category == 'VIDEO'
command:
- source graphics_env {vendor_slug} {index}
+ source graphics_env {driver} {index}
resolution_test --horizontal 800 --vertical 600
estimated_duration: 0.331
_summary: Test that {vendor} {product} meets minimum resolution requirement
@@ -124,7 +124,7 @@ requires:
device.category == 'VIDEO'
package.name == 'zenity'
command:
- source graphics_env {vendor_slug} {index}
+ source graphics_env {driver} {index}
maxi="$(xrandr -q |grep -A 1 "connected\( primary\)* [0-9]" |tail -1 |awk '{{print $1}}')"
now="$(python3 -c 'from gi.repository import Gdk; screen=Gdk.Screen.get_default(); geo = screen.get_monitor_geometry(screen.get_primary_monitor()); print(geo.width, "x", geo.height, sep="")')"
test "$maxi" != "$now" && notify="\nPlease switch to the maximum resolution \nfor every graphic tests"
@@ -188,7 +188,7 @@ requires:
package.name == 'xorg'
package.name == 'gir1.2-gst-plugins-base-0.10' or package.name == 'gir1.2-gst-plugins-base-1.0'
command:
- source graphics_env {vendor_slug} {index}
+ source graphics_env {driver} {index}
gst_pipeline_test -t 2 'videotestsrc ! videoconvert ! autovideosink' || gst_pipeline_test -t 2 'videotestsrc ! ffmpegcolorspace ! autovideosink'
_summary: Test that video can be displayed with {vendor} {product}
_description:
@@ -215,7 +215,7 @@ id: graphics/{index}_cycle_resolution_{product_slug}
requires: package.name == 'xorg'
depends: graphics/VESA_drivers_not_in_use
command:
- source graphics_env {vendor_slug} {index}
+ source graphics_env {driver} {index}
xrandr_cycle --screenshot-dir $PLAINBOX_SESSION_SHARE
estimated_duration: 250.000
_summary: Test resolution cycling for {vendor} {product}
@@ -234,7 +234,7 @@ category_id: 2013.com.canonical.plainbox::graphics
id: graphics/{index}_rotation_{product_slug}
depends: graphics/xorg-version
command:
- source graphics_env {vendor_slug} {index}
+ source graphics_env {driver} {index}
rotation_test_using_dbus
estimated_duration: 20.000
_summary: Test rotation for {vendor} {product}
@@ -254,7 +254,7 @@ category_id: 2013.com.canonical.plainbox::graphics
id: graphics/{index}_compiz_check_{product_slug}
requires: package.name == 'nux-tools'
command:
- source graphics_env {vendor_slug} {index}
+ source graphics_env {driver} {index}
! /usr/lib/nux/unity_support_test -c -p 2>&1 | ansi_parser | grep -e ":\(\s\+\)no$" -ie "error"
estimated_duration: 0.130
_description: Check that {vendor} {product} hardware is able to run compiz
@@ -278,7 +278,7 @@ category_id: 2013.com.canonical.plainbox::graphics
id: graphics/{index}_glxgears_{product_slug}
requires: package.name == 'mesa-utils'
command:
- source graphics_env {vendor_slug} {index}
+ source graphics_env {driver} {index}
glxgears
true
_summary: Test that glxgears works for {vendor} {product}
@@ -412,7 +412,7 @@ plugin: manual
category_id: 2013.com.canonical.plainbox::graphics
id: graphics/{index}_switch_card_{product_slug}_xenial
requires:
- device.driver in ['nouveau', 'nvidia']
+ graphics_card.driver in ['nouveau', 'nvidia', 'amdgpu-pro']
lsb.codename == 'xenial'
_summary: Test GPU switching for {vendor} {product}
_description:
@@ -421,7 +421,10 @@ _purpose:
_steps:
Note: If your system is already running with the {vendor} {product} card, then please mark this test as "passed" and proceed.
.
- 1. Using the appropriate tool (e.g. NVidia settings), switch your system to use the {vendor} {product} graphics card. This will require restarting your session.
+ 1. Using the appropriate tool (e.g. NVidia settings, amdgpu-pro-px), switch your system to use the {vendor} {product} graphics card. This will require restarting your session.
+ If using amdgpu-pro drivers, use the following command to switch to:
+ - integrated GPU: sudo /opt/amdgpu-pro/bin/amdgpu-pro-px --mode powersaving
+ - discrete GPU: sudo /opt/amdgpu-pro/bin/amdgpu-pro-px --mode performance
2. Once the session restarts, please restart this testing program and select "continue" when prompted for a resume action.
3. Don't answer the verification question until the system has restarted with the {vendor} {product} card enabled.
_verification:
diff --git a/jobs/suspend-graphics.txt.in b/jobs/suspend-graphics.txt.in
index be86f05..9a35da2 100644
--- a/jobs/suspend-graphics.txt.in
+++ b/jobs/suspend-graphics.txt.in
@@ -7,7 +7,7 @@ after: graphics/{index}_switch_card_{product_slug}_xenial
estimated_duration: 1.2
_description: Record the current resolution before suspending.
command:
- source graphics_env {vendor_slug} {index}
+ source graphics_env {driver} {index}
xrandr -q |grep '*'| awk '{{print $1}}' > $PLAINBOX_SESSION_SHARE/{index}_resolution_before_suspend.txt
unit: template
@@ -53,7 +53,7 @@ estimated_duration: 1.2
depends: suspend/{index}_resolution_before_suspend_{product_slug}_xenial
_description: Test to see that we have the same resolution after resuming as before.
command:
- source graphics_env {vendor_slug} {index}
+ source graphics_env {driver} {index}
xrandr -q |grep '*'| awk '{{print $1}}' | diff $PLAINBOX_SESSION_SHARE/{index}_resolution_before_suspend.txt -
unit: template
@@ -80,7 +80,7 @@ requires: package.name == 'xorg'
after: suspend/{index}_suspend_after_switch_to_card_{product_slug}_xenial
estimated_duration: 120.0
command:
- source graphics_env {vendor_slug} {index}
+ source graphics_env {driver} {index}
xrandr_cycle --keyword={index}_after_suspend --screenshot-dir $PLAINBOX_SESSION_SHARE
_description:
PURPOSE:
@@ -107,7 +107,7 @@ id: suspend/{index}_compiz_check_after_suspend_{product_slug}_xenial
after: suspend/{index}_suspend_after_switch_to_card_{product_slug}_xenial
requires: package.name == 'nux-tools'
command:
- source graphics_env {vendor_slug} {index}
+ source graphics_env {driver} {index}
! /usr/lib/nux/unity_support_test -c -p 2>&1 | ansi_parser | grep -e ":\(\s\+\)no$" -ie "error"
estimated_duration: 0.130
_description: Check that {product} hardware is able to run compiz after suspend
@@ -121,7 +121,7 @@ id: suspend/{index}_glxgears_after_suspend_{product_slug}_xenial
after: suspend/{index}_suspend_after_switch_to_card_{product_slug}_xenial
requires: package.name == 'mesa-utils'
command:
- source graphics_env {vendor_slug} {index}
+ source graphics_env {driver} {index}
glxgears
true
_summary: Test that glxgears works for {vendor} {product} after suspend
@@ -145,7 +145,7 @@ requires:
package.name == 'xorg'
package.name == 'gir1.2-gst-plugins-base-0.10' or package.name == 'gir1.2-gst-plugins-base-1.0'
command:
- source graphics_env {vendor_slug} {index}
+ source graphics_env {driver} {index}
gst_pipeline_test -t 2 'videotestsrc ! videoconvert ! autovideosink' || gst_pipeline_test -t 2 'videotestsrc ! ffmpegcolorspace ! autovideosink'
_summary: Test that video can be displayed after suspend with {vendor} {product}
_description:
@@ -163,7 +163,7 @@ category_id: 2013.com.canonical.plainbox::suspend
id: suspend/{index}_driver_version_after_suspend_{product_slug}_xenial
after: suspend/{index}_suspend_after_switch_to_card_{product_slug}_xenial
command:
- source graphics_env {vendor_slug} {index}
+ source graphics_env {driver} {index}
graphics_driver
estimated_duration: 0.500
_description: Parses Xorg.0.Log and discovers the running X driver and version after suspend for the {vendor} {product} graphics card