From 164a37eac2a5e7390f69ce152796df54e2f00d98 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Tue, 26 Mar 2019 10:59:27 -0700 Subject: [PATCH] simple-xinit: Introduce an escaped "--" argument. For testing xephyr-glamor on top of Xvfb in CI better, I want to be able to make one command line describing the nested server invocation, but that means I need to get two simple-xinits to split client/server on different "--" arguments. Signed-off-by: Eric Anholt --- hw/kdrive/ephyr/meson.build | 2 +- test/simple-xinit.c | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/hw/kdrive/ephyr/meson.build b/hw/kdrive/ephyr/meson.build index f8135e914..9e329ba67 100644 --- a/hw/kdrive/ephyr/meson.build +++ b/hw/kdrive/ephyr/meson.build @@ -38,7 +38,7 @@ if build_xv xephyr_dep += dependency('xcb-xv') endif -executable( +xephyr_server = executable( 'Xephyr', srcs, include_directories: [ diff --git a/test/simple-xinit.c b/test/simple-xinit.c index a80eb9cf5..e85b48092 100644 --- a/test/simple-xinit.c +++ b/test/simple-xinit.c @@ -210,7 +210,13 @@ parse_args(int argc, char **argv, continue; } - *next_arg = argv[i]; + /* A sort of escaped "--" argument so we can nest server + * invocations for testing. + */ + if (strcmp(argv[i], "----") == 0) + *next_arg = (char *)"--"; + else + *next_arg = argv[i]; next_arg++; }