From 3e55e89453d9edf127d0242492ea34c5a24dc5b0 Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Thu, 11 Oct 2018 12:14:19 -0400 Subject: tests: Add better virt-install console testing --- virt-install | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'virt-install') 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) ######################## -- cgit v1.2.1