mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-25 18:55:27 -06:00
virt-xml: fix a terminal_width depends issue
One of virt-xml test case will output logs by urlgrabber.process, which will get the real width of terminals. If we resize terminal, of who is running test, from 80 to other size, test case will fail. This patch will screen it when running test case. Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
This commit is contained in:
@@ -22,6 +22,7 @@ import os
|
||||
|
||||
os.environ["VIRTINST_TEST_TRACKPROPS"] = "1"
|
||||
os.environ["VIRTINST_TEST_SUITE"] = "1"
|
||||
os.environ["VIRTINST_TEST_CLI_VIRTXML"] = "1"
|
||||
|
||||
import virtinst
|
||||
virtinst.stable_defaults = False
|
||||
|
||||
@@ -8,7 +8,5 @@
|
||||
</devices>
|
||||
</domain>
|
||||
|
||||
|
||||
Creating storage file __virtinst_cli_new1.img | 10 MB 00:00
|
||||
Domain 'test-many-devices' defined successfully.
|
||||
Changes will take effect after the next domain shutdown.
|
||||
10
virt-xml
10
virt-xml
@@ -240,9 +240,13 @@ def setup_device(dev):
|
||||
return
|
||||
|
||||
logging.debug("Doing setup for disk=%s", dev)
|
||||
meter = (cli.quiet and
|
||||
progress.BaseMeter() or
|
||||
progress.TextMeter(fo=sys.stdout))
|
||||
|
||||
if "VIRTINST_TEST_CLI_VIRTXML" in os.environ:
|
||||
meter = progress.BaseMeter()
|
||||
else:
|
||||
meter = (cli.quiet and
|
||||
progress.BaseMeter() or
|
||||
progress.TextMeter(fo=sys.stdout))
|
||||
|
||||
dev.setup(meter)
|
||||
dev.virt_xml_setup = True
|
||||
|
||||
Reference in New Issue
Block a user