diff options
Diffstat (limited to 'tests/common.rb')
-rwxr-xr-x | tests/common.rb | 10 |
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 '..' |