Skip to content

Commit

Permalink
Merge pull request #145 from flavorjones/flavorjones-make-tests-quiet
Browse files Browse the repository at this point in the history
make unit tests quiet
  • Loading branch information
flavorjones authored May 30, 2024
2 parents c451dde + 8d1bab9 commit 250a0d5
Show file tree
Hide file tree
Showing 10 changed files with 140 additions and 112 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

#### Added

- When setting the C compiler through the `MiniPortile` constructor, the preferred keyword argument is now `:cc_command`. The original `:gcc_command` is still supported.
- When setting the C compiler through the `MiniPortile` constructor, the preferred keyword argument is now `:cc_command`. The original `:gcc_command` is still supported. @flavorjones
- GPG file verification error messages are captured in the raised exception. Previously these errors went to `stderr`. @flavorjones


### 2.8.6 / 2024-04-14
Expand Down
8 changes: 3 additions & 5 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
require "rake/clean"
require "bundler/gem_tasks"
require "rake/testtask"

namespace :test do
desc "Test MiniPortile by running unit tests"
task :unit do
sh "ruby -w -W2 -I. -Ilib -e \"#{Dir["test/test_*.rb"].map { |f| "require '#{f}';" }.join}\" -- #{ENV["TESTOPTS"]} -v"
end
Rake::TestTask.new("test:unit")

namespace :test do
desc "Test MiniPortile by compiling examples"
task :examples do
Dir.chdir("examples") do
Expand Down
38 changes: 23 additions & 15 deletions lib/mini_portile2/mini_portile.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
require 'cgi'
require 'rbconfig'
require 'shellwords'
require 'open3'

# Monkey patch for Net::HTTP by ruby open-uri fix:
# https://github.com/ruby/ruby/commit/58835a9
Expand Down Expand Up @@ -103,7 +104,7 @@ def initialize(name, version, **kwargs)
@files = []
@patch_files = []
@log_files = {}
@logger = STDOUT
@logger = kwargs[:logger] || STDOUT
@source_directory = nil

@cc_command = kwargs[:cc_command] || kwargs[:gcc_command]
Expand Down Expand Up @@ -463,24 +464,29 @@ def verify_file(file)
gpg_exe = which('gpg2') || which('gpg') || raise("Neither GPG nor GPG2 is installed")

# import the key into our own keyring
gpg_status = IO.popen([gpg_exe, "--status-fd", "1", "--no-default-keyring", "--keyring", KEYRING_NAME, "--import"], "w+") do |io|
io.write gpg[:key]
io.close_write
io.read
gpg_error = nil
gpg_status = Open3.popen3(gpg_exe, "--status-fd", "1", "--no-default-keyring", "--keyring", KEYRING_NAME, "--import") do |gpg_in, gpg_out, gpg_err, _thread|
gpg_in.write gpg[:key]
gpg_in.close
gpg_error = gpg_err.read
gpg_out.read
end
key_ids = gpg_status.scan(/\[GNUPG:\] IMPORT_OK \d+ (?<key_id>[0-9a-f]+)/i).map(&:first)
raise "invalid gpg key provided" if key_ids.empty?
raise "invalid gpg key provided:\n#{gpg_error}" if key_ids.empty?

# verify the signature against our keyring
gpg_status = IO.popen([gpg_exe, "--status-fd", "1", "--no-default-keyring", "--keyring", KEYRING_NAME, "--verify", signature_file, file[:local_path]], &:read)

# remove the key from our keyring
key_ids.each do |key_id|
IO.popen([gpg_exe, "--batch", "--yes", "--no-default-keyring", "--keyring", KEYRING_NAME, "--delete-keys", key_id], &:read)
raise "unable to delete the imported key" unless $?.exitstatus==0
begin
# verify the signature against our keyring
gpg_status, gpg_error, _status = Open3.capture3(gpg_exe, "--status-fd", "1", "--no-default-keyring", "--keyring", KEYRING_NAME, "--verify", signature_file, file[:local_path])

raise "signature mismatch:\n#{gpg_error}" unless gpg_status.match(/^\[GNUPG:\] VALIDSIG/)
ensure
# remove the key from our keyring
key_ids.each do |key_id|
IO.popen([gpg_exe, "--batch", "--yes", "--no-default-keyring", "--keyring", KEYRING_NAME, "--delete-keys", key_id], &:read)
raise "unable to delete the imported key" unless $?.exitstatus==0
end
end

raise "signature mismatch" unless gpg_status.match(/^\[GNUPG:\] VALIDSIG/)

else
digest = case
Expand Down Expand Up @@ -554,6 +560,8 @@ def detect_host
output = `#{gcc_cmd} -v 2>&1`
if m = output.match(/^Target\: (.*)$/)
@detect_host = m[1]
else
@detect_host = nil
end

@detect_host
Expand Down Expand Up @@ -703,7 +711,7 @@ def download_file_http(url, full_path, count = 3)
return download_file(redirect.url, full_path, count-1)
rescue => e
count = count - 1
puts "#{count} retrie(s) left for #{filename} (#{e.message})"
@logger.puts "#{count} retrie(s) left for #{filename} (#{e.message})"
if count > 0
sleep 1
return download_file_http(url, full_path, count)
Expand Down
8 changes: 7 additions & 1 deletion test/helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
require 'fileutils'
require 'erb'
require 'mini_portile2'
require 'logger'

puts "#{__FILE__}:#{__LINE__}: relevant RbConfig::CONFIG values:"
%w[target_os target_cpu CC CXX].each do |key|
Expand All @@ -23,7 +24,12 @@ class TestCase < Minitest::Test
attr_accessor :webrick

def start_webrick(path)
@webrick = WEBrick::HTTPServer.new(:Port => HTTP_PORT, :DocumentRoot => path).tap do |w|
@webrick = WEBrick::HTTPServer.new(
:Port => HTTP_PORT,
:DocumentRoot => path,
:Logger => Logger.new(File::NULL),
:AccessLog => [],
).tap do |w|
Thread.new do
w.start
end
Expand Down
5 changes: 5 additions & 0 deletions test/test_cmake.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,16 @@ def before_all
create_tar(@tar_path, @assets_path, "test-cmake-1.0")
start_webrick(File.dirname(@tar_path))

@logger = StringIO.new # IO to keep recipe logs in case we need to debug
@recipe = init_recipe

git_dir = File.join(@assets_path, "git")
with_custom_git_dir(git_dir) do
recipe.cook
end
rescue => e
puts @logger.string
raise e
end

def after_all
Expand Down Expand Up @@ -58,6 +62,7 @@ def test_install

def init_recipe
MiniPortileCMake.new("test-cmake", "1.0").tap do |recipe|
recipe.logger = @logger
recipe.files << "http://localhost:#{HTTP_PORT}/#{ERB::Util.url_encode(File.basename(@tar_path))}"
recipe.patch_files << File.join(@assets_path, "patch 1.diff")
end
Expand Down
9 changes: 9 additions & 0 deletions test/test_cook.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ def before_all
create_tar(@tar_path, @assets_path, "test mini portile-1.0.0")
start_webrick(File.dirname(@tar_path))

@logger = StringIO.new # IO to keep recipe logs in case we need to debug
@recipe = MiniPortile.new("test mini portile", "1.0.0").tap do |recipe|
recipe.logger = @logger
recipe.files << "http://localhost:#{HTTP_PORT}/#{ERB::Util.url_encode(File.basename(@tar_path))}"
recipe.patch_files << File.join(@assets_path, "patch 1.diff")
recipe.configure_options << "--option=\"path with 'space'\""
Expand All @@ -22,6 +24,9 @@ def before_all
recipe.cook
end
end
rescue => e
puts @logger.string
raise e
end

def after_all
Expand Down Expand Up @@ -136,7 +141,9 @@ def before_all

create_tar(@tar_path, @assets_path, "test mini portile-1.0.0")

@logger = StringIO.new # IO to keep recipe logs in case we need to debug
@recipe = MiniPortile.new("test mini portile", "1.0.0").tap do |recipe|
recipe.logger = @logger
recipe.files << "file://#{@tar_path}"
recipe.patch_files << File.join(@assets_path, "patch 1.diff")
recipe.configure_options << "--option=\"path with 'space'\""
Expand Down Expand Up @@ -166,7 +173,9 @@ class TestCookAgainstSourceDirectory < TestCase
def setup
super

@logger = StringIO.new # IO to keep recipe logs in case we need to debug
@recipe ||= MiniPortile.new("test mini portile", "1.0.0").tap do |recipe|
recipe.logger = @logger
recipe.source_directory = File.expand_path("../assets/test mini portile-1.0.0", __FILE__)
end
end
Expand Down
152 changes: 75 additions & 77 deletions test/test_digest.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ def after_all
def setup
super
FileUtils.rm_rf("ports/archives")
@recipe = MiniPortile.new("test-digest", "1.0.0")
@logger = StringIO.new # IO to keep recipe logs in case we need to debug
@recipe = MiniPortile.new("test-digest", "1.0.0", logger: @logger)
end

def download_with_digest(key, klass)
Expand Down Expand Up @@ -68,28 +69,28 @@ def test_wrong_md5
end

def public_key
<<-KEY
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1
mI0EVwUhJQEEAMYxFhgaAdM2Ul5r+XfpqAaI7SOxB14eRjhFjhchy4ylgVxetyLq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ygzSyn8u7KORv+ainXfhwkvTO04mJmxAb2uT8ngKYFdPa1ABEBAAG0
J1Rlc3QgTWluaXBvcnRpbGUgPHRlc3RAbWluaXBvcnRpbGUub3JnPoi4BBMBAgAi
BQJXBSElAhsDBgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIXgAAKCRBl6D5JZMNwswAK
A/90Cdb+PX21weBR2Q6uR06M/alPexuXXyJL8ZcwbQMJ/pBBgcS5/h1+rQkBI/CN
qpXdDlw2Xys2k0sNwdjIw3hmYRzBrddXlCSW3Sifq/hS+kfPZ1snQmIjCgy1Xky5
QGCcPUxBUxzmra88LakkDO+euKK3hcrfeFIi611lTum1NLiNBFcFISUBBADoyY6z
2PwH3RWUbqv0VX1s3/JO3v3xMjCRKPlFwsNwLTBtZoWfR6Ao1ajeCuZKfzNKIQ2I
rn86Rcqyrq4hTj+7BTWjkIPOBthjiL1YqbEBtX7jcYRkYvdQz/IG2F4zVV6X4AAR
Twx7qaXNt67ArzbHCe5gLNRUK6e6OArkahMv7QARAQABiJ8EGAECAAkFAlcFISUC
GwwACgkQZeg+SWTDcLNFiwP/TR33ClqWOz0mpjt0xPEoZ0ORmV6fo4sjjzgQoHH/
KTdsabJbGp8oLQGW/mx3OxgbsAkyZymb5H5cjaF4HtSd4cxI5t1C9ZS/ytN8pqfR
e29SBje8DAAJn2l57s2OddXLPQ0DUwCcdNEaqgHwSk/Swxc7K+IpfvjLKHKUZZBP
4Ko=
=SVWi
-----END PGP PUBLIC KEY BLOCK-----
KEY
end

def test_with_valid_gpg_signature
Expand Down Expand Up @@ -130,7 +131,7 @@ def test_with_invalid_gpg_signature
exception = assert_raises(RuntimeError){
@recipe.download
}
assert_equal("signature mismatch", exception.message)
assert_includes(exception.message, "signature mismatch")
end

def test_with_invalid_key
Expand All @@ -144,60 +145,58 @@ def test_with_invalid_key
}
}
exception = assert_raises(RuntimeError){ @recipe.download }
assert_equal("invalid gpg key provided", exception.message)
assert_includes(exception.message, "invalid gpg key provided")
end

def test_with_different_key_than_one_used_to_sign
puts "################"

key = <<-KEY
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1
mQENBE7SKu8BCADQo6x4ZQfAcPlJMLmL8zBEBUS6GyKMMMDtrTh3Yaq481HB54oR
0cpKL05Ff9upjrIzLD5TJUCzYYM9GQOhguDUP8+ZU9JpSz3yO2TvH7WBbUZ8FADf
hblmmUBLNgOWgLo3W+FYhl3mz1GFS2Fvid6Tfn02L8CBAj7jxbjL1Qj/OA/WmLLc
m6BMTqI7IBlYW2vyIOIHasISGiAwZfp0ucMeXXvTtt14LGa8qXVcFnJTdwbf03AS
ljhYrQnKnpl3VpDAoQt8C68YCwjaNJW59hKqWB+XeIJ9CW98+EOAxLAFszSyGanp
rCqPd0numj9TIddjcRkTA/ZbmCWK+xjpVBGXABEBAAG0IU1heGltIERvdW5pbiA8
bWRvdW5pbkBtZG91bmluLnJ1PohGBBARAgAGBQJO01Y/AAoJEOzw6QssFyCDVyQA
n3qwTZlcZgyyzWu9Cs8gJ0CXREaSAJ92QjGLT9DijTcbB+q9OS/nl16Z/IhGBBAR
AgAGBQJO02JDAAoJEKk3YTmlJMU+P64AnjCKEXFelSVMtgefJk3+vpyt3QX1AKCH
9M3MbTWPeDUL+MpULlfdyfvjj4heBBARCAAGBQJRCTwgAAoJEFGFCWhsfl6CzF0B
AJsQ3DJbtGcZ+0VIcM2a06RRQfBvIHqm1A/1WSYmObLGAP90lxWlNjSugvUUlqTk
YEEgRTGozgixSyMWGJrNwqgMYokBOAQTAQIAIgUCTtIq7wIbAwYLCQgHAwIGFQgC
CQoLBBYCAwECHgECF4AACgkQUgqZk6HAUvj+iwf/b4FS6zVzJ5T0v1vcQGD4ZzXe
D5xMC4BJW414wVMU15rfX7aCdtoCYBNiApPxEd7SwiyxWRhRA9bikUq87JEgmnyV
0iYbHZvCvc1jOkx4WR7E45t1Mi29KBoPaFXA9X5adZkYcOQLDxa2Z8m6LGXnlF6N
tJkxQ8APrjZsdrbDvo3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
7yuff0n5+ytEt2KL51gOQE2uIxTCawHr12PsllPkbqPk/PagIttfEJqn9b0CrqPC
3HREePb2aMJ/Ctw/76COwn0mtXeIXLCTvBmznXfaMKllsqbsy2nCJ2P2uJjOntw=
=4JAR
-----END PGP PUBLIC KEY BLOCK-----
KEY

data_file = File.expand_path(File.join(File.dirname(__FILE__), 'assets', 'gpg-fixtures', 'data'))

Expand All @@ -209,7 +208,6 @@ def test_with_different_key_than_one_used_to_sign
}
}
exception = assert_raises(RuntimeError){ @recipe.download }
assert_equal("signature mismatch", exception.message)
assert_includes(exception.message, "signature mismatch")
end
end

Loading

0 comments on commit 250a0d5

Please sign in to comment.