diff options
author | Cole Robinson <crobinso@redhat.com> | 2018-10-11 12:14:19 -0400 |
---|---|---|
committer | Cole Robinson <crobinso@redhat.com> | 2018-10-11 12:19:48 -0400 |
commit | 3e55e89453d9edf127d0242492ea34c5a24dc5b0 (patch) | |
tree | 71269f41d53d014b3646599bdaa37e5b5c6f987b /virt-install | |
parent | 63b4d1f154652119ee9ff5559ce090ec005daa7d (diff) | |
download | virt-manager-3e55e89453d9edf127d0242492ea34c5a24dc5b0.tar.gz |
tests: Add better virt-install console testing
Diffstat (limited to 'virt-install')
-rwxr-xr-x | virt-install | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/virt-install b/virt-install index 173ceb12..51307e20 100755 --- a/virt-install +++ b/virt-install @@ -7,7 +7,6 @@ import argparse import logging -import os import sys import time @@ -558,9 +557,6 @@ def start_install(guest, installer, options): if options.wait is not None: wait_on_install = True wait_time = options.wait * 60 - if "VIRTINST_TEST_SUITE" in os.environ and wait_time: - # Convert wait time to 1 second, for the test suite - wait_time = 1 else: wait_on_install = False wait_time = -1 @@ -692,14 +688,20 @@ def check_domain(installer, domain, conscb, transient, print_stdout(_("Domain has shutdown. Continuing.")) break - time.sleep(1) + if not cli.in_testsuite(): + time.sleep(1) time_elapsed = (time.time() - start_time) - if not wait_forever and time_elapsed >= wait_time: - print_stdout( - _("Installation has exceeded specified time limit. " - "Exiting application.")) - sys.exit(1) + if not cli.in_testsuite(): + if wait_forever: + continue + if time_elapsed < wait_time: + continue + + print_stdout( + _("Installation has exceeded specified time limit. " + "Exiting application.")) + sys.exit(1) ######################## |