mirror of
https://gitlab.freedesktop.org/libevdev/libevdev.git
synced 2025-12-25 15:10:14 +01:00
test: add LIBEVDEV_SKIP_ROOT_TESTS environment variable check
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>
This commit is contained in:
parent
c4cfd7668a
commit
e4c3a8ee7a
1 changed files with 2 additions and 0 deletions
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue