tests: force gnome-terminal title, so we can find the window

Debian do not use hostname in gnome-terminal window title by default, so
the test failed there, even when DispVM was started correctly.
Additionally we can't rely on gnome-terminal --title, as it isn't
working on Debian 8...
This commit is contained in:
Marek Marczykowski-Górecki 2015-03-30 21:32:13 +02:00
parent 98ab523da4
commit 961ae3588f

View File

@ -452,9 +452,11 @@ class TC_20_DispVMMixin(qubes.tests.SystemTestsMixin):
self.assertNotEqual(dispvm.qid, 0, "DispVM not found in qubes.xml") self.assertNotEqual(dispvm.qid, 0, "DispVM not found in qubes.xml")
self.assertTrue(dispvm.is_running()) self.assertTrue(dispvm.is_running())
p.stdin.write("gnome-terminal\n")
wait_count = 0
window_title = 'user@%s' % (dispvm.template.name + "-dvm") window_title = 'user@%s' % (dispvm.template.name + "-dvm")
p.stdin.write("gnome-terminal -e "
"\"sh -s -c 'echo \\\"\033]0;{}\007\\\"'\"\n".
format(window_title))
wait_count = 0
while subprocess.call(['xdotool', 'search', '--name', window_title], while subprocess.call(['xdotool', 'search', '--name', window_title],
stdout=open(os.path.devnull, 'w'), stdout=open(os.path.devnull, 'w'),
stderr=subprocess.STDOUT) > 0: stderr=subprocess.STDOUT) > 0: