Skip to content

Commit

Permalink
Merge pull request #1068 from BallAerospace/stop_on_exception
Browse files Browse the repository at this point in the history
Stop if testcase and abort checked
  • Loading branch information
jmthomas authored Nov 23, 2019
2 parents fc3d60b + 2bd9275 commit cc16402
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/cosmos/tools/test_runner/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def run
if result
results << result
yield result if block_given?
raise StopScript if result.stopped
raise StopScript if (results[-1].exceptions and @@abort_on_exception) or results[-1].stopped
end

# Run each test case
Expand All @@ -141,7 +141,7 @@ def run
if result
results << result
yield result if block_given?
raise StopScript if result.stopped
raise StopScript if (results[-1].exceptions and @@abort_on_exception) or results[-1].stopped
end

results
Expand Down Expand Up @@ -387,17 +387,20 @@ def run(&block)
result = run_test_case(test_class, test_case, true)
results << result
yield result if block_given?
raise StopScript if (result.exceptions and test_class.abort_on_exception) or result.stopped
when :TEST_SETUP
result = run_test_setup(test_class, true)
if result
results << result
yield result if block_given?
raise StopScript if (result.exceptions and test_class.abort_on_exception) or result.stopped
end
when :TEST_TEARDOWN
result = run_test_teardown(test_class, true)
if result
results << result
yield result if block_given?
raise StopScript if (result.exceptions and test_class.abort_on_exception) or result.stopped
end
end
end
Expand Down

0 comments on commit cc16402

Please sign in to comment.