[gnome-builder/wip/gtk4-port] plugins/testui: reset terminal when running a test
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/gtk4-port] plugins/testui: reset terminal when running a test
- Date: Fri, 1 Jul 2022 01:19:21 +0000 (UTC)
commit 2f62235c8173d7908e4d9f20307950971a512337
Author: Christian Hergert <chergert redhat com>
Date: Thu Jun 30 18:19:17 2022 -0700
plugins/testui: reset terminal when running a test
So we don't get output confused with a previous run.
src/plugins/testui/gbp-testui-output-panel.c | 8 ++++++++
src/plugins/testui/gbp-testui-output-panel.h | 3 ++-
src/plugins/testui/gbp-testui-workspace-addin.c | 5 +++--
3 files changed, 13 insertions(+), 3 deletions(-)
---
diff --git a/src/plugins/testui/gbp-testui-output-panel.c b/src/plugins/testui/gbp-testui-output-panel.c
index d3df50538..18b7114b6 100644
--- a/src/plugins/testui/gbp-testui-output-panel.c
+++ b/src/plugins/testui/gbp-testui-output-panel.c
@@ -169,3 +169,11 @@ gbp_testui_output_panel_new (VtePty *pty)
return self;
}
+
+void
+gbp_testui_output_panel_reset (GbpTestuiOutputPanel *self)
+{
+ g_return_if_fail (GBP_IS_TESTUI_OUTPUT_PANEL (self));
+
+ vte_terminal_reset (VTE_TERMINAL (self->terminal), TRUE, TRUE);
+}
diff --git a/src/plugins/testui/gbp-testui-output-panel.h b/src/plugins/testui/gbp-testui-output-panel.h
index aaa9d719e..bf164de3b 100644
--- a/src/plugins/testui/gbp-testui-output-panel.h
+++ b/src/plugins/testui/gbp-testui-output-panel.h
@@ -30,6 +30,7 @@ G_BEGIN_DECLS
G_DECLARE_FINAL_TYPE (GbpTestuiOutputPanel, gbp_testui_output_panel, GBP, TESTUI_OUTPUT_PANEL, IdePane)
-GbpTestuiOutputPanel *gbp_testui_output_panel_new (VtePty *pty);
+GbpTestuiOutputPanel *gbp_testui_output_panel_new (VtePty *pty);
+void gbp_testui_output_panel_reset (GbpTestuiOutputPanel *self);
G_END_DECLS
diff --git a/src/plugins/testui/gbp-testui-workspace-addin.c b/src/plugins/testui/gbp-testui-workspace-addin.c
index f87e82766..151c1d99b 100644
--- a/src/plugins/testui/gbp-testui-workspace-addin.c
+++ b/src/plugins/testui/gbp-testui-workspace-addin.c
@@ -52,12 +52,13 @@ on_test_activated_cb (GbpTestuiWorkspaceAddin *self,
g_assert (IDE_IS_TEST (test));
g_assert (GBP_IS_TESTUI_PANEL (panel));
+ gbp_testui_output_panel_reset (self->output_panel);
+ panel_widget_raise (PANEL_WIDGET (self->output_panel));
+
context = ide_workspace_get_context (self->workspace);
test_manager = ide_test_manager_from_context (context);
ide_test_manager_run_async (test_manager, test, NULL, NULL, NULL);
- panel_widget_raise (PANEL_WIDGET (self->output_panel));
-
IDE_EXIT;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]