Skip to content

Commit

Permalink
This is part of canonical#586 that includes the changes of job and te…
Browse files Browse the repository at this point in the history
…st plan

only.

1. New jobs that uses prime_offload_tester.py to valid GPU rendering.
2. New test plans that conbimes integrated and discrete GPU into one.
3. Remove unnecessary jobs and test plans after switching to new graphic test strategy.
  • Loading branch information
hanhsuan committed Jan 17, 2024
1 parent 1fc82b4 commit 9b361b1
Show file tree
Hide file tree
Showing 6 changed files with 270 additions and 48 deletions.
76 changes: 76 additions & 0 deletions providers/base/units/graphics/jobs.pxu
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,82 @@ command:
fi
_summary: Check the OpenGL renderer (AMD GPU and DRI_PRIME=1, nvidia GPU and __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia)

unit: template
template-resource: graphics_card
plugin: shell
category_id: com.canonical.plainbox::graphics
id: graphics/{index}_auto_glxgears_{product_slug}
flags: also-after-suspend
requires: executable.name == 'glxgears'
user: root
command:
# shellcheck disable=SC1091
prime_offload_tester.py -c glxgears -p {pci_device_name} -d {driver} -t 30
estimated_duration: 30s
summary:
Auto-Test that glxgears works for {vendor} {product}

unit: template
template-resource: graphics_card
plugin: user-interact-verify
category_id: com.canonical.plainbox::graphics
id: graphics/{index}_valid_glxgears_{product_slug}
flags: also-after-suspend
requires: executable.name == 'glxgears'
user: root
command:
# shellcheck disable=SC1091
prime_offload_tester.py -c glxgears -p {pci_device_name} -d {driver} -t 30
estimated_duration: 30s
summary:
Maunal-Test that glxgears works for {vendor} {product}
purpose:
This test tests the basic 3D capabilities of your {vendor} {product} video card
steps:
1. Click "Test" to execute an OpenGL demo, and will be closed after 30s.
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
plugin: shell
category_id: com.canonical.plainbox::graphics
id: graphics/{index}_auto_glxgears_fullscreen_{product_slug}
flags: also-after-suspend
requires: executable.name == 'glxgears'
user: root
command:
# shellcheck disable=SC1091
prime_offload_tester.py -c "glxgears -fullscreen" -p {pci_device_name} -d {driver} -t 30
estimated_duration: 30s
summary:
Auto-Test that glxgears works on fullscreen for {vendor} {product}

unit: template
template-resource: graphics_card
plugin: user-interact-verify
category_id: com.canonical.plainbox::graphics
id: graphics/{index}_valid_glxgears_fullscreen_{product_slug}
flags: also-after-suspend
requires: executable.name == 'glxgears'
user: root
command:
# shellcheck disable=SC1091
prime_offload_tester.py -c "glxgears -fullscreen" -p {pci_device_name} -d {driver} -t 30
estimated_duration: 30s
summary:
Maunal-Test that glxgears works on fullscreen for {vendor} {product}
purpose:
This test tests the basic fullscreen 3D capabilities of your {vendor} {product} video card
steps:
1. Click "Test" to execute an OpenGL demo, and will be closed after 30s.
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
plugin: user-interact-verify
Expand Down
89 changes: 88 additions & 1 deletion providers/base/units/graphics/test-plan.pxu
Original file line number Diff line number Diff line change
@@ -1,3 +1,90 @@
id: graphics-gpu-cert-full
unit: test plan
_name: Graphics tests (GPU)
_description:
Graphics tests (GPU)
include:
bootstrap_include:
graphics_card
nested_part:
com.canonical.certification::graphics-gpu-cert-automated
com.canonical.certification::graphics-gpu-cert-manual

id: graphics-gpu-cert-automated
unit: test plan
_name: Graphics tests (Automated)
_description:
Graphics tests (Automated)
include:
graphics/VESA_drivers_not_in_use certification-status=blocker
graphics/1_driver_version_.* certification-status=blocker
graphics/1_gl_support_.* certification-status=blocker
graphics/1_minimum_resolution_.*
graphics/2_driver_version_.* certification-status=blocker
graphics/2_minimum_resolution_.*
graphics/1_auto_glxgears_.* certification-status=blocker
graphics/2_auto_glxgears_.* certification-status=blocker
suspend/resolution_before_suspend certification-status=blocker
bootstrap_include:
graphics_card

id: graphics-gpu-cert-manual
unit: test plan
_name: Graphics tests (Manual)
_description:
Graphics tests (Manual)
include:
miscellanea/chvt
graphics/1_maximum_resolution_.* certification-status=blocker
graphics/1_rotation_.* certification-status=blocker
graphics/1_video_.* certification-status=blocker
graphics/1_cycle_resolution_.* certification-status=non-blocker
graphics/1_valid_glxgears_.* certification-status=blocker
graphics/2_valid_glxgears_.* certification-status=blocker
bootstrap_include:
graphics_card

id: after-suspend-graphics-gpu-cert-full
unit: test plan
_name: After suspend tests
_description: After suspend tests
include:
nested_part:
com.canonical.certification::after-suspend-graphics-gpu-cert-automated
com.canonical.certification::after-suspend-graphics-gpu-cert-manual

id: after-suspend-graphics-gpu-cert-automated
unit: test plan
_name: After suspend tests (GPU automated)
_description: After suspend tests (GPU automated)
include:
suspend/suspend-time-check certification-status=non-blocker
suspend/suspend-single-log-attach certification-status=non-blocker
after-suspend-graphics/VESA_drivers_not_in_use certification-status=blocker
after-suspend-graphics/1_driver_version_.* certification-status=blocker
after-suspend-graphics/1_gl_support_.* certification-status=blocker
after-suspend-graphics/1_minimum_resolution_.*
after-suspend-graphics/1_auto_glxgears_.* certification-status=blocker
after-suspend-graphics/2_auto_glxgears_.* certification-status=blocker
suspend/resolution_after_suspend certification-status=blocker

id: after-suspend-graphics-gpu-cert-manual
unit: test plan
_name: After suspend tests (GPU manual)
_description: After suspend tests (GPU manual)
include:
power-management/lid_close_suspend_open certification-status=blocker
power-management/lid certification-status=blocker
after-suspend-miscellanea/chvt
suspend/display_after_suspend certification-status=blocker
after-suspend-graphics/1_maximum_resolution_.* certification-status=blocker
after-suspend-graphics/1_rotation_.* certification-status=blocker
after-suspend-graphics/1_video_.* certification-status=blocker
after-suspend-graphics/1_cycle_resolution_.* certification-status=non-blocker
after-suspend-graphics/1_valid_glxgears_.* certification-status=blocker
after-suspend-graphics/2_valid_glxgears_.* certification-status=blocker
suspend/1_xrandr_screens_after_suspend.tar.gz_auto

id: graphics-integrated-gpu-cert-full
unit: test plan
_name: Graphics tests (integrated GPU)
Expand Down Expand Up @@ -228,4 +315,4 @@ include:
suspend/2_display_after_suspend_.*_graphics certification-status=blocker
suspend/2_glxgears_after_suspend_.*_graphics certification-status=blocker
suspend/2_rotation_after_suspend_.*_graphics certification-status=blocker
suspend/2_video_after_suspend_.*_graphics certification-status=blocker
suspend/2_video_after_suspend_.*_graphics certification-status=blocker
89 changes: 89 additions & 0 deletions providers/base/units/monitor/test-plan.pxu
Original file line number Diff line number Diff line change
@@ -1,3 +1,92 @@
id: monitor-gpu-cert-full
unit: test plan
_name: Monitor tests (GPU)
_description:
Monitor tests (GPU)
include:
bootstrap_include:
graphics_card
nested_part:
com.canonical.certification::monitor-gpu-cert-manual
com.canonical.certification::monitor-gpu-cert-automated

id: monitor-gpu-cert-automated
unit: test plan
_name: Monitor tests (GPU) (Automated)
_description:
Monitor tests (GPU) (Automated)
include:
bootstrap_include:
graphics_card

id: monitor-gpu-cert-manual
unit: test plan
_name: Monitor tests (GPU) (Manual)
_description:
Monitor tests (GPU) (Manual)
include:
monitor/1_powersaving_.* certification-status=blocker
power-management/light_sensor
monitor/1_dim_brightness_.* certification-status=blocker
monitor/1_displayport_.* certification-status=blocker
audio/1_playback_displayport_.* certification-status=blocker
monitor/1_type-c_displayport_.* certification-status=blocker
audio/1_playback_type-c_displayport_.* certification-status=blocker
monitor/1_type-c_hdmi_.* certification-status=blocker
audio/1_playback_type-c_hdmi_.* certification-status=blocker
monitor/1_type-c_vga_.* certification-status=blocker
monitor/1_dvi_.* certification-status=blocker
monitor/1_hdmi_.* certification-status=blocker
audio/1_playback_hdmi_.* certification-status=blocker
monitor/1_thunderbolt3_.* certification-status=non-blocker
audio/1_playback_thunderbolt3_.* certification-status=non-blocker
thunderbolt3/daisy-chain certification-status=non-blocker
bootstrap_include:
graphics_card

id: after-suspend-monitor-gpu-cert-full
unit: test plan
_name: Monitor tests (after suspend, GPU)
_description: Monitor tests (after suspend, GPU)
include:
nested_part:
after-suspend-monitor-gpu-cert-manual
after-suspend-monitor-gpu-cert-automated

id: after-suspend-monitor-gpu-cert-automated
unit: test plan
_name: Monitor tests (after suspend, GPU) (Automated)
_description:
Monitor tests (after suspend, GPU) (Automated)
include:
bootstrap_include:
graphics_card

id: after-suspend-monitor-gpu-cert-manual
unit: test plan
_name: Monitor tests (after suspend, GPU) (Manual)
_description:
Monitor tests (after suspend, GPU) (Manual)
include:
after-suspend-monitor/1_powersaving_.* certification-status=blocker
after-suspend-power-management/light_sensor
after-suspend-monitor/1_dim_brightness_.* certification-status=blocker
after-suspend-monitor/1_displayport_.* certification-status=blocker
after-suspend-audio/1_playback_displayport_.* certification-status=blocker
after-suspend-monitor/1_type-c_displayport_.* certification-status=blocker
after-suspend-audio/1_playback_type-c_displayport_.* certification-status=blocker
after-suspend-monitor/1_type-c_hdmi_.* certification-status=blocker
after-suspend-audio/1_playback_type-c_hdmi_.* certification-status=blocker
after-suspend-monitor/1_type-c_vga_.* certification-status=blocker
after-suspend-monitor/1_dvi_.* certification-status=blocker
after-suspend-monitor/1_hdmi_.* certification-status=blocker
after-suspend-audio/1_playback_hdmi_.* certification-status=blocker
after-suspend-monitor/1_thunderbolt3_.* certification-status=non-blocker
after-suspend-audio/1_playback_thunderbolt3_.* certification-status=non-blocker
after-suspend-thunderbolt3/daisy-chain certification-status=non-blocker
bootstrap_include:
graphics_card

id: monitor-integrated-gpu-cert-full
unit: test plan
_name: Monitor tests (integrated GPU)
Expand Down
1 change: 1 addition & 0 deletions providers/base/units/suspend/suspend.pxu
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,7 @@ _summary: Attaches the log from the single hybrid sleep/resume test
plugin: shell
category_id: com.canonical.plainbox::suspend
id: suspend/suspend-time-check
depends: suspend/suspend_advanced_auto
estimated_duration: 1.2
command: [ -e "$PLAINBOX_SESSION_SHARE"/suspend_single_times.log ] && sleep_time_check.py "$PLAINBOX_SESSION_SHARE"/suspend_single_times.log
_summary: Ensure time to suspend/resume is under threshold
Expand Down
31 changes: 8 additions & 23 deletions providers/certification-client/units/client-cert-desktop-24-04.pxu
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,8 @@ nested_part:
bluetooth-cert-manual
camera-cert-manual
thunderbolt-cert-manual
monitor-integrated-gpu-cert-manual
graphics-integrated-gpu-cert-manual
graphics-discrete-gpu-cert-manual
monitor-discrete-gpu-cert-manual
monitor-gpu-cert-manual
graphics-gpu-cert-manual
cpu-cert-manual
input-cert-manual
disk-cert-manual
Expand All @@ -50,14 +48,8 @@ nested_part:
wireless-cert-manual
# start of suspend related tests
# suspend point
# Test discrete card first, if present, since it's the one we will be using
# after coming back from suspend if the system has hybrid graphics.
after-suspend-graphics-discrete-gpu-cert-manual
after-suspend-monitor-discrete-gpu-cert-full
# Now we ask to switch to the integrated graphics card. This requires a
# restart of checkbox.
after-suspend-graphics-integrated-gpu-cert-manual
after-suspend-monitor-integrated-gpu-cert-full
after-suspend-graphics-gpu-cert-manual
after-suspend-monitor-gpu-cert-manual
suspend-key-led-oops-check-cert
after-suspend-audio-cert-full
after-suspend-bluetooth-cert-manual
Expand Down Expand Up @@ -97,10 +89,8 @@ nested_part:
bluetooth-cert-automated
camera-cert-automated
thunderbolt-cert-automated
monitor-integrated-gpu-cert-automated
graphics-integrated-gpu-cert-automated
graphics-discrete-gpu-cert-automated
monitor-discrete-gpu-cert-automated
monitor-gpu-cert-automated
graphics-gpu-cert-automated
cpu-cert-automated
input-cert-automated
disk-cert-automated
Expand All @@ -126,14 +116,9 @@ nested_part:
before-suspend-reference-cert-full
# suspend point
after-suspend-reference-cert-full
# Test discrete card first, if present, since it's the one we will be using
# after coming back from suspend if the system has hybrid graphics.
after-suspend-audio-cert-automated
after-suspend-graphics-discrete-gpu-cert-automated
# after-suspend-monitor-discrete-gpu-cert-automated # not defined
# Now we ask to switch to the integrated graphics card.
after-suspend-graphics-integrated-gpu-cert-automated
# after-suspend-monitor-integrated-gpu-cert-automated # not defined
after-suspend-graphics-gpu-cert-automated
# after-suspend-monitor-gpu-cert-automated # not defined
after-suspend-cpu-cert-automated
after-suspend-input-cert-automated
after-suspend-disk-cert-automated
Expand Down
Loading

0 comments on commit 9b361b1

Please sign in to comment.