Skip to content

Commit

Permalink
teuthology/suite: set the kernel branch in the kernel config
Browse files Browse the repository at this point in the history
For inspection by scripts.

Signed-off-by: Patrick Donnelly <[email protected]>
  • Loading branch information
batrick committed Oct 18, 2024
1 parent 5961d42 commit 5bac476
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions teuthology/suite/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,13 +167,16 @@ def choose_kernel(self):
# Put together a stanza specifying the kernel hash
if self.args.kernel_branch == 'distro':
kernel_hash = 'distro'
kernel_branch = 'distro'
# Skip the stanza if '-k none' is given
elif self.args.kernel_branch is None or \
self.args.kernel_branch.lower() == 'none':
kernel_hash = None
kernel_branch = None
else:
kernel_branch = self.args.kernel_branch
kernel_hash = util.get_gitbuilder_hash(
'kernel', self.args.kernel_branch, 'default',
'kernel', kernel_branch, 'default',
self.args.machine_type, self.args.distro,
self.args.distro_version,
)
Expand All @@ -189,7 +192,7 @@ def choose_kernel(self):

if kernel_hash:
log.info("kernel sha1: {hash}".format(hash=kernel_hash))
kernel_dict = dict(kernel=dict(kdb=kdb, sha1=kernel_hash))
kernel_dict = dict(kernel=dict(branch=kernel_branch, kdb=kdb, sha1=kernel_hash))
if kernel_hash != 'distro':
kernel_dict['kernel']['flavor'] = 'default'
else:
Expand Down

0 comments on commit 5bac476

Please sign in to comment.