tests: type commands into specific found window

Make sure events are sent to specific window found with xdotool search,
not the one having the focus. In case of Whonix, it can be first
connection wizard or whonixcheck report.
This commit is contained in:
Marek Marczykowski-Górecki 2018-10-15 05:17:19 +02:00
szülő 9e81087b25
commit fd9f2e2a6c
Nem található kulcs ehhez az aláíráshoz az adatbázisban
GPG kulcs azonosító: 063938BA42CFA724

Fájl megtekintése

@ -108,7 +108,7 @@ class TC_00_Basic(qubes.tests.SystemTestCase):
self.assertTrue(self.vm.is_running())
# Type 'poweroff'
subprocess.check_call(['xdotool', 'search', '--name', self.vm.name,
'type', 'poweroff\r'])
'type', '--window', '%1', 'poweroff\r'])
for _ in range(10):
if not self.vm.is_running():
break
@ -674,7 +674,7 @@ class TC_06_AppVMMixin(object):
self.assertTrue(self.vm.is_running())
# Type 'poweroff'
subprocess.check_call(['xdotool', 'search', '--name', self.vm.name,
'type', 'poweroff\r'])
'type', '--window', '%1', 'poweroff\r'])
for _ in range(10):
if not self.vm.is_running():
break