mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
tests: skip running tests for non root user
Testing needs 'root' privileges. Only 'make run-unit-test' can work without them.
This commit is contained in:
parent
4a49851207
commit
2bea95764e
@ -29,6 +29,12 @@
|
|||||||
|
|
||||||
int main(int argc, const char **argv)
|
int main(int argc, const char **argv)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
if (getuid() != 0) {
|
||||||
|
std::cout << "Skipping tests, root is required, current UID: " << getuid() << "\n";
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
return brick::shelltest::run( argc, argv, "LVM_TEST_FLAVOUR" );
|
return brick::shelltest::run( argc, argv, "LVM_TEST_FLAVOUR" );
|
||||||
} catch (std::exception const& e) {
|
} catch (std::exception const& e) {
|
||||||
|
Loading…
Reference in New Issue
Block a user