diff options
author | Cole Robinson <crobinso@redhat.com> | 2016-06-17 08:57:30 -0400 |
---|---|---|
committer | Cole Robinson <crobinso@redhat.com> | 2016-06-17 12:13:21 -0400 |
commit | 0e8d4007cfab178f6370b4d78c11e9ead865d077 (patch) | |
tree | 2b50a5809b790e27287892d030f3c9defcbee00a /virtinst/cli.py | |
parent | 59edd87e9ffcfba96d33f2824d48e6f00d622441 (diff) | |
download | virt-manager-0e8d4007cfab178f6370b4d78c11e9ead865d077.tar.gz |
tests: Add some virt-install autoconsole tests
Diffstat (limited to 'virtinst/cli.py')
-rw-r--r-- | virtinst/cli.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/virtinst/cli.py b/virtinst/cli.py index cd1f18f7..432640b1 100644 --- a/virtinst/cli.py +++ b/virtinst/cli.py @@ -410,8 +410,14 @@ def validate_disk(dev, warn_overwrite=False): check_path_search(dev) -def _run_console(args): +def _run_console(guest, args): logging.debug("Running: %s", " ".join(args)) + if "VIRTINST_TEST_SUITE" in os.environ: + # Add this destroy() in here to trigger more virt-install code + # for the test suite + guest.domain.destroy() + return None + child = os.fork() if child: return child @@ -432,7 +438,7 @@ def _gfx_console(guest): logging.debug("Launching virt-viewer for graphics type '%s'", guest.get_devices("graphics")[0].type) - return _run_console(args) + return _run_console(guest, args) def _txt_console(guest): @@ -441,7 +447,7 @@ def _txt_console(guest): "console", guest.name] logging.debug("Connecting to text console") - return _run_console(args) + return _run_console(guest, args) def connect_console(guest, consolecb, wait): |