瀏覽代碼

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.
Marek Marczykowski-Górecki 5 年之前
父節點
當前提交
fd9f2e2a6c
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      qubes/tests/integ/basic.py

+ 2 - 2
qubes/tests/integ/basic.py

@@ -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