def wait_for_results(self, report, workqueue, test_filters): console = ndk.ansi.get_console() ui = ndk.test.ui.get_test_build_progress_ui(console, workqueue) with ndk.ansi.disable_terminal_echo(sys.stdin): with console.cursor_hide_context(): while not workqueue.finished(): suite, result, additional_tests = workqueue.get_result() # Filtered test. Skip them entirely to avoid polluting # --show-all results. if result is None: assert not additional_tests ui.draw() continue assert result.passed() or not additional_tests for test in additional_tests: workqueue.add_task(_run_test, suite, test, self.obj_dir, self.dist_dir, test_filters) if logger().isEnabledFor(logging.INFO): ui.clear() self.printer.print_result(result) elif result.failed(): ui.clear() self.printer.print_result(result) report.add_result(suite, result) ui.draw() ui.clear()
def finish_workqueue_with_ui(workqueue): console = ndk.ansi.get_console() ui = ndk.ui.get_work_queue_ui(console, workqueue) with ndk.ansi.disable_terminal_echo(sys.stdin): with console.cursor_hide_context(): ui.draw() while not workqueue.finished(): workqueue.get_result() ui.draw() ui.clear()
def wait_for_results(report, workqueue, printer): console = ndk.ansi.get_console() ui = ndk.test.ui.get_test_progress_ui(console, workqueue) with ndk.ansi.disable_terminal_echo(sys.stdin): with console.cursor_hide_context(): while not workqueue.finished(): result = workqueue.get_result() suite = result.test.build_system report.add_result(suite, result) if logger().isEnabledFor(logging.INFO): ui.clear() printer.print_result(result) elif result.failed(): ui.clear() printer.print_result(result) ui.draw() ui.clear()