[DRE-commits] [gem2deb] 03/04: gem2deb-test-runner: do not exit after checking dependencies
Antonio Terceiro
terceiro at moszumanska.debian.org
Sat Jun 13 01:20:28 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 733a05c8fdb26f67ea1d2a3cec74a1b54e32bcee
Author: Antonio Terceiro <terceiro at debian.org>
Date: Fri Jun 12 22:10:58 2015 -0300
gem2deb-test-runner: do not exit after checking dependencies
---
debian/changelog | 2 ++
lib/gem2deb/test_runner.rb | 15 ++++++++++-----
2 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 33a89ca..84e7100 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,8 @@ gem2deb (0.18) UNRELEASED; urgency=medium
dependencies when running tests actually works.
* gem2deb-test-runner: fix dependency checking during build (by fixing name
of Rubygems environment variable, s/GEMPATH/GEM_PATH/)
+ * gem2deb-test-runner: when called with --check-dependencies, do not exit
+ after successfully checking dependencies, but before running tests.
-- Antonio Terceiro <terceiro at debian.org> Fri, 12 Jun 2015 11:04:47 -0300
diff --git a/lib/gem2deb/test_runner.rb b/lib/gem2deb/test_runner.rb
index 454301a..c6ab89d 100644
--- a/lib/gem2deb/test_runner.rb
+++ b/lib/gem2deb/test_runner.rb
@@ -70,7 +70,13 @@ module Gem2Deb
def do_check_dependencies
metadata = Gem2Deb::Metadata.new('.')
if metadata.gemspec
- run_ruby '-e', 'gem "%s"' % metadata.name
+ cmd = [rubyver, '-e', 'gem "%s"' % metadata.name]
+ puts "GEM_PATH=#{gem_path} " + cmd.shelljoin
+ system({ 'GEM_PATH' => gem_path }, *cmd)
+ exitstatus = $?.exitstatus
+ if exitstatus != 0
+ exit(exitstatus)
+ end
end
end
@@ -91,15 +97,14 @@ module Gem2Deb
rubylib = load_path.join(':')
cmd.unshift(rubyver)
- puts "RUBYLIB=#{rubylib} " + "GEM_PATH=#{gem_path} " + cmd.shelljoin
+ rlib = (ENV['RUBYLIB'] ? ENV['RUBYLIB'] + ':' : '') + rubylib
+ puts "RUBYLIB=#{rubylib} " + cmd.shelljoin
- ENV['GEM_PATH'] = (ENV['GEM_PATH'] ? ENV['GEM_PATH'] + ':' : '') + gem_path
- ENV['RUBYLIB'] = (ENV['RUBYLIB'] ? ENV['RUBYLIB'] + ':' : '') + rubylib
if autopkgtest
move_away 'lib'
move_away 'ext'
end
- system(*cmd)
+ system({ 'RUBYLIB' => rlib }, *cmd)
exitstatus = $?.exitstatus
if autopkgtest
restore 'lib'
--
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