Merge ~cypressyew/hwcert-tools:rpi-snapdragon into hwcert-tools:master

Proposed by Po-Hsu Lin
Status: Merged
Approved by: Po-Hsu Lin
Approved revision: 916e11095fba005e2cc595a8017b4c151a44ac5e
Merged at revision: 8bad80aecc73e95dc5ac43055eea95fa8bddf497
Proposed branch: ~cypressyew/hwcert-tools:rpi-snapdragon
Merge into: hwcert-tools:master
Diff against target: 31 lines (+4/-3)
1 file modified
sru_tools/manage_sru (+4/-3)
Reviewer Review Type Date Requested Status
Paul Larson Approve
Pierre Equoy Approve
Po-Hsu Lin Needs Resubmitting
Review via email: mp+296425@code.launchpad.net

Description of the change

Add capability for detecting different raspberry pi kernels, and the snapdragon kernels.
And add the trusty 4.4 kernel to the list.

Note, this should be merged after https://code.launchpad.net/~cypressyew/hwcert-tools/+git/hwcert-tools/+merge/296010

This fixes:
https://bugs.launchpad.net/hwcert-tools/+bug/1588794
https://bugs.launchpad.net/hwcert-tools/+bug/1588796

To post a comment you must log in.
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

You can test it by applying the following bug titles in bug.titles

Bug #1582847 in Kernel SRU Workflow certification-testing: "linux-raspi2: 4.4.0-1011.14 -proposed tracker"
Bug #1583089 in Kernel SRU Workflow certification-testing: "linux-raspi2: 4.2.0-1030.39 -proposed tracker"
Bug #1582679 in Kernel SRU Workflow certification-testing: "linux-snapdragon: 4.4.0-1014.16 -proposed tracker"

It's expected to see that for raspberry pi tasks, the codename will become:
raspi2-xenial
raspi2-wily

And for snapdragon:
snapdragon-xenial

The filename will be $codename + "_kernel"

Revision history for this message
Paul Larson (pwlars) wrote :

Looks good. One minor suggestion below, feel free to use it or not. +1

review: Approve
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

Oooh, right
this is way more pythonic, I will fix that.
Thanks!

Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

Updated with kernel_name in ('linux-raspi2', 'linux-snapdragon')

review: Needs Resubmitting
Revision history for this message
Pierre Equoy (pieq) wrote :

Looks good, and yes, I love the "if x in (a, b, c)" Pythonic way of dealing with choices :)

review: Approve
Revision history for this message
Paul Larson (pwlars) wrote :

+1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/sru_tools/manage_sru b/sru_tools/manage_sru
2index b5ff09a..8109a48 100755
3--- a/sru_tools/manage_sru
4+++ b/sru_tools/manage_sru
5@@ -28,6 +28,7 @@ RELEASES = {'2.6': 'lucid',
6 '3.16lts': 'trusty',
7 '3.19lts': 'trusty',
8 '4.2lts': 'trusty',
9+ '4.4lts': 'trusty',
10 '4.2': 'wily',
11 '4.4': 'xenial'}
12
13@@ -60,15 +61,15 @@ def notify_kernels(sru_workflow):
14 dir_list = ""
15 # update the kernel files in KERNELS_CACHE here
16 for bug in confirmed_bugs:
17- kernel_name = re.search('(?<=: \")[a-z\-]+', bug.title).group(0)
18+ kernel_name = re.search('(?<=: \")[a-z\-\d]+', bug.title).group(0)
19 kernel_ver = re.search('(?<=: )[\w.~\-]+', bug.title).group(0)
20 # write them into the corresponding kernel file
21 # deal with the non-lts first
22 codename = kernel_ver.split('.0-')[0]
23 if (kernel_name == 'linux'):
24 codename = RELEASES.get(codename)
25- elif (kernel_name == 'linux-raspi'):
26- codename = kernel_name
27+ elif kernel_name in ('linux-raspi2', 'linux-snapdragon'):
28+ codename = kernel_name.split('-')[1] + '-' + RELEASES.get(codename)
29 else: # deal with the lts version here
30 if codename + 'lts' in RELEASES:
31 codename = RELEASES.get(codename + 'lts') + '-' + codename

Subscribers

People subscribed via source and target branches