-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test --use-system-libraries option in Travis CI #128
Conversation
Oh, I have doubled the number of build jobs so that this option is tested against every Ruby. However, if it's a problem, I can reduce it to a single additional job, e.g:
|
Actually, $RUBY_GPGME_USE_SYSTEM_LIBRARIES environment variable is tested, but it is equivalent.
16a6e5a
to
aa7722d
Compare
Tests have failed for all Travis jobs which are testing Possibly all these errors/failures have single reason. I have investigated one of them:
A failing test looks as follows: it "selects who to sign for" do
crypto = GPGME::Crypto.new
sign = crypto.sign "Hi there", :signer => KEYS.last[:sha]
key = GPGME::Key.get(KEYS.last[:sha]) # <= FAILS HERE
# ...
end The KEYS.map { |k| k[:sha] }
# => ["[email protected]", "[email protected]", "[email protected]", "[email protected]"] However, the last key is unavailable in GPGME for some reason: GPGME::Key.find(:public).flat_map(&:uids)
# => [#<GPGME::UserID Test number 1 <[email protected]> validity=unknown, signatures=[]>, #<GPGME::UserID Test number 2 <[email protected]> validity=unknown, signatures=[]>, #<GPGME::UserID Test number 3 <[email protected]> validity=unknown, signatures=[]>]
GPGME::Key.find(:secret).flat_map(&:uids)
# => [#<GPGME::UserID Test number 1 <[email protected]> validity=unknown, signatures=[]>, #<GPGME::UserID Test number 2 <[email protected]> validity=unknown, signatures=[]>, #<GPGME::UserID Test number 3 <[email protected]> validity=unknown, signatures=[]>] Interestingly, when I tried to import that missing key by hand, it has been added: GPGME::Key.import(KEYS.last[:public])
GPGME::Key.find(:public).flat_map(&:uids)
# => [#<GPGME::UserID Test number 1 <[email protected]> validity=unknown, signatures=[]>, #<GPGME::UserID Test number 2 <[email protected]> validity=unknown, signatures=[]>, #<GPGME::UserID Test number 3 <[email protected]> validity=unknown, signatures=[]>, #<GPGME::UserID Test number 4 <[email protected]> validity=unknown, signatures=[]>]
GPGME::Key.get(KEYS.last[:sha]) # <= NO ERROR! Some race condition, perhaps? (EDIT: Adding |
Relates to ueno#128
Relates to ueno#128
Relates to ueno#128
Closing in favor of #191. |
This gem can be installed with a
--use-system-libraries
option, but till now it wasn't tested. This pull request fixes that.Actually,
$RUBY_GPGME_USE_SYSTEM_LIBRARIES
environment variable is used instead of--use-system-libraries
, but they are equivalent.