-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #408 from rsmp-nordic/m0022_cancellation
M0022 cancellation
- Loading branch information
Showing
10 changed files
with
311 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,3 +49,6 @@ alarms: | |
restrict_testing: | ||
sxl_version: 1.2.1 | ||
core_version: 3.2.2 | ||
log: | ||
watchdogs: false | ||
acknowledgements: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
require 'rspec/core/formatters/console_codes' | ||
|
||
module Validator | ||
class Steps < FormatterBase | ||
RSpec::Core::Formatters.register self, :start, :dump_pending, :dump_failures, :close, | ||
:dump_summary, :example_started, :example_passed, :example_failed, :example_pending, | ||
:message, :warning, :step, :example_group_started, :example_group_finished | ||
|
||
def start notification | ||
@output << "\n" | ||
end | ||
|
||
def warning notification | ||
@output << colorize(" Warning: #{notification.message}\n",:yellow) | ||
end | ||
|
||
def step notification | ||
@output << colorize(" #{notification.message}\n",:cyan) | ||
end | ||
|
||
def message notification | ||
@output << " #{notification.message}\n" | ||
end | ||
|
||
def example_pending notification | ||
@output << colorize(" Pending\n\n", :pending) | ||
end | ||
|
||
def example_started notification | ||
@output << colorize("\n#{notification.example.full_description}\n",:bold) | ||
end | ||
|
||
def example_passed notification # ExampleNotification | ||
@output << colorize(" Passed\n\n",:success) | ||
end | ||
|
||
def example_failed notification | ||
# RSpec::Core::Formatters::ExceptionPresenter is a private class which | ||
# should not really be used by us, but the snippet extraction and backtrace | ||
# processing seems rather cumbersome to reimplement | ||
presenter = RSpec::Core::Formatters::ExceptionPresenter.new(notification.example.execution_result.exception, notification.example, :indentation => 0) | ||
|
||
error = presenter.message_lines.map do |line| | ||
colorize(" #{line}\n",:failure) | ||
end.join | ||
@output << error << "\n" | ||
|
||
backtrace = presenter.formatted_backtrace.map do |line| | ||
colorize(" # #{line}\n",:light_blue) | ||
end.join | ||
@output << backtrace << "\n" | ||
end | ||
|
||
def dump_pending notification | ||
dump_sentinel_warnings | ||
super notification | ||
end | ||
end | ||
end |
Oops, something went wrong.