Merge pull request 3821 from davide125/fix-tests

This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2016-07-31 22:06:09 -04:00
4 changed files with 25 additions and 6 deletions
+9 -2
View File
@@ -1535,11 +1535,18 @@ if (!($<==0)) {
exit($EXIT_TEST_SKIP);
}
# skip the test when running in a chroot
system("systemd-detect-virt", "-r", "-q");
if ($? >> 8 == 0) {
print "Running in a chroot, skipping the test.\n";
exit($EXIT_TEST_SKIP);
}
# skip the test when running in a container
system("systemd-detect-virt", "-c", "-q");
if ($? >> 8 == 0) {
print "Running in a container, skipping the test.\n";
exit($EXIT_TEST_SKIP);
print "Running in a container, skipping the test.\n";
exit($EXIT_TEST_SKIP);
}
udev_setup();