tests: uitests: Fix remote dbus test

My last patch broke it!
This commit is contained in:
Cole Robinson 2018-09-04 13:16:34 -04:00
parent 40461c58ef
commit 10290cbf48
2 changed files with 4 additions and 3 deletions

View File

@ -65,7 +65,7 @@ class VMMCLI(uiutils.UITestCase):
"""
self.app.open()
newapp = uiutils.VMMDogtailApp("test:///default")
newapp.open()
newapp.open(check_already_running=False)
uiutils.check_in_loop(lambda: not newapp.is_running())
import dogtail.tree
vapps = [a for a in dogtail.tree.root.applications() if

View File

@ -355,7 +355,7 @@ class VMMDogtailApp(object):
def is_running(self):
return bool(self._proc and self._proc.poll() is None)
def open(self, extra_opts=None):
def open(self, extra_opts=None, check_already_running=True):
extra_opts = extra_opts or []
if tests.utils.clistate.debug:
@ -374,7 +374,8 @@ class VMMDogtailApp(object):
"--test-first-run", "--no-fork", "--connect", self.uri]
cmd += extra_opts
self.error_if_already_running()
if check_already_running:
self.error_if_already_running()
self._proc = subprocess.Popen(cmd, stdout=stdout, stderr=stderr)
self._root = dogtail.tree.root.application("virt-manager")
self._topwin = self._root.find(None, "(frame|dialog|alert)")