summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtest/udev-test.pl18
1 files changed, 13 insertions, 5 deletions
diff --git a/test/udev-test.pl b/test/udev-test.pl
index cf6ca6b80c..5b1e33504e 100755
--- a/test/udev-test.pl
+++ b/test/udev-test.pl
@@ -18,11 +18,19 @@
use warnings;
use strict;
-use POSIX qw(WIFEXITED WEXITSTATUS);
-use IPC::SysV qw(IPC_PRIVATE S_IRUSR S_IWUSR IPC_CREAT);
-use IPC::Semaphore;
-use Time::HiRes qw(usleep);
-use Cwd qw(getcwd abs_path);
+
+BEGIN {
+ my $EXIT_TEST_SKIP = 77;
+
+ unless (eval "use POSIX qw(WIFEXITED WEXITSTATUS);
+ use Cwd qw(getcwd abs_path);
+ use IPC::Semaphore;
+ use IPC::SysV qw(IPC_PRIVATE S_IRUSR S_IWUSR IPC_CREAT);
+ use Time::HiRes qw(usleep); 1") {
+ warn "Failed to import dependencies, skipping the test: $@";
+ exit($EXIT_TEST_SKIP);
+ }
+}
my $udev_bin = "./test-udev";
my $valgrind = 0;