| 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 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 311 }) | 311 }) |
| 312 | 312 |
| 313 with open(self.json_test_results, "w") as f: | 313 with open(self.json_test_results, "w") as f: |
| 314 f.write(json.dumps(complete_results)) | 314 f.write(json.dumps(complete_results)) |
| 315 | 315 |
| 316 def AboutToRun(self, test): | 316 def AboutToRun(self, test): |
| 317 self.progress_indicator.AboutToRun(test) | 317 self.progress_indicator.AboutToRun(test) |
| 318 | 318 |
| 319 def HasRun(self, test, has_unexpected_output): | 319 def HasRun(self, test, has_unexpected_output): |
| 320 self.progress_indicator.HasRun(test, has_unexpected_output) | 320 self.progress_indicator.HasRun(test, has_unexpected_output) |
| 321 if test.run == 1 and not has_unexpected_output: | 321 if not has_unexpected_output: |
| 322 # Omit tests that pass on the first run, but collect output of tests | 322 # Omit tests that run as expected. Passing tests of reruns after failures |
| 323 # that pass when rerun. | 323 # will have unexpected_output to be reported here has well. |
| 324 return | 324 return |
| 325 | 325 |
| 326 self.results.append({ | 326 self.results.append({ |
| 327 "name": test.GetLabel(), | 327 "name": test.GetLabel(), |
| 328 "flags": test.flags, | 328 "flags": test.flags, |
| 329 "command": EscapeCommand(self.runner.GetCommand(test)).replace( | 329 "command": EscapeCommand(self.runner.GetCommand(test)).replace( |
| 330 ABS_PATH_PREFIX, ""), | 330 ABS_PATH_PREFIX, ""), |
| 331 "run": test.run, | 331 "run": test.run, |
| 332 "stdout": test.output.stdout, | 332 "stdout": test.output.stdout, |
| 333 "stderr": test.output.stderr, | 333 "stderr": test.output.stderr, |
| 334 "exit_code": test.output.exit_code, | 334 "exit_code": test.output.exit_code, |
| 335 "result": test.suite.GetOutcome(test), | 335 "result": test.suite.GetOutcome(test), |
| 336 }) | 336 }) |
| 337 | 337 |
| 338 | 338 |
| 339 PROGRESS_INDICATORS = { | 339 PROGRESS_INDICATORS = { |
| 340 'verbose': VerboseProgressIndicator, | 340 'verbose': VerboseProgressIndicator, |
| 341 'dots': DotsProgressIndicator, | 341 'dots': DotsProgressIndicator, |
| 342 'color': ColorProgressIndicator, | 342 'color': ColorProgressIndicator, |
| 343 'mono': MonochromeProgressIndicator | 343 'mono': MonochromeProgressIndicator |
| 344 } | 344 } |
| OLD | NEW |