(self, runnable, count, secondary=False, post_process=True)
| 864 | raise NotImplementedError() # pragma: no cover |
| 865 | |
| 866 | def _LoggedRun(self, runnable, count, secondary=False, post_process=True): |
| 867 | suffix = ' - secondary' if secondary else '' |
| 868 | title = '>>> %%s (#%d)%s:' % ((count + 1), suffix) |
| 869 | try: |
| 870 | output = self._Run(runnable, count, secondary, post_process) |
| 871 | except OSError: |
| 872 | logging.exception(title % 'OSError') |
| 873 | raise |
| 874 | if output.stdout: |
| 875 | logging.info(title % 'Stdout' + '\n%s', output.stdout) |
| 876 | if output.stderr: # pragma: no cover |
| 877 | # Print stderr for debugging. |
| 878 | logging.info(title % 'Stderr' + '\n%s', output.stderr) |
| 879 | if output.HasTimedOut(): |
| 880 | logging.warning('>>> Test timed out after %ss.', runnable.timeout) |
| 881 | if output.exit_code != 0: |
| 882 | logging.warning('>>> Test crashed with exit code %d.', output.exit_code) |
| 883 | return output |
| 884 | |
| 885 | def Run(self, runnable, count, secondary): |
| 886 | """Execute the benchmark's main file. |
no test coverage detected