From f06b94b42f53063b954c581204191e9771e8d6ac Mon Sep 17 00:00:00 2001 From: Martin Pärtel Date: Sun, 20 Sep 2015 19:25:43 +0100 Subject: Implemented --resolved-symlink-deletion and added tests. --- tests/common.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tests/common.rb') 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' -- cgit v1.2.3