diff options
author | Martin Pärtel <martin.partel@gmail.com> | 2015-09-20 19:25:43 +0100 |
---|---|---|
committer | Martin Pärtel <martin.partel@gmail.com> | 2015-09-20 19:51:27 +0100 |
commit | f06b94b42f53063b954c581204191e9771e8d6ac (patch) | |
tree | edabe3f916ee3b56b2bbfb2078b6ccd283649021 /tests/common.rb | |
parent | a2f68ef6ae14522291458ff587c39c28cee430dc (diff) | |
download | bindfs-f06b94b42f53063b954c581204191e9771e8d6ac.tar.gz |
Implemented --resolved-symlink-deletion and added tests.
Diffstat (limited to 'tests/common.rb')
-rwxr-xr-x | tests/common.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/common.rb b/tests/common.rb index 36576e5..5701123 100755 --- a/tests/common.rb +++ b/tests/common.rb @@ -179,6 +179,18 @@ def root_testenv(bindfs_args, options = {}, &block) end end +# Like testenv but skips the test if not running as non-root. +# TODO: make all tests runnable as root +def nonroot_testenv(bindfs_args, options = {}, &block) + if Process.uid != 0 + testenv(bindfs_args, options, &block) + else + puts "--- #{bindfs_args} ---" + puts "[ #{bindfs_args} ]" + puts "SKIP (requires running as non-root)" + end +end + def umount_cmd if `which fusermount`.strip.empty? then 'umount' |