[virt-tools-list] [virt-manager PATCH] clitest: put fake iso under /tmp dir

Cole Robinson crobinso at redhat.com
Fri Mar 7 14:18:44 UTC 2014


On 03/06/2014 10:09 PM, Chen Hanxiao wrote:
> commit 797afb3b273d08a74119c878b689730f0b36a252
> bring a dir depending issue when using
> fake iso.
> Test output will be undecided when virt-manager source
> in different dirs.
> 
> This patch will touch a fake iso under /tmp,
> so test case will pass on most of the machines.
> 
> Signed-off-by: Chen Hanxiao <chenhanxiao at cn.fujitsu.com>
> ---
>  tests/cli-test-xml/compare/virt-install-location-iso.xml |  2 +-
>  tests/cli-test-xml/fake.iso                              |  0
>  tests/clitest.py                                         | 10 +++++++---
>  3 files changed, 8 insertions(+), 4 deletions(-)
>  delete mode 100644 tests/cli-test-xml/fake.iso
> 
> diff --git a/tests/cli-test-xml/compare/virt-install-location-iso.xml b/tests/cli-test-xml/compare/virt-install-location-iso.xml
> index 64ce9e6..21043b0 100644
> --- a/tests/cli-test-xml/compare/virt-install-location-iso.xml
> +++ b/tests/cli-test-xml/compare/virt-install-location-iso.xml
> @@ -29,7 +29,7 @@
>      <emulator>/usr/bin/qemu-kvm</emulator>
>      <disk type="file" device="cdrom">
>        <driver name="qemu"/>
> -      <source file="/home/crobinso/src/virt-manager/tests/cli-test-xml/fake.iso"/>
> +      <source file="/tmp/fake.iso"/>
>        <target dev="hda" bus="ide"/>
>        <readonly/>
>      </disk>
> diff --git a/tests/cli-test-xml/fake.iso b/tests/cli-test-xml/fake.iso
> deleted file mode 100644
> index e69de29..0000000
> diff --git a/tests/clitest.py b/tests/clitest.py
> index 56679c0..6ba9a48 100644
> --- a/tests/clitest.py
> +++ b/tests/clitest.py
> @@ -74,10 +74,14 @@ virtimage_exist = ["/tmp/__virtinst__cli_root.raw"]
>  # Images created by virt-image
>  virtimage_new = ["/tmp/__virtinst__cli_scratch.raw"]
>  
> -exist_files = exist_images + virtimage_exist
> +# Fake iso for --location iso mounting
> +fake_iso = ["/tmp/fake.iso"]
> +
> +exist_files = exist_images + virtimage_exist + fake_iso
>  new_files   = new_images + virtimage_new
>  clean_files = (new_images + exist_images +
> -               virtimage_exist + virtimage_new + [ro_dir])
> +               virtimage_exist + virtimage_new + [ro_dir]
> +               + fake_iso)
>  
>  promptlist = []
>  
> @@ -530,7 +534,7 @@ c.add_compare("--os-variant fedora20 --nodisks --boot fd --graphics sdl --arch s
>  c.add_compare("--arch armv7l --machine vexpress-a9 --boot kernel=/f19-arm.kernel,initrd=/f19-arm.initrd,dtb=/f19-arm.dtb,extra_args=\"console=ttyAMA0 rw root=/dev/mmcblk0p3\" --disk %(EXISTIMG1)s --nographics", "arm-vexpress-plain", skip_check=support.SUPPORT_CONN_DISK_SD)
>  c.add_compare("--arch armv7l --machine vexpress-a15 --boot kernel=/f19-arm.kernel,initrd=/f19-arm.initrd,dtb=/f19-arm.dtb,kernel_args=\"console=ttyAMA0 rw root=/dev/vda3\",extra_args=foo --disk %(EXISTIMG1)s --nographics --os-variant fedora19", "arm-vexpress-f19", skip_check=support.SUPPORT_CONN_VIRTIO_MMIO)
>  c.add_compare("--arch ppc64 --machine pseries --boot network --disk %(EXISTIMG1)s --os-variant fedora20", "ppc64-pseries-f20")
> -c.add_compare("--nodisks --location tests/cli-test-xml/fake.iso", "location-iso")  # Using --location iso mounting
> +c.add_compare("--nodisks --location /tmp/fake.iso", "location-iso")  # Using --location iso mounting
>  c.add_valid("--cdrom %(EXISTIMG2)s --file %(EXISTIMG1)s --os-variant win2k3 --wait 0 --sound")  # HVM windows install with disk
>  c.add_valid("--os-variant fedora20 --file %(EXISTIMG1)s --location %(TREEDIR)s --extra-args console=ttyS0 --sound")  # F14 Directory tree URL install with extra-args
>  c.add_invalid("--nodisks --boot network --machine foobar")  # Unknown machine type
> 

ACK, sorry about that.

- Cole




More information about the virt-tools-list mailing list