summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@googlemail.com>2012-08-12 13:30:51 +0200
committerDavid Herrmann <dh.herrmann@googlemail.com>2012-08-12 13:30:51 +0200
commit2841558f7c4f2467457771413c1a36fb35c20cf0 (patch)
treeb2ab1b676a1978311b345a2099eec061acd96b38 /tests
parentd97fc0baf01b1a666429c4dfb8894bed0f7d895c (diff)
test_output: add --dev parameter
The --dev parameter is used to specify the device that is used for testing. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Diffstat (limited to 'tests')
-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);