From: Kristian Høgsberg Date: Mon, 6 Apr 2009 21:22:10 +0000 (-0400) Subject: Skip tests that require root X-Git-Tag: submit/1.0/20121108.012404~501 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=751db3fe27d5e51925c28ceecadb828784d46028;p=profile%2Fivi%2Flibdrm.git Skip tests that require root This lets us do make distcheck as non-root. --- diff --git a/tests/setversion.c b/tests/setversion.c index f4bfbfb..3aaf7cc 100644 --- a/tests/setversion.c +++ b/tests/setversion.c @@ -40,6 +40,11 @@ int main(int argc, char **argv) int fd, ret; drm_set_version_t sv, version; + if (getuid() != 0) { + fprintf(stderr, "setversion test requires root, skipping\n"); + return 0; + } + fd = drm_open_any_master(); /* First, check that we can get the DD/DI versions. */ diff --git a/tests/updatedraw.c b/tests/updatedraw.c index 2f22fef..a61eb15 100644 --- a/tests/updatedraw.c +++ b/tests/updatedraw.c @@ -123,6 +123,11 @@ int main(int argc, char **argv) { int fd, ret, d1, d2; + if (getuid() != 0) { + fprintf(stderr, "updatedraw test requires root, skipping\n"); + return 0; + } + fd = drm_open_any_master(); d1 = add_drawable(fd);