build: fix "make check" build failures

I forgot again to keep these up to date. The conf-layer updates broke them
horribly. However, we now build them correctly without kmscon-core by
including all required layers directly.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This commit is contained in:
David Herrmann 2012-10-27 18:32:43 +02:00
parent 6e05334695
commit 9d2018f521
4 changed files with 63 additions and 20 deletions

View File

@ -467,16 +467,53 @@ wlterm_LDADD = \
# Tests
#
test_sources = \
src/log.h \
src/log.c \
src/conf.h \
src/conf.c \
tests/test_include.h
test_cflags = \
$(XKBCOMMON_CFLAGS)
test_libs = \
$(XKBCOMMON_LIBS) \
libeloop.la
test_output_SOURCES = \
tests/test_include.h \
$(test_sources) \
tests/test_output.c
test_output_CPPFLAGS = \
$(AM_CPPFLAGS) \
$(test_cflags)
test_output_LDADD = \
$(test_libs) \
libuterm.la
test_vt_SOURCES = tests/test_vt.c
test_vt_LDADD =
test_vt_SOURCES = \
$(test_sources) \
tests/test_vt.c
test_vt_CPPFLAGS = \
$(AM_CPPFLAGS) \
$(test_cflags)
test_vt_LDADD = \
$(test_libs) \
libuterm.la
test_input_SOURCES = tests/test_input.c
test_input_LDADD =
test_input_SOURCES = \
$(test_sources) \
tests/test_input.c
test_input_CPPFLAGS = \
$(AM_CPPFLAGS) \
$(test_cflags)
test_input_LDADD = \
$(test_libs) \
libuterm.la
test_key_SOURCES = tests/test_key.c
test_key_SOURCES = \
$(test_sources) \
tests/test_key.c
test_key_CPPFLAGS = \
$(AM_CPPFLAGS) \
$(test_cflags)
test_key_LDADD = \
$(test_libs)

View File

@ -39,7 +39,7 @@
"\t --debug [off] Enable debug mode\n" \
"\t --silent [off] Suppress notices and warnings\n"
struct {
static struct {
bool help;
bool exit;
bool verbose;
@ -47,6 +47,8 @@ struct {
bool silent;
} test_conf;
static struct conf_ctx *test_ctx;
static int aftercheck_debug(struct conf_option *opt, int argc, char **argv,
int idx)
{
@ -70,10 +72,10 @@ static int aftercheck_help(struct conf_option *opt, int argc, char **argv,
}
#define TEST_OPTIONS \
CONF_OPTION_BOOL('h', "help", aftercheck_help, &test_conf.help, false), \
CONF_OPTION_BOOL('v', "verbose", NULL, &test_conf.verbose, false), \
CONF_OPTION_BOOL(0, "debug", aftercheck_debug, &test_conf.debug, false), \
CONF_OPTION_BOOL(0, "silent", NULL, &test_conf.silent, false)
CONF_OPTION_BOOL_FULL('h', "help", aftercheck_help, NULL, NULL, &test_conf.help, false), \
CONF_OPTION_BOOL('v', "verbose", &test_conf.verbose, false), \
CONF_OPTION_BOOL_FULL(0, "debug", aftercheck_debug, NULL, NULL, &test_conf.debug, false), \
CONF_OPTION_BOOL(0, "silent", &test_conf.silent, false)
static void sig_generic(struct ev_eloop *p, struct signalfd_siginfo *info,
void *data)
@ -90,7 +92,11 @@ static int test_prepare(struct conf_option *opts, size_t len,
int ret;
struct ev_eloop *eloop;
ret = conf_parse_argv(opts, len, argc, argv);
ret = conf_ctx_new(&test_ctx, opts, len, &test_conf);
if (ret)
return ret;
ret = conf_ctx_parse_argv(test_ctx, argc, argv);
if (ret)
goto err_out;
@ -128,7 +134,7 @@ static int test_prepare(struct conf_option *opts, size_t len,
err_unref:
ev_eloop_unref(eloop);
err_out:
conf_free(opts, len);
conf_ctx_free(test_ctx);
return ret;
}
@ -144,5 +150,5 @@ static void test_exit(struct conf_option *opts, size_t len,
ev_eloop_unregister_signal_cb(eloop, SIGINT, sig_generic, eloop);
ev_eloop_unregister_signal_cb(eloop, SIGTERM, sig_generic, eloop);
ev_eloop_unref(eloop);
conf_free(opts, len);
conf_ctx_free(test_ctx);
}

View File

@ -176,9 +176,9 @@ static void print_help()
struct conf_option options[] = {
TEST_OPTIONS,
CONF_OPTION_STRING(0, "xkb-layout", NULL, &input_conf.xkb_layout, ""),
CONF_OPTION_STRING(0, "xkb-variant", NULL, &input_conf.xkb_variant, ""),
CONF_OPTION_STRING(0, "xkb-options", NULL, &input_conf.xkb_options, ""),
CONF_OPTION_STRING(0, "xkb-layout", &input_conf.xkb_layout, ""),
CONF_OPTION_STRING(0, "xkb-variant", &input_conf.xkb_variant, ""),
CONF_OPTION_STRING(0, "xkb-options", &input_conf.xkb_options, ""),
};
int main(int argc, char **argv)

View File

@ -192,9 +192,9 @@ static void print_help()
struct conf_option options[] = {
TEST_OPTIONS,
CONF_OPTION_BOOL(0, "fbdev", NULL, &output_conf.fbdev, false),
CONF_OPTION_BOOL(0, "test", NULL, &output_conf.test, false),
CONF_OPTION_STRING(0, "dev", NULL, &output_conf.dev, NULL),
CONF_OPTION_BOOL(0, "fbdev", &output_conf.fbdev, false),
CONF_OPTION_BOOL(0, "test", &output_conf.test, false),
CONF_OPTION_STRING(0, "dev", &output_conf.dev, NULL),
};
int main(int argc, char **argv)