]> git.lyx.org Git - features.git/commitdiff
keytest.py: Allow for LyX window to appear without timeout
authorKornel Benko <kornel@lyx.org>
Mon, 25 Aug 2014 12:28:18 +0000 (14:28 +0200)
committerKornel Benko <kornel@lyx.org>
Mon, 25 Aug 2014 12:28:18 +0000 (14:28 +0200)
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.

development/autotests/keytest.py

index cbfe2ff3fa10bf9094584e35426f27b02b98aabc..7cae6843e55a173c1206aed45fd67f97bbd8e4e4 100755 (executable)
@@ -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()