From ce824e12e3f4d544506a4eb2d6ffcdb0325c4126 Mon Sep 17 00:00:00 2001 From: Sylvain Pineau Date: Thu, 24 Aug 2017 17:16:00 +0200 Subject: graphics: Add a pretest to check the opengl renderer (AMD GPU and DRI_PRIME=1) Fixes: LP:1712018 --- jobs/graphics.txt.in | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/jobs/graphics.txt.in b/jobs/graphics.txt.in index 036c1386..a7af65a4 100644 --- a/jobs/graphics.txt.in +++ b/jobs/graphics.txt.in @@ -277,6 +277,22 @@ estimated_duration: 0.131 _description: Check that {vendor} {product} hardware is able to run Unity 3D _summary: Test Unity 3D support for {vendor} {product} +unit: template +template-resource: graphics_card +template-filter: graphics_card.driver in ['amdgpu', 'amdgpu-pro'] +plugin: shell +category_id: com.canonical.plainbox::graphics +id: graphics/{index}_valid_opengl_renderer_{product_slug} +requires: package.name == 'mesa-utils' +command: + renderer=`DRI_PRIME=1 glxinfo | grep "OpenGL re"` + echo $renderer + if grep -qi 'Intel' <<<$renderer; then + echo 'ERROR: renderer is Intel when DRI_PRIME=1' + exit 1 + fi +_summary: Check the OpenGL renderer (AMD GPU and DRI_PRIME=1) + unit: template template-resource: graphics_card plugin: user-interact-verify -- cgit v1.2.3