| 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 | 59 |
| 60 def Done(self): | 60 def Done(self): |
| 61 pass | 61 pass |
| 62 | 62 |
| 63 def AboutToRun(self, test): | 63 def AboutToRun(self, test): |
| 64 pass | 64 pass |
| 65 | 65 |
| 66 def HasRun(self, test, has_unexpected_output): | 66 def HasRun(self, test, has_unexpected_output): |
| 67 pass | 67 pass |
| 68 | 68 |
| 69 def Heartbeat(self): |
| 70 pass |
| 71 |
| 69 def PrintFailureHeader(self, test): | 72 def PrintFailureHeader(self, test): |
| 70 if test.suite.IsNegativeTest(test): | 73 if test.suite.IsNegativeTest(test): |
| 71 negative_marker = '[negative] ' | 74 negative_marker = '[negative] ' |
| 72 else: | 75 else: |
| 73 negative_marker = '' | 76 negative_marker = '' |
| 74 print "=== %(label)s %(negative)s===" % { | 77 print "=== %(label)s %(negative)s===" % { |
| 75 'label': test.GetLabel(), | 78 'label': test.GetLabel(), |
| 76 'negative': negative_marker | 79 'negative': negative_marker |
| 77 } | 80 } |
| 78 | 81 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 def HasRun(self, test, has_unexpected_output): | 124 def HasRun(self, test, has_unexpected_output): |
| 122 if has_unexpected_output: | 125 if has_unexpected_output: |
| 123 if test.output.HasCrashed(): | 126 if test.output.HasCrashed(): |
| 124 outcome = 'CRASH' | 127 outcome = 'CRASH' |
| 125 else: | 128 else: |
| 126 outcome = 'FAIL' | 129 outcome = 'FAIL' |
| 127 else: | 130 else: |
| 128 outcome = 'pass' | 131 outcome = 'pass' |
| 129 print 'Done running %s: %s' % (test.GetLabel(), outcome) | 132 print 'Done running %s: %s' % (test.GetLabel(), outcome) |
| 130 | 133 |
| 134 def Heartbeat(self): |
| 135 print 'Still working...' |
| 136 sys.stdout.flush() |
| 137 |
| 131 | 138 |
| 132 class DotsProgressIndicator(SimpleProgressIndicator): | 139 class DotsProgressIndicator(SimpleProgressIndicator): |
| 133 | 140 |
| 134 def HasRun(self, test, has_unexpected_output): | 141 def HasRun(self, test, has_unexpected_output): |
| 135 total = self.runner.succeeded + len(self.runner.failed) | 142 total = self.runner.succeeded + len(self.runner.failed) |
| 136 if (total > 1) and (total % 50 == 1): | 143 if (total > 1) and (total % 50 == 1): |
| 137 sys.stdout.write('\n') | 144 sys.stdout.write('\n') |
| 138 if has_unexpected_output: | 145 if has_unexpected_output: |
| 139 if test.output.HasCrashed(): | 146 if test.output.HasCrashed(): |
| 140 sys.stdout.write('C') | 147 sys.stdout.write('C') |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 "expected": list(test.outcomes or ["PASS"]), | 343 "expected": list(test.outcomes or ["PASS"]), |
| 337 }) | 344 }) |
| 338 | 345 |
| 339 | 346 |
| 340 PROGRESS_INDICATORS = { | 347 PROGRESS_INDICATORS = { |
| 341 'verbose': VerboseProgressIndicator, | 348 'verbose': VerboseProgressIndicator, |
| 342 'dots': DotsProgressIndicator, | 349 'dots': DotsProgressIndicator, |
| 343 'color': ColorProgressIndicator, | 350 'color': ColorProgressIndicator, |
| 344 'mono': MonochromeProgressIndicator | 351 'mono': MonochromeProgressIndicator |
| 345 } | 352 } |
| OLD | NEW |