Merge ~sylvain-pineau/plainbox-provider-resource:add-total-gpus into plainbox-provider-resource:master

Proposed by Sylvain Pineau
Status: Merged
Approved by: Sylvain Pineau
Approved revision: 277751b7b7c3213325c0f243b6713193c0451371
Merged at revision: c3df3088844e6d0285dfd0c42128469ee7250da8
Proposed branch: ~sylvain-pineau/plainbox-provider-resource:add-total-gpus
Merge into: plainbox-provider-resource:master
Diff against target: 12 lines (+1/-0)
1 file modified
bin/graphics_card_resource (+1/-0)
Reviewer Review Type Date Requested Status
Maciej Kisielewski Approve
Sylvain Pineau (community) Needs Resubmitting
Review via email: mp+354556@code.launchpad.net

Description of the change

Add a new graphics card resource property to know how many gpus are available on the SUT.

We can later use it in template jobs (see commit msg)

To post a comment you must log in.
Revision history for this message
Maciej Kisielewski (kissiel) wrote :

One subjective comment below.

Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

much better indeed, I'll change it.

Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

Done

review: Needs Resubmitting
Revision history for this message
Maciej Kisielewski (kissiel) wrote :

Thank you! +1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/bin/graphics_card_resource b/bin/graphics_card_resource
2index 1bbd806..e3e9ed7 100755
3--- a/bin/graphics_card_resource
4+++ b/bin/graphics_card_resource
5@@ -137,6 +137,7 @@ def main():
6 try:
7 for index, record in enumerate(video_devices, 1):
8 record['index'] = index
9+ record['gpu_count'] = len(video_devices)
10 if record['vendor_id'] == '4098': # vendor == amd/ati
11 if subprocess.call(
12 ['dpkg-query', '-W', 'vulkan-amdgpu-pro'],

Subscribers

People subscribed via source and target branches