[virt-tools-list] [virt-manager][PATCH 3/3] virtconvtest: Fix vmx2libvirt test

Cole Robinson crobinso at redhat.com
Fri Jan 15 16:46:46 UTC 2016


On 01/15/2016 02:27 AM, Michal Privoznik wrote:
> The test consists of translating VMX configuration into domain
> XML and converting disks. Cool. But the disk is zipped in a file
> and the test tries to string match unzipping command. Problem is,
> the absolute path is passed to the unzip command which makes it
> impossible for the test to succeed on other hosts.
> 
> Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
> ---
>  tests/virtconv-files/libvirt_output/vmx2libvirt_test-vmx-zip.libvirt | 2 +-
>  tests/virtconvtest.py                                                | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/virtconv-files/libvirt_output/vmx2libvirt_test-vmx-zip.libvirt b/tests/virtconv-files/libvirt_output/vmx2libvirt_test-vmx-zip.libvirt
> index b046c66..b13662c 100644
> --- a/tests/virtconv-files/libvirt_output/vmx2libvirt_test-vmx-zip.libvirt
> +++ b/tests/virtconv-files/libvirt_output/vmx2libvirt_test-vmx-zip.libvirt
> @@ -73,5 +73,5 @@
>  </domain>
>  
>  
> -test-vmx-zip.zip appears to be an archive, running: unzip -o -d /var/tmp/virt-convert-tmp /home/crobinso/src/virt-manager/tests/virtconv-files/vmx_input/test-vmx-zip.zip
> +test-vmx-zip.zip appears to be an archive, running: unzip -o -d /var/tmp/virt-convert-tmp vmx_input/test-vmx-zip.zip
>  Copying MS-DOS.vmdk to /var/lib/libvirt/images/MS-DOS
> diff --git a/tests/virtconvtest.py b/tests/virtconvtest.py
> index 622117f..859e8e0 100644
> --- a/tests/virtconvtest.py
> +++ b/tests/virtconvtest.py
> @@ -49,7 +49,7 @@ class TestVirtConv(unittest.TestCase):
>          ignore, out_xml = guest.start_install(return_xml=True)
>          out_expect = out_xml
>          if outbuf.getvalue():
> -            out_expect += ("\n\n" + outbuf.getvalue())
> +            out_expect += ("\n\n" + outbuf.getvalue().replace(base_dir, "" ))
> 

Extra whitespace here. Pushed with that changed, thanks!

- Cole




More information about the virt-tools-list mailing list