Commit b95e0605 authored by Jeremy White's avatar Jeremy White

Create the ability to get a full leak check from valgrind as well.

parent 6b40fcd9
......@@ -12,3 +12,6 @@ x11spice_test_SOURCES = \
noinst_PROGRAMS = $(TESTS)
VALGRIND="valgrind --leak-check=full --log-file=leakcheck.log" make check
......@@ -33,13 +33,17 @@
static int exec_x11spice(x11spice_server_t *server, gchar *display)
char buf[256];
char buf[4096];
char *valgrind = getenv("VALGRIND");
/* Redirect stderr and stdout to our pipe */
dup2(server->pipe, fileno(stdout));
dup2(server->pipe, fileno(stderr));
snprintf(buf, sizeof(buf), "../x11spice --display :%s --auto localhost:5900-5999 --hide", display);
if (valgrind)
snprintf(buf, sizeof(buf), "%s ../x11spice --display :%s --auto localhost:5900-5999 --hide", valgrind, display);
snprintf(buf, sizeof(buf), "../x11spice --display :%s --auto localhost:5900-5999 --hide", display);
return execl("/bin/sh", "sh", "-c", buf, NULL);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment