Skip to content

Commit

Permalink
Merge pull request #163 from bretts/quieter-test-task
Browse files Browse the repository at this point in the history
Show extended output for TestTask failures only with verbose or trace
  • Loading branch information
drbrain authored Sep 20, 2016
2 parents 93e55a4 + b878500 commit d027052
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions lib/rake/testtask.rb
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,16 @@ def define
if !ok && status.respond_to?(:signaled?) && status.signaled?
raise SignalException.new(status.termsig)
elsif !ok
fail "Command failed with status (#{status.exitstatus}): " +
"[ruby #{args}]"
status = "Command failed with status (#{status.exitstatus})"
details = ": [ruby #{args}]"
message =
if Rake.application.options.trace or @verbose then
status + details
else
status
end

fail message
end
end
end
Expand Down

0 comments on commit d027052

Please sign in to comment.