summaryrefslogtreecommitdiff
path: root/bootstraptest/runner.rb
diff options
context:
space:
mode:
Diffstat (limited to 'bootstraptest/runner.rb')
-rwxr-xr-xbootstraptest/runner.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/bootstraptest/runner.rb b/bootstraptest/runner.rb
index 965c335315..c36c5a2dd9 100755
--- a/bootstraptest/runner.rb
+++ b/bootstraptest/runner.rb
@@ -127,8 +127,10 @@ End
@tty = true
end
if @color
- @passed = "\e[#{ENV['PASSED_COLOR']||'32'}m"
- @failed = "\e[#{ENV['FAILED_COLOR']||'31'}m"
+ # dircolors-like style
+ colors = (colors = ENV['TEST_COLORS']) ? Hash[colors.scan(/(\w)=([^:]*)/)] : {}
+ @passed = "\e[#{colors["pass"] || "32"}m"
+ @failed = "\e[#{colors["fail"] || "31"}m"
@reset = "\e[m"
else
@passed = @failed = @reset = ""