diff options
author | Pierre Equoy <pierre.equoy@canonical.com> | 2016-06-16 15:17:53 +0800 |
---|---|---|
committer | Pierre Equoy <pierre.equoy@canonical.com> | 2016-06-16 15:17:53 +0800 |
commit | 156136a465d1e26835a4bfa4831394155a5da03a (patch) | |
tree | cf04e9fbee70bff20be9345676c984dfa6858570 /jobs | |
parent | b35cdb3cd68361d0cc2f41345cec783666fa4cfb (diff) |
provider:checkbox: Add ability to test AMD hybrid graphics with open source drivers on Xenial
Starting with Xenial, AMD discrete GPU will use the open source drivers (either 'amdgpu' either 'radeon'). For the moment, these drivers do not come with a GUI, so in order to activate the discrete GPU, users must setup PRIME offloading and use the CLI and prefix any command with 'DRI_PRIME=1'. Graphics tests were updated to reflect this. It should only impact devices using an AMD discrete GPU and Ubuntu 16.04 (Xenial).
Diffstat (limited to 'jobs')
-rw-r--r-- | jobs/graphics.txt.in | 66 | ||||
-rw-r--r-- | jobs/suspend-graphics.txt.in | 191 |
2 files changed, 243 insertions, 14 deletions
diff --git a/jobs/graphics.txt.in b/jobs/graphics.txt.in index ea44ae0..b171a56 100644 --- a/jobs/graphics.txt.in +++ b/jobs/graphics.txt.in @@ -3,7 +3,9 @@ template-resource: graphics_card plugin: shell category_id: 2013.com.canonical.plainbox::graphics id: graphics/{index}_driver_version_{product_slug} -command: graphics_driver +command: + source graphics_env {vendor_slug} {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 _summary: Test X driver/version for {vendor} {product} @@ -103,7 +105,9 @@ category_id: 2013.com.canonical.plainbox::graphics id: graphics/{index}_minimum_resolution_{product_slug} requires: device.category == 'VIDEO' -command: resolution_test --horizontal 800 --vertical 600 +command: + source graphics_env {vendor_slug} {index} + resolution_test --horizontal 800 --vertical 600 estimated_duration: 0.331 _summary: Test that {vendor} {product} meets minimum resolution requirement _description: @@ -120,6 +124,7 @@ requires: device.category == 'VIDEO' package.name == 'zenity' command: + source graphics_env {vendor_slug} {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" @@ -182,7 +187,9 @@ category_id: 2013.com.canonical.plainbox::graphics requires: package.name == 'xorg' package.name == 'gir1.2-gst-plugins-base-0.10' or package.name == 'gir1.2-gst-plugins-base-1.0' -command: gst_pipeline_test -t 2 'videotestsrc ! videoconvert ! autovideosink' || gst_pipeline_test -t 2 'videotestsrc ! ffmpegcolorspace ! autovideosink' +command: + source graphics_env {vendor_slug} {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: PURPOSE: @@ -207,7 +214,9 @@ category_id: 2013.com.canonical.plainbox::graphics id: graphics/{index}_cycle_resolution_{product_slug} requires: package.name == 'xorg' depends: graphics/VESA_drivers_not_in_use -command: xrandr_cycle --screenshot-dir $PLAINBOX_SESSION_SHARE +command: + source graphics_env {vendor_slug} {index} + xrandr_cycle --screenshot-dir $PLAINBOX_SESSION_SHARE estimated_duration: 250.000 _summary: Test resolution cycling for {vendor} {product} _description: @@ -224,7 +233,9 @@ plugin: user-interact-verify category_id: 2013.com.canonical.plainbox::graphics id: graphics/{index}_rotation_{product_slug} depends: graphics/xorg-version -command: rotation_test_using_dbus +command: + source graphics_env {vendor_slug} {index} + rotation_test_using_dbus estimated_duration: 20.000 _summary: Test rotation for {vendor} {product} _description: @@ -242,7 +253,9 @@ plugin: shell category_id: 2013.com.canonical.plainbox::graphics id: graphics/{index}_compiz_check_{product_slug} requires: package.name == 'nux-tools' -command: ! /usr/lib/nux/unity_support_test -c -p 2>&1 | ansi_parser | grep -e ":\(\s\+\)no$" -ie "error" +command: + source graphics_env {vendor_slug} {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 _summary: Test Compiz support for {vendor} {product} @@ -264,7 +277,10 @@ plugin: user-interact-verify category_id: 2013.com.canonical.plainbox::graphics id: graphics/{index}_glxgears_{product_slug} requires: package.name == 'mesa-utils' -command: glxgears; true +command: + source graphics_env {vendor_slug} {index} + glxgears + true _summary: Test that glxgears works for {vendor} {product} _description: PURPOSE: @@ -379,14 +395,36 @@ category_id: 2013.com.canonical.plainbox::graphics id: graphics/{index}_switch_card_{product_slug} _summary: Test GPU switching for {vendor} {product} _description: - PURPOSE: +_purpose: Manually switch to the {vendor} {product} card. - STEPS: - 1. If your system is already running with the {vendor} {product} card, then please mark this test as "passed" and proceed. - 2. Using the appropriate tool (either NVidia settings or AMD Control Center), switch your system to use the {vendor} {product} graphics card. This will require restarting your session. - 3. Once the session restarts, please restart this testing program and select "continue" when prompted for a resume action. - 4. Don't answer the verification question until the system has restarted with the {vendor} {product} card enabled. - VERIFICATION: +_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 (either NVidia settings or AMD Control Center), switch your system to use the {vendor} {product} graphics card. This will require restarting your session. + 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: + Is the system using the {vendor} {product} card now? + +unit: template +template-resource: graphics_card +plugin: manual +category_id: 2013.com.canonical.plainbox::graphics +id: graphics/{index}_switch_card_{product_slug}_xenial +requires: + device.driver in ['nouveau', 'nvidia'] + lsb.codename == 'xenial' +_summary: Test GPU switching for {vendor} {product} +_description: +_purpose: + Manually switch to the {vendor} {product} card. +_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. + 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: Is the system using the {vendor} {product} card now? unit: template diff --git a/jobs/suspend-graphics.txt.in b/jobs/suspend-graphics.txt.in new file mode 100644 index 0000000..be86f05 --- /dev/null +++ b/jobs/suspend-graphics.txt.in @@ -0,0 +1,191 @@ +unit: template +template-resource: graphics_card +plugin: shell +category_id: 2013.com.canonical.plainbox::suspend +id: suspend/{index}_resolution_before_suspend_{product_slug}_xenial +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} + xrandr -q |grep '*'| awk '{{print $1}}' > $PLAINBOX_SESSION_SHARE/{index}_resolution_before_suspend.txt + +unit: template +template-resource: graphics_card +plugin: user-interact-verify +category_id: 2013.com.canonical.plainbox::suspend +id: suspend/{index}_suspend_after_switch_to_card_{product_slug}_xenial +requires: + sleep.mem == 'supported' + rtc.state == 'supported' +after: graphics/{index}_switch_card_{product_slug}_xenial +user: root +environ: PLAINBOX_SESSION_SHARE +command: + if type -P fwts >/dev/null; then + echo "Calling fwts" + set -o pipefail; 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 + 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.) + +unit: template +template-resource: graphics_card +plugin: shell +category_id: 2013.com.canonical.plainbox::suspend +id: suspend/{index}_resolution_after_suspend_{product_slug}_xenial +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} + xrandr -q |grep '*'| awk '{{print $1}}' | diff $PLAINBOX_SESSION_SHARE/{index}_resolution_before_suspend.txt - + +unit: template +template-resource: graphics_card +plugin: manual +category_id: 2013.com.canonical.plainbox::suspend +id: suspend/{index}_display_after_suspend_{product_slug}_xenial +after: suspend/{index}_suspend_after_switch_to_card_{product_slug}_xenial +_summary: Test display function after suspend for {vendor} {product} +_description: + PURPOSE: + This test will check that the display is correct after suspend and resume on the {vendor} {product} graphics card. + STEPS: + 1. Check that your display does not show up visual artifacts after resuming. + VERIFICATION: + Does the display work normally after resuming from suspend using the {vendor} {product} graphics card? + +unit: template +template-resource: graphics_card +plugin: user-interact-verify +category_id: 2013.com.canonical.plainbox::suspend +id: suspend/{index}_cycle_resolutions_after_suspend_{product_slug}_xenial +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} + xrandr_cycle --keyword={index}_after_suspend --screenshot-dir $PLAINBOX_SESSION_SHARE +_description: + PURPOSE: + This test will cycle through the detected display modes + STEPS: + 1. Click "Test" and the display will cycle trough the display modes + VERIFICATION: + Did your display look fine in the detected mode? + +unit: template +template-resource: graphics_card +plugin: attachment +category_id: 2013.com.canonical.plainbox::suspend +id: suspend/{index}_xrandr_screens_after_suspend.tar.gz_xenial +depends: suspend/{index}_cycle_resolutions_after_suspend_{product_slug}_xenial +command: [ -f $PLAINBOX_SESSION_SHARE/{index}_xrandr_screens_after_suspend.tgz ] && base64 $PLAINBOX_SESSION_SHARE/{index}_xrandr_screens_after_suspend.tgz +_description: This attaches screenshots from the suspend/cycle_resolutions_after_suspend test to the results submission. + +unit: template +template-resource: graphics_card +plugin: shell +category_id: 2013.com.canonical.plainbox::suspend +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} + ! /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 +_summary: Test Compiz support for {product} after suspend + +unit: template +template-resource: graphics_card +plugin: user-interact-verify +category_id: 2013.com.canonical.plainbox::suspend +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} + glxgears + true +_summary: Test that glxgears works for {vendor} {product} after suspend +_description: + PURPOSE: + This test tests the basic 3D capabilities of your {vendor} {product} video card after suspend + STEPS: + 1. Click "Test" to execute an OpenGL demo. Press ESC at any time to close. + 2. Verify that the animation is not jerky or slow. + VERIFICATION: + 1. Did the 3d animation appear? + 2. Was the animation free from slowness/jerkiness? + +unit: template +template-resource: graphics_card +id: suspend/{index}_video_after_suspend_{product_slug}_xenial +after: suspend/{index}_suspend_after_switch_to_card_{product_slug}_xenial +plugin: user-interact-verify +category_id: 2013.com.canonical.plainbox::suspend +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} + 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: + PURPOSE: + This test will test the default display after suspend with a sample video + STEPS: + 1. Click "Test" to display a video test. + VERIFICATION: + Do you see color bars and static? + +unit: template +template-resource: graphics_card +plugin: shell +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} + 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 +_summary: Test X driver/version after suspend for {vendor} {product} + +unit: template +template-resource: graphics_card +plugin: attachment +category_id: 2013.com.canonical.plainbox::suspend +id: suspend/{index}_suspend-single-log-attach_{product_slug}_xenial +depends: suspend/{index}_suspend_after_switch_to_card_{product_slug}_xenial +command: [ -e $PLAINBOX_SESSION_SHARE/{index}_suspend_single.log ] && cat $PLAINBOX_SESSION_SHARE/{index}_suspend_single.log +_description: + Attaches the log from the single suspend/resume test to the results + +unit: template +template-resource: graphics_card +plugin: shell +category_id: 2013.com.canonical.plainbox::suspend +id: suspend/{index}_suspend-time-check_{product_slug}_xenial +depends: suspend/{index}_suspend_after_switch_to_card_{product_slug}_xenial +estimated_duration: 1.2 +command: [ -e $PLAINBOX_SESSION_SHARE/{index}_suspend_single_times.log ] && sleep_time_check $PLAINBOX_SESSION_SHARE/{index}_suspend_single_times.log +_description: Checks the sleep times to ensure that a machine suspends and resumes within a given threshold + |