mirror of
https://github.com/ThrowTheSwitch/CMock.git
synced 2026-06-05 21:15:20 +00:00
- 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:
+3
-3
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user