- do not abort system tests on first failure

git-svn-id: http://cmock.svn.sourceforge.net/svnroot/cmock/trunk@184 bf332499-1b4d-0410-844d-d2d48d5cc64c
This commit is contained in:
mvandervoord
2010-08-13 00:42:49 +00:00
parent 84fd7c8ddc
commit 1353e7dec7
+3 -3
View File
@@ -145,11 +145,11 @@ module RakefileHelpers
return {:command => command, :pre_support => pre_support, :post_support => post_support}
end
def execute(command_string, verbose=true)
def execute(command_string, verbose=true, raise_on_failure=true)
#report command_string
output = `#{command_string}`.chomp
report(output) if (verbose && !output.nil? && (output.length > 0))
if $?.exitstatus != 0
if ($?.exitstatus != 0) and (raise_on_failure)
raise "#{command_string} failed. (Returned #{$?.exitstatus})"
end
return output
@@ -235,7 +235,7 @@ module RakefileHelpers
else
cmd_str = "#{simulator[:command]} #{simulator[:pre_support]} #{executable} #{simulator[:post_support]}"
end
output = execute(cmd_str, false)
output = execute(cmd_str, false, false)
test_results = $cfg['compiler']['build_path'] + test_base + RESULT_EXTENSION
File.open(test_results, 'w') { |f| f.print output }
end