summaryrefslogtreecommitdiff
path: root/tests/test_output.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_output.c')
-rw-r--r--tests/test_output.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/test_output.c b/tests/test_output.c
index 8f8e0b7..ed6ff6d 100644
--- a/tests/test_output.c
+++ b/tests/test_output.c
@@ -57,6 +57,7 @@ static struct ev_eloop *eloop;
struct {
bool fbdev;
bool test;
+ char *dev;
} output_conf;
static int blit_outputs(struct uterm_video *video)
@@ -176,7 +177,8 @@ static void print_help()
"\n"
"Video Options:\n"
"\t --fbdev [off] Use fbdev instead of DRM\n"
- "\t --test [off] Try displaying content instead of listing devices\n",
+ "\t --test [off] Try displaying content instead of listing devices\n"
+ "\t --dev [/dev/dri/card0 | /dev/fb0] Use the given device\n",
"test_input");
/*
* 80 char line:
@@ -192,6 +194,7 @@ 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),
};
int main(int argc, char **argv)
@@ -215,6 +218,9 @@ int main(int argc, char **argv)
node = "/dev/dri/card0";
}
+ if (output_conf.dev)
+ node = output_conf.dev;
+
log_notice("Creating video object using %s...", node);
ret = uterm_video_new(&video, eloop, mode, node);