summaryrefslogtreecommitdiff
path: root/tests/common
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2015-10-23 11:34:50 +0200
committerDavid Sterba <dsterba@suse.com>2015-11-02 09:35:06 +0100
commit1fcb190793b55317463cf1674a3d0bb2f00fe4d7 (patch)
tree6ba867505238f2c66a84ffcbd1a8ffa120913529 /tests/common
parent6105df64a1a137e2449e735f4ce8c67e07567b29 (diff)
btrfs-progs: tests: do not run sudo helper tests if not necessary
We use setup_root_helper in some helpers to make sure that the sudo helper is set up, and adding that to each test. Make the real test run only once. Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'tests/common')
-rw-r--r--tests/common2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/common b/tests/common
index 785280f0..4542fa89 100644
--- a/tests/common
+++ b/tests/common
@@ -157,7 +157,7 @@ root_helper()
setup_root_helper()
{
- if [ $UID -eq 0 ]; then
+ if [ $UID -eq 0 -o -n "$SUDO_HELPER" ]; then
return
fi