From 07ac6c9ba18f8f6708bdc265b377be82f99a12a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Tue, 2 Aug 2016 02:11:56 +0200 Subject: [PATCH] tests: fix handling LibreOffice in DispVM tests It's first window is a splash screen. --- tests/dispvm.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/dispvm.py b/tests/dispvm.py index 2c5c056c..d35e6f86 100644 --- a/tests/dispvm.py +++ b/tests/dispvm.py @@ -394,7 +394,16 @@ class TC_20_DispVMMixin(qubes.tests.SystemTestsMixin): retcode = search.wait() if retcode == 0: winid = search.stdout.read().strip() - break + # get window title + (window_title, _) = subprocess.Popen( + ['xdotool', 'getwindowname', winid], stdout=subprocess.PIPE). \ + communicate() + window_title = window_title.strip() + # ignore LibreOffice splash screen and window with no title + # set yet + if window_title and not window_title.startswith("LibreOffice")\ + and not window_title == 'VMapp command': + break wait_count += 1 if wait_count > 100: self.fail("Timeout while waiting for editor window")