projects
/
platform
/
upstream
/
libevdev.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c4cfd76
)
test: add LIBEVDEV_SKIP_ROOT_TESTS environment variable check
author
Peter Hutterer
<peter.hutterer@who-t.net>
Fri, 29 Jun 2018 01:13:44 +0000
(11:13 +1000)
committer
Peter Hutterer
<peter.hutterer@who-t.net>
Fri, 29 Jun 2018 01:15:41 +0000
(11:15 +1000)
Depending on the container, or other checks don't always work. Add an extra
environment variable instead.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
test/test-main.c
patch
|
blob
|
history
diff --git
a/test/test-main.c
b/test/test-main.c
index
fa4c48c
..
1898d0c
100644
(file)
--- a/
test/test-main.c
+++ b/
test/test-main.c
@@
-91,6
+91,8
@@
int main(void)
for (t = &__start_test_section; t < &__stop_test_section; t++) {
if (t->needs_root_privileges) {
+ if (getenv("LIBEVDEV_SKIP_ROOT_TESTS"))
+ return 77;
if (getuid() != 0) {
fprintf(stderr, "This test needs to run as root\n");