Skip to content

Commit

Permalink
contest: vm: handle empty virtme options
Browse files Browse the repository at this point in the history
virtme's argument parsing doesn't deal well with an empty
string in the command line

Signed-off-by: Pedro Tammela <[email protected]>
Signed-off-by: Jakub Kicinski <[email protected]>
  • Loading branch information
tammela authored and kuba-moo committed Feb 2, 2024
1 parent 606826a commit e07428e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion contest/remote/lib/vm.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,10 @@ def start(self, cwd=None):
cmd = cmd.split(' ')
if cwd:
cmd += ["--cwd", cwd]
cmd += self.config.get('vm', 'virtme_opt').split(',')

opts = self.config.get('vm', 'virtme_opt', fallback="")
cmd += opts.split(',') if opts else []

cpus = self.config.get('vm', 'cpus', fallback="")
if cpus:
cmd += ["--cpus", cpus]
Expand Down

0 comments on commit e07428e

Please sign in to comment.