| OLD | NEW | 
|---|
| 1 #!/usr/bin/python | 1 #!/usr/bin/python | 
| 2 # | 2 # | 
| 3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 
| 4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be | 
| 5 # found in the LICENSE file. | 5 # found in the LICENSE file. | 
| 6 | 6 | 
| 7 | 7 | 
| 8 # DESCRIPTION : | 8 # DESCRIPTION : | 
| 9 # | 9 # | 
| 10 # This UI is intended to be used by the factory autotest suite to | 10 # This UI is intended to be used by the factory autotest suite to | 
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 71 _OTHER_LABEL_FONT = pango.FontDescription('courier new condensed 20') | 71 _OTHER_LABEL_FONT = pango.FontDescription('courier new condensed 20') | 
| 72 | 72 | 
| 73 _ST_LABEL_EN_SIZE = (250, 35) | 73 _ST_LABEL_EN_SIZE = (250, 35) | 
| 74 _ST_LABEL_ZW_SIZE = (150, 35) | 74 _ST_LABEL_ZW_SIZE = (150, 35) | 
| 75 | 75 | 
| 76 class Console: | 76 class Console: | 
| 77     '''Display a progress log.  Implemented by launching an borderless | 77     '''Display a progress log.  Implemented by launching an borderless | 
| 78     xterm at a strategic location, and running tail against the log.''' | 78     xterm at a strategic location, and running tail against the log.''' | 
| 79 | 79 | 
| 80     def __init__(self, allocation): | 80     def __init__(self, allocation): | 
| 81         xterm_coords = '135x14+%d+%d' % (allocation.x, allocation.y) | 81         xterm_coords = '145x13+%d+%d' % (allocation.x, allocation.y) | 
| 82         factory.log('xterm_coords = %s' % xterm_coords) | 82         factory.log('xterm_coords = %s' % xterm_coords) | 
| 83         xterm_opts = ('-bg black -fg lightgray -bw 0 -g %s' % xterm_coords) | 83         xterm_opts = ('-bg black -fg lightgray -bw 0 -g %s' % xterm_coords) | 
| 84         xterm_cmd = (('urxvt %s -e bash -c ' % xterm_opts).split() + | 84         xterm_cmd = (('urxvt %s -e bash -c ' % xterm_opts).split() + | 
| 85                      ['tail -f %s | grep "FACTORY\\|GFT"' % factory.LOG_PATH]) | 85                      ['tail -f "%s"' % factory.CONSOLE_LOG_PATH]) | 
| 86         factory.log('xterm_cmd = %s' % xterm_cmd) | 86         factory.log('xterm_cmd = %s' % xterm_cmd) | 
| 87         self._proc = subprocess.Popen(xterm_cmd) | 87         self._proc = subprocess.Popen(xterm_cmd) | 
| 88 | 88 | 
| 89     def __del__(self): | 89     def __del__(self): | 
| 90         factory.log('console_proc __del__') | 90         factory.log('console_proc __del__') | 
| 91         self._proc.kill() | 91         self._proc.kill() | 
| 92 | 92 | 
| 93 | 93 | 
| 94 # Capture keyboard events here for debugging -- under normal | 94 # Capture keyboard events here for debugging -- under normal | 
| 95 # circumstances, all keyboard events should be captured by executing | 95 # circumstances, all keyboard events should be captured by executing | 
| (...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 396 | 396 | 
| 397     if len(sys.argv) != 4: | 397     if len(sys.argv) != 4: | 
| 398         print ('usage: %s <test list path> <status file path> <control pid>' % | 398         print ('usage: %s <test list path> <status file path> <control pid>' % | 
| 399                sys.argv[0]) | 399                sys.argv[0]) | 
| 400     test_list_path, status_file_path, control_pid_str = sys.argv[1:] | 400     test_list_path, status_file_path, control_pid_str = sys.argv[1:] | 
| 401     control_pid = int(control_pid_str) | 401     control_pid = int(control_pid_str) | 
| 402 | 402 | 
| 403     execfile(test_list_path) | 403     execfile(test_list_path) | 
| 404 | 404 | 
| 405     main(TEST_LIST, status_file_path, control_pid) | 405     main(TEST_LIST, status_file_path, control_pid) | 
| OLD | NEW | 
|---|