Setup and run a test controller. If buffer_output is True, no output is displayed, to avoid it appearing interleaved. In this case, the caller is responsible for displaying test output on failure. Returns ------- controller : TestController The same controller
(controller, buffer_output=True)
| 214 | return to_run, not_run |
| 215 | |
| 216 | def do_run(controller, buffer_output=True): |
| 217 | """Setup and run a test controller. |
| 218 | |
| 219 | If buffer_output is True, no output is displayed, to avoid it appearing |
| 220 | interleaved. In this case, the caller is responsible for displaying test |
| 221 | output on failure. |
| 222 | |
| 223 | Returns |
| 224 | ------- |
| 225 | controller : TestController |
| 226 | The same controller as passed in, as a convenience for using map() type |
| 227 | APIs. |
| 228 | exitcode : int |
| 229 | The exit code of the test subprocess. Non-zero indicates failure. |
| 230 | """ |
| 231 | try: |
| 232 | try: |
| 233 | controller.setup() |
| 234 | controller.launch(buffer_output=buffer_output) |
| 235 | except Exception: |
| 236 | import traceback |
| 237 | traceback.print_exc() |
| 238 | return controller, 1 # signal failure |
| 239 | |
| 240 | exitcode = controller.wait() |
| 241 | return controller, exitcode |
| 242 | |
| 243 | except KeyboardInterrupt: |
| 244 | return controller, -signal.SIGINT |
| 245 | finally: |
| 246 | controller.cleanup() |
| 247 | |
| 248 | def report(): |
| 249 | """Return a string with a summary report of test-related variables.""" |
no test coverage detected