[DRE-commits] [SCM] gem2deb.git branch, master, updated. 460e84be1f7bd8d430c5ddae46d62fd657ac5fa3
Antonio Terceiro
terceiro at softwarelivre.org
Fri Mar 18 14:53:31 UTC 2011
The following commit has been merged in the master branch:
commit a30d078c195777ec579492e4eabed8504e4d1ae9
Author: Antonio Terceiro <terceiro at softwarelivre.org>
Date: Thu Mar 17 20:38:36 2011 -0300
Build all sample packages in integration testing
diff --git a/test/integration/gem2deb_test.rb b/test/integration/gem2deb_test.rb
index 13d617c..3d9cc3b 100644
--- a/test/integration/gem2deb_test.rb
+++ b/test/integration/gem2deb_test.rb
@@ -12,9 +12,23 @@ class Gem2DebTest < Gem2DebTestCase
ENV['PERL5LIB'] = perl5lib
ENV['PATH'] = [File.join(GEM2DEB_ROOT_SOURCE_DIR, 'bin'), ENV['PATH']].join(':')
ENV['RUBYLIB'] = File.join(GEM2DEB_ROOT_SOURCE_DIR, 'lib')
+ end
+
+ Dir.glob('test/sample/*/pkg/*.gem').each do |gem|
+ should "build #{gem} correcly" do
+ self.class.build(gem)
+ package_name = 'ruby-' + File.basename(File.dirname(File.dirname(gem))).gsub('_', '-')
+ binary_packages = File.join(self.class.tmpdir, "#{package_name}*.deb")
+ packages = Dir.glob(binary_packages)
+ assert !packages.empty?, "building #{gem} produced no binary packages! (expected to find #{binary_packages})"
+ end
+ end
- FileUtils.cp SIMPLE_GEM, tmpdir
- gem = File.basename(SIMPLE_GEM)
+ protected
+
+ def self.build(gem)
+ FileUtils.cp gem, tmpdir
+ gem = File.basename(gem)
Dir.chdir(tmpdir) do
cmd = "gem2deb -d #{gem}"
silence_all_output do
@@ -26,8 +40,4 @@ class Gem2DebTest < Gem2DebTestCase
end
end
- should 'build package successfully' do
- assert_file_exists File.join(self.class.tmpdir, 'ruby-simplegem_0.0.1-1_all.deb')
- end
-
end
--
gem2deb.git
More information about the Pkg-ruby-extras-commits
mailing list