[DRE-commits] [gem2deb] 04/07: print a sbuild-like banner before start running tests
Antonio Terceiro
terceiro at moszumanska.debian.org
Wed Jul 22 01:54:35 UTC 2015
This is an automated email from the git hooks/post-receive script.
terceiro pushed a commit to branch master
in repository gem2deb.
commit b8e6827c87113912ad4fe53b70d948aeb1fed011
Author: Antonio Terceiro <terceiro at debian.org>
Date: Tue Jul 21 22:27:13 2015 -0300
print a sbuild-like banner before start running tests
---
debian/changelog | 1 +
lib/gem2deb/test_runner.rb | 16 ++++++++++++----
2 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index d82644f..bff625e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,7 @@ gem2deb (0.20) UNRELEASED; urgency=medium
- gem2deb/rake/testtask: Use options to make all test runs verbose by
default
- gem2deb/rake/spectask: add a utility task for running tests with rspec
+ - print a sbuild-like banner before start running tests
* dh-make-ruby: generate debian/ruby-tests.rake using gem2deb/rake/spectask
-- Antonio Terceiro <terceiro at debian.org> Mon, 20 Jul 2015 23:12:27 -0300
diff --git a/lib/gem2deb/test_runner.rb b/lib/gem2deb/test_runner.rb
index b500a87..20c783d 100644
--- a/lib/gem2deb/test_runner.rb
+++ b/lib/gem2deb/test_runner.rb
@@ -162,12 +162,20 @@ module Gem2Deb
@ruby_binary ||= File.join('/usr/bin', rubyver)
end
+ def print_banner(msg)
+ puts
+ puts '┌' + '─' * 78 + '┐'
+ puts '│ %-77s│' % msg
+ puts '└' + '─' * 78 + '┘'
+ puts
+ end
+
class TestsListedInMetadata < TestRunner
def required_file
'debian/ruby-test-files.yaml'
end
def do_run_tests
- puts "Running tests for #{rubyver} with test file list from debian/ruby-test-files.yaml ..."
+ print_banner "Running tests for #{rubyver} from debian/ruby-test-files.yaml"
run_ruby(
'-ryaml',
'-e',
@@ -181,7 +189,7 @@ module Gem2Deb
'debian/ruby-tests.rake'
end
def do_run_tests
- puts "Running tests for #{rubyver} using debian/ruby-tests.rake ..."
+ print_banner "Running tests for #{rubyver} from debian/ruby-tests.rake"
run_rake('-f', 'debian/ruby-tests.rake')
end
end
@@ -191,7 +199,7 @@ module Gem2Deb
'debian/ruby-tests.rb'
end
def do_run_tests
- puts "Running tests for #{rubyver} using debian/ruby-tests.rb..."
+ print_banner "Running tests for #{rubyver} from debian/ruby-tests.rb"
ENV['RUBY_TEST_VERSION'] = rubyver
ENV['RUBY_TEST_BIN'] = ruby_binary
run_ruby(required_file)
@@ -203,7 +211,7 @@ module Gem2Deb
'debian/rules'
end
def do_run_tests
- puts "Running tests for #{rubyver}: found no way to run a test suite!"
+ print_banner "Running tests for #{rubyver}: found no way to run a test suite!"
end
end
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/gem2deb.git
More information about the Pkg-ruby-extras-commits
mailing list