Skip to content

Commit

Permalink
Merge pull request autotest#5855 from vwu-vera/check-v2v-version
Browse files Browse the repository at this point in the history
v2v: fix failed case on checking v2v version for rhel10
  • Loading branch information
xiaodwan authored Aug 26, 2024
2 parents 3f06325 + 158ea6e commit c376953
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions v2v/tests/src/v2v_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -587,9 +587,11 @@ def check_alloc():
'Not found disk or xml created by virt-v2v-copy-to-local')
if checkpoint == 'check_version':
get_v2v_version = process.run('rpm -q virt-v2v', shell=True, ignore_status=True)
if (''.join(filter(str.isdigit, str(output_stdout)))[1:4] +
''.join(filter(str.isdigit, str(output_stdout)))[5]) != \
''.join(filter(str.isdigit, str(get_v2v_version.stdout)))[1:5]:
get_rpm_version = re.search(r'(\d+\.\d+\.\d+-\d+\.el\d+)', str(get_v2v_version.stdout))
rpm_version = get_rpm_version.group(1)
get_virt_v2v_version = re.search(r'(\d+\.\d+\.\d+).*(\d+\.el\d+)', str(output_stdout))
virt_v2v_version = get_virt_v2v_version.group(1) + '-' + get_virt_v2v_version.group(2)
if (rpm_version != virt_v2v_version):
test.fail('v2v version is incorrect in v2v version option')

log_check = utils_v2v.check_log(params, output)
Expand Down

0 comments on commit c376953

Please sign in to comment.