File tree Expand file tree Collapse file tree 1 file changed +17
-12
lines changed Expand file tree Collapse file tree 1 file changed +17
-12
lines changed Original file line number Diff line number Diff line change @@ -205,18 +205,23 @@ module Spec
205205 def self.run
206206 @@start_time = Time .monotonic
207207
208- at_exit do
209- log_setup
210- maybe_randomize
211- run_filters
212- root_context.run
213- rescue ex
214- STDERR .print " Unhandled exception: "
215- ex.inspect_with_backtrace(STDERR )
216- STDERR .flush
217- @@aborted = true
218- ensure
219- finish_run
208+ at_exit do |status |
209+ # Do not run specs if the process is exiting on an error
210+ next unless status == 0
211+
212+ begin
213+ log_setup
214+ maybe_randomize
215+ run_filters
216+ root_context.run
217+ rescue ex
218+ STDERR .print " Unhandled exception: "
219+ ex.inspect_with_backtrace(STDERR )
220+ STDERR .flush
221+ @@aborted = true
222+ ensure
223+ finish_run
224+ end
220225 end
221226 end
222227
You can’t perform that action at this time.
0 commit comments