diff options
author | Martin Pärtel <martin.partel@gmail.com> | 2012-09-15 16:04:45 +0300 |
---|---|---|
committer | Martin Pärtel <martin.partel@gmail.com> | 2012-09-15 16:04:45 +0300 |
commit | 086cab2b43c1abb603f7da32df663852cad81262 (patch) | |
tree | d5eeb56cfd1a3aff4c2311c95dc9e35ecc4fea4e /tests | |
parent | 9644b5e1be38a8eddaa70531891cc9da98c93394 (diff) | |
download | bindfs-086cab2b43c1abb603f7da32df663852cad81262.tar.gz |
tests: fail test on nonsuccessful exit code
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/common.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/common.rb b/tests/common.rb index 2563b38..c99016b 100755 --- a/tests/common.rb +++ b/tests/common.rb @@ -109,7 +109,7 @@ def testenv(bindfs_args, options = {}, &block) begin cmd = "../#{EXECUTABLE_PATH} #{bindfs_args} -f src mnt" if options[:valgrind] - cmd = "valgrind #{options[:valgrind_opts]} #{cmd}" + cmd = "valgrind --error-exitcode=100 #{options[:valgrind_opts]} #{cmd}" end bindfs_pid = Process.fork do exec cmd @@ -145,6 +145,11 @@ def testenv(bindfs_args, options = {}, &block) fail("ERROR: failed to umount") testcase_ok = false end + + if !$?.success? + fail("exit status: #{$?}") + testcase_ok = false + end begin Dir.chdir '..' |