Browse Source

tests: use xterm instead of gnome-terminal in DispVM tests

There is no gnome-terminal in minimal template.
Marek Marczykowski-Górecki 8 years ago
parent
commit
2ccfff438a
1 changed files with 4 additions and 11 deletions
  1. 4 11
      tests/vm_qrexec_gui.py

+ 4 - 11
tests/vm_qrexec_gui.py

@@ -855,21 +855,14 @@ class TC_20_DispVMMixin(qubes.tests.SystemTestsMixin):
         self.assertTrue(dispvm.is_running())
         try:
             window_title = 'user@%s' % (dispvm.template.name + "-dvm")
-            p.stdin.write("gnome-terminal -e "
-                          "\"sh -s -c 'echo \\\"\033]0;{}\007\\\"'\"\n".
+            p.stdin.write("xterm -e "
+                          "\"sh -s -c 'echo \\\"\033]0;{}\007\\\";read;'\"\n".
                           format(window_title))
-            wait_count = 0
-            while subprocess.call(['xdotool', 'search', '--name', window_title],
-                                  stdout=open(os.path.devnull, 'w'),
-                                  stderr=subprocess.STDOUT) > 0:
-                wait_count += 1
-                if wait_count > 100:
-                    self.fail("Timeout while waiting for gnome-terminal window")
-                time.sleep(0.1)
+            self.wait_for_window(window_title)
 
             time.sleep(0.5)
             subprocess.check_call(['xdotool', 'search', '--name', window_title,
-                                  'windowactivate', 'type', 'exit\n'])
+                                  'windowactivate', 'key', 'Return'])
 
             wait_count = 0
             while subprocess.call(['xdotool', 'search', '--name', window_title],