aboutsummaryrefslogtreecommitdiffstats
path: root/tests/common.rb
diff options
context:
space:
mode:
authorMartin Pärtel <martin.partel@gmail.com>2012-07-04 01:36:56 +0300
committerMartin Pärtel <martin.partel@gmail.com>2012-07-04 01:36:56 +0300
commit435f4edb6ed4a8e4920bb925c333ac0a610c14d2 (patch)
treeee2df7636d2ca8c8f25818dba8554e776a494d93 /tests/common.rb
parent4799ba57707884a7d451434daa211eff2330678a (diff)
downloadbindfs-435f4edb6ed4a8e4920bb925c333ac0a610c14d2.tar.gz
Cache user data for user_belongs_to_group().
This considerably speeds up --mirror @group.
Diffstat (limited to 'tests/common.rb')
-rwxr-xr-xtests/common.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/common.rb b/tests/common.rb
index 58d5d84..2563b38 100755
--- a/tests/common.rb
+++ b/tests/common.rb
@@ -126,12 +126,16 @@ def testenv(bindfs_args, options = {}, &block)
testcase_ok = true
begin
- yield
+ block.call(bindfs_pid)
rescue Exception => ex
fail("ERROR: testcase `#{options[:title]}' failed", ex)
testcase_ok = false
end
+ if File.exist?("bindfs.log")
+ system("cat bindfs.log")
+ end
+
begin
unless system(umount_cmd + ' mnt')
raise Exception.new(umount_cmd + " failed with status #{$?}")
@@ -141,10 +145,6 @@ def testenv(bindfs_args, options = {}, &block)
fail("ERROR: failed to umount")
testcase_ok = false
end
-
- if File.exist?("bindfs.log")
- system("cat bindfs.log")
- end
begin
Dir.chdir '..'