commit 6767052bba0f99bf52aa8361e1c13d101f30fcd6
Author: Kornel Benko <[email protected]>
Date:   Mon Aug 25 14:28:18 2014 +0200

    keytest.py: Allow for LyX window to appear without timeout
    
    Timeout for lyx-process to appear may be significantly smaler.
    5 sec. looks sufficient, while lyx-window may take some time
    due to configure.py.

diff --git a/development/autotests/keytest.py b/development/autotests/keytest.py
index cbfe2ff..7cae684 100755
--- a/development/autotests/keytest.py
+++ b/development/autotests/keytest.py
@@ -342,17 +342,18 @@ while not failed:
             intr_system(lyx_exe + c[9:] + "&")
         else:
             intr_system(lyx_exe + " -userdir " + lyx_userdir + " " + c[9:] + 
"&")
-        count = 100
+        count = 5
         while count > 0:
             lyx_pid=os.popen("pidof " + lyx).read().rstrip()
             if lyx_pid != "":
                 lyx_window_name=os.popen("wmctrl -l -p | grep ' " + 
str(lyx_pid) +  " ' | cut -d ' ' -f 1").read().rstrip()
                 if lyx_window_name != "":
                     break
+            else:
+                count = count - 1
             print 'lyx_win: ' + lyx_window_name + '\n'
             print "Waiting for LyX to show up . . ."
             time.sleep(1)
-            count = count - 1
         if count <= 0:
             print 'Timeout: could not start ' + lyx_exe, '\n'
             sys.stdout.flush()

Reply via email to