From 1353e7dec755d6fc367eb5fb38c61013800bb362 Mon Sep 17 00:00:00 2001 From: mvandervoord Date: Fri, 13 Aug 2010 00:42:49 +0000 Subject: [PATCH] - 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 --- rakefile_helper.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rakefile_helper.rb b/rakefile_helper.rb index 05d35ac..0ff9d95 100644 --- a/rakefile_helper.rb +++ b/rakefile_helper.rb @@ -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