aboutsummaryrefslogtreecommitdiffstats
path: root/tests/common.rb
diff options
context:
space:
mode:
authorMartin Pärtel <martin.partel@gmail.com>2017-03-14 00:09:20 +0000
committerMartin Pärtel <martin.partel@gmail.com>2017-03-14 00:09:20 +0000
commitef44d5b2b3ba4ff4f1c8d60f125f521be9cd0e78 (patch)
tree90c931c596a10004ff578cf57dd192c98353f193 /tests/common.rb
parent3f10f219d18e42967c67349f6e5f4340769e524d (diff)
downloadbindfs-ef44d5b2b3ba4ff4f1c8d60f125f521be9cd0e78.tar.gz
Run tests on FreeBSD 10.3 and fix tests so they pass.
Fully fixes issue #51.
Diffstat (limited to 'tests/common.rb')
-rw-r--r--tests/common.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/common.rb b/tests/common.rb
index b3a14e4..24fd036 100644
--- a/tests/common.rb
+++ b/tests/common.rb
@@ -123,7 +123,12 @@ def testenv(bindfs_args, options = {}, &block)
bindfs_pid = nil
begin
- cmd = "../#{EXECUTABLE_PATH} #{bindfs_args} -f #{Shellwords.escape(srcdir)} #{Shellwords.escape(mntdir)}"
+ extra_args = "-f"
+ # Don't rely on user_allow_other in /etc/fuse.conf.
+ # On FreeBSD it isn't even possible to set that.
+ extra_args += " --no-allow-other" if Process.uid != 0
+
+ cmd = "../#{EXECUTABLE_PATH} #{bindfs_args} #{extra_args} #{Shellwords.escape(srcdir)} #{Shellwords.escape(mntdir)}"
if options[:valgrind]
cmd = "valgrind --error-exitcode=100 #{options[:valgrind_opts]} #{cmd}"
end