[gnome-builder/wip/gtk4-port: 1746/1774] plugins/testui: run tests when activating row
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/gtk4-port: 1746/1774] plugins/testui: run tests when activating row
- Date: Mon, 11 Jul 2022 22:31:56 +0000 (UTC)
commit 024b3cf7302ed5f78d09641c6701479bcad94b86
Author: Christian Hergert <chergert redhat com>
Date: Thu Jun 30 17:42:50 2022 -0700
plugins/testui: run tests when activating row
src/plugins/testui/gbp-testui-panel.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
---
diff --git a/src/plugins/testui/gbp-testui-panel.c b/src/plugins/testui/gbp-testui-panel.c
index c7826e5da..ef6c3a819 100644
--- a/src/plugins/testui/gbp-testui-panel.c
+++ b/src/plugins/testui/gbp-testui-panel.c
@@ -22,6 +22,8 @@
#include "config.h"
+#include <libide-foundry.h>
+
#include "gbp-testui-panel.h"
struct _GbpTestuiPanel
@@ -51,6 +53,8 @@ gbp_testui_panel_activate_cb (GbpTestuiPanel *self,
{
GtkSelectionModel *model;
g_autoptr(IdeTest) test = NULL;
+ IdeTestManager *test_manager;
+ IdeContext *context;
IDE_ENTRY;
@@ -61,7 +65,13 @@ gbp_testui_panel_activate_cb (GbpTestuiPanel *self,
model = gtk_list_view_get_model (list_view);
test = g_list_model_get_item (G_LIST_MODEL (model), position);
- g_debug ("Activating test \"%s\"", ide_test_get_title (test));
+ g_assert (IDE_IS_TEST (test));
+
+ g_debug ("Activating test \"%s\"", ide_test_get_id (test));
+
+ context = ide_widget_get_context (GTK_WIDGET (self));
+ test_manager = ide_test_manager_from_context (context);
+ ide_test_manager_run_async (test_manager, test, NULL, NULL, NULL);
IDE_EXIT;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]