OLD | NEW |
1 # Copyright 2012 the V8 project authors. All rights reserved. | 1 # Copyright 2012 the V8 project authors. All rights reserved. |
2 # Redistribution and use in source and binary forms, with or without | 2 # Redistribution and use in source and binary forms, with or without |
3 # modification, are permitted provided that the following conditions are | 3 # modification, are permitted provided that the following conditions are |
4 # met: | 4 # met: |
5 # | 5 # |
6 # * Redistributions of source code must retain the above copyright | 6 # * Redistributions of source code must retain the above copyright |
7 # notice, this list of conditions and the following disclaimer. | 7 # notice, this list of conditions and the following disclaimer. |
8 # * Redistributions in binary form must reproduce the above | 8 # * Redistributions in binary form must reproduce the above |
9 # copyright notice, this list of conditions and the following | 9 # copyright notice, this list of conditions and the following |
10 # disclaimer in the documentation and/or other materials provided | 10 # disclaimer in the documentation and/or other materials provided |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 """Abstract base class for {Color,Monochrome}ProgressIndicator""" | 145 """Abstract base class for {Color,Monochrome}ProgressIndicator""" |
146 | 146 |
147 def __init__(self, templates): | 147 def __init__(self, templates): |
148 super(CompactProgressIndicator, self).__init__() | 148 super(CompactProgressIndicator, self).__init__() |
149 self.templates = templates | 149 self.templates = templates |
150 self.last_status_length = 0 | 150 self.last_status_length = 0 |
151 self.start_time = time.time() | 151 self.start_time = time.time() |
152 | 152 |
153 def Done(self): | 153 def Done(self): |
154 self.PrintProgress('Done') | 154 self.PrintProgress('Done') |
| 155 print "" # Line break. |
155 | 156 |
156 def AboutToRun(self, test): | 157 def AboutToRun(self, test): |
157 self.PrintProgress(test.GetLabel()) | 158 self.PrintProgress(test.GetLabel()) |
158 | 159 |
159 def HasRun(self, test): | 160 def HasRun(self, test): |
160 if test.suite.HasUnexpectedOutput(test): | 161 if test.suite.HasUnexpectedOutput(test): |
161 self.ClearLine(self.last_status_length) | 162 self.ClearLine(self.last_status_length) |
162 self.PrintFailureHeader(test) | 163 self.PrintFailureHeader(test) |
163 stdout = test.output.stdout.strip() | 164 stdout = test.output.stdout.strip() |
164 if len(stdout): | 165 if len(stdout): |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 def ClearLine(self, last_line_length): | 229 def ClearLine(self, last_line_length): |
229 print ("\r" + (" " * last_line_length) + "\r"), | 230 print ("\r" + (" " * last_line_length) + "\r"), |
230 | 231 |
231 | 232 |
232 PROGRESS_INDICATORS = { | 233 PROGRESS_INDICATORS = { |
233 'verbose': VerboseProgressIndicator, | 234 'verbose': VerboseProgressIndicator, |
234 'dots': DotsProgressIndicator, | 235 'dots': DotsProgressIndicator, |
235 'color': ColorProgressIndicator, | 236 'color': ColorProgressIndicator, |
236 'mono': MonochromeProgressIndicator | 237 'mono': MonochromeProgressIndicator |
237 } | 238 } |
OLD | NEW |