[DRE-commits] [ruby-metriks] 01/01: Enable testsuite, with various patches

Tim Potter tpot-guest at moszumanska.debian.org
Mon Sep 15 03:57:12 UTC 2014


This is an automated email from the git hooks/post-receive script.

tpot-guest pushed a commit to branch master
in repository ruby-metriks.

commit 7779b7c57ff049a203f18c5807f35d201e7695a7
Author: Tim Potter <tpot at hp.com>
Date:   Mon Sep 15 13:53:48 2014 +1000

    Enable testsuite, with various patches
---
 debian/control                                               |  2 +-
 debian/patches/fix-test-generate-title-test.patch            | 12 ++++++++++++
 .../increase-timeout-on-thread_error_handling_tests.patch    | 11 +++++++++++
 debian/patches/require-mocha-setup.patch                     | 11 +++++++++++
 debian/patches/series                                        |  3 +++
 debian/ruby-tests.rb                                         |  4 ++--
 6 files changed, 40 insertions(+), 3 deletions(-)

diff --git a/debian/control b/debian/control
index 4ef9f74..b2584fe 100644
--- a/debian/control
+++ b/debian/control
@@ -3,7 +3,7 @@ Section: ruby
 Priority: optional
 Maintainer: Debian Ruby Extras Maintainers <pkg-ruby-extras-maintainers at lists.alioth.debian.org>
 Uploaders: Tim Potter <tpot at hp.com>
-Build-Depends: debhelper (>= 7.0.50~), gem2deb (>= 0.7.5~)
+Build-Depends: debhelper (>= 7.0.50~), gem2deb (>= 0.7.5~), ruby-mocha, ruby-test-unit, ruby-riemann-client
 Standards-Version: 3.9.5
 Vcs-Git: git://anonscm.debian.org/pkg-ruby-extras/ruby-metriks.git
 Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-ruby-extras/ruby-metriks.git;a=summary
diff --git a/debian/patches/fix-test-generate-title-test.patch b/debian/patches/fix-test-generate-title-test.patch
new file mode 100644
index 0000000..dc086da
--- /dev/null
+++ b/debian/patches/fix-test-generate-title-test.patch
@@ -0,0 +1,12 @@
+--- ruby-metriks-0.9.9.6.orig/test/proc_title_reporter_test.rb
++++ ruby-metriks-0.9.9.6/test/proc_title_reporter_test.rb
+@@ -20,6 +20,6 @@ class ProcTitleReporterTest < Test::Unit
+ 
+     title = @reporter.send(:generate_title)
+ 
+-    assert_equal 'test: 50.3/sec', title
++    assert_equal 'test: 50.3sec', title
+   end
+-end
+\ No newline at end of file
++end
diff --git a/debian/patches/increase-timeout-on-thread_error_handling_tests.patch b/debian/patches/increase-timeout-on-thread_error_handling_tests.patch
new file mode 100644
index 0000000..4e925e3
--- /dev/null
+++ b/debian/patches/increase-timeout-on-thread_error_handling_tests.patch
@@ -0,0 +1,11 @@
+--- ruby-metriks-0.9.9.6.orig/test/thread_error_handling_tests.rb
++++ ruby-metriks-0.9.9.6/test/thread_error_handling_tests.rb
+@@ -10,7 +10,7 @@ module ThreadErrorHandlingTests
+     reporter.stubs(:write).raises(StandardError, "boom")
+ 
+     reporter.start
+-    sleep 0.02
++    sleep 0.5
+     assert_equal true, error_handler_called
+     assert_equal "boom", rescued_error.message
+   ensure
diff --git a/debian/patches/require-mocha-setup.patch b/debian/patches/require-mocha-setup.patch
new file mode 100644
index 0000000..52c3056
--- /dev/null
+++ b/debian/patches/require-mocha-setup.patch
@@ -0,0 +1,11 @@
+--- ruby-metriks-0.9.9.6.orig/test/test_helper.rb
++++ ruby-metriks-0.9.9.6/test/test_helper.rb
+@@ -1,7 +1,7 @@
+ require 'test/unit'
+ require 'pp'
+ 
+-require 'mocha'
++require 'mocha/setup'
+ 
+ require 'metriks'
+ 
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..c27cae6
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,3 @@
+require-mocha-setup.patch
+fix-test-generate-title-test.patch
+increase-timeout-on-thread_error_handling_tests.patch
diff --git a/debian/ruby-tests.rb b/debian/ruby-tests.rb
index 0882018..ce11ea8 100644
--- a/debian/ruby-tests.rb
+++ b/debian/ruby-tests.rb
@@ -3,8 +3,8 @@
 # no test suite was defined in the Gem specification. It would be
 # a good idea to define it here so the package gets tested at build time.
 # Examples:
-$: << 'lib' << '.'
-# Dir['{spec,test}/**/*.rb'].each { |f| require f }
+$: << 'test' << '.'
+Dir['{spec,test}/**/*.rb'].each { |f| require f }
 #
 # require 'test/ts_foo.rb'
 #

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-metriks.git



More information about the Pkg-ruby-extras-commits mailing list