summaryrefslogtreecommitdiff
path: root/tests/src/test-runner.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/src/test-runner.c')
-rw-r--r--tests/src/test-runner.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/tests/src/test-runner.c b/tests/src/test-runner.c
index c6325f43..a917dc66 100644
--- a/tests/src/test-runner.c
+++ b/tests/src/test-runner.c
@@ -277,6 +277,7 @@ run_commands ()
expect_exit = TRUE;
stop_daemon ();
}
+ // FIXME: Make generic RUN-COMMAND
else if (strcmp (name, "START-XSERVER") == 0)
{
gchar *xserver_args, *command_line;
@@ -289,7 +290,6 @@ run_commands ()
xserver_args = "";
command_line = g_strdup_printf ("%s/tests/src/X %s", BUILDDIR, xserver_args);
- g_debug ("Run %s", command_line);
if (!g_shell_parse_argv (command_line, NULL, &argv, &error) ||
!g_spawn_async (NULL, argv, NULL, 0, NULL, NULL, &pid, &error))
{
@@ -299,6 +299,27 @@ run_commands ()
}
children = g_list_append (children, GINT_TO_POINTER (pid));
}
+ else if (strcmp (name, "START-VNC-CLIENT") == 0)
+ {
+ gchar *vnc_client_args, *command_line;
+ gchar **argv;
+ GPid pid;
+ GError *error = NULL;
+
+ vnc_client_args = g_hash_table_lookup (params, "ARGS");
+ if (!vnc_client_args)
+ vnc_client_args = "";
+ command_line = g_strdup_printf ("%s/tests/src/vnc-client %s", BUILDDIR, vnc_client_args);
+
+ if (!g_shell_parse_argv (command_line, NULL, &argv, &error) ||
+ !g_spawn_async (NULL, argv, NULL, 0, NULL, NULL, &pid, &error))
+ {
+ g_printerr ("Error starting VNC client: %s", error->message);
+ quit (EXIT_FAILURE);
+ return;
+ }
+ children = g_list_append (children, GINT_TO_POINTER (pid));
+ }
else
{
g_printerr ("Unknown command '%s'\n", name);