deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@apache.org
Subject git commit: Tests: Added nicer output for tests and CI reporter
Date Mon, 24 Sep 2012 17:42:24 GMT
Updated Branches:
  refs/heads/master 7b2ef7121 -> cb6117a49


Tests: Added nicer output for tests and CI reporter

* The 'turn' gem will format the test output more nicely
  and the output is more readable.

* The 'minitest_reporters' gem will add JUnit XML output
  that is parseable by Jenkins  JUnit output is enabled
  when BUILD_NUMBER environment variable is set.

Signed-off-by: Michal fojtik <mfojtik@redhat.com>


Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/cb6117a4
Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/cb6117a4
Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/cb6117a4

Branch: refs/heads/master
Commit: cb6117a4993d9cf299de3bd6f30067807355b5fa
Parents: 7b2ef71
Author: Michal Fojtik <mfojtik@redhat.com>
Authored: Wed Aug 29 12:14:34 2012 +0200
Committer: Michal fojtik <mfojtik@redhat.com>
Committed: Mon Sep 24 19:40:43 2012 +0200

----------------------------------------------------------------------
 server/Gemfile              |    2 ++
 server/tests/test_helper.rb |   16 ++++++++++++++++
 2 files changed, 18 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/cb6117a4/server/Gemfile
----------------------------------------------------------------------
diff --git a/server/Gemfile b/server/Gemfile
index 395e39d..6fcb914 100644
--- a/server/Gemfile
+++ b/server/Gemfile
@@ -10,6 +10,8 @@ group :development do
   gem "rack-test"
   gem "minitest"
   gem "simplecov"
+  gem 'turn'
+  gem 'minitest-reporters'
   gem "webmock"
   gem "vcr"
   gem "aws"

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/cb6117a4/server/tests/test_helper.rb
----------------------------------------------------------------------
diff --git a/server/tests/test_helper.rb b/server/tests/test_helper.rb
index 00ebcfa..ba0ef02 100644
--- a/server/tests/test_helper.rb
+++ b/server/tests/test_helper.rb
@@ -20,6 +20,22 @@ if ENV['COVERAGE']
   end
 end
 
+# Make the test output more nice and readable
+#
+begin
+  require 'turn'
+  Turn.config do |c|
+    c.format  = :pretty
+    c.trace   = true
+    c.natural = true
+  end
+rescue; end
+
+begin
+  require "minitest/reporters"
+  MiniTest::Reporters.use!(MiniTest::Reporters::JUnitReporter.new) if !ENV['BUILD_NUMBER'].nil?
+rescue;end
+
 def record_retries(name='', opts = {})
   opts[:before] = Proc.new { |r, &block|
     VCR.use_cassette("#{__name__}-#{name.empty? ? '' : "#{name}-"}#{r}", &block)


Mime
View raw message