Skip to content
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

Tests depend on the exact order of the pkg-config output #6

Closed
terceiro opened this issue Jul 2, 2011 · 9 comments
Closed

Tests depend on the exact order of the pkg-config output #6

terceiro opened this issue Jul 2, 2011 · 9 comments

Comments

@terceiro
Copy link
Contributor

terceiro commented Jul 2, 2011

At least on my system, pkg-config and /usr/bin/pkg-config generate the flags in a different order, and that makes some tests fail:

$ rake
(in /home/terceiro/src/debian/pkg-ruby-extras/ruby-pkg-config)
NOTE: Gem::Specification#has_rdoc= is deprecated with no replacement. It will be removed on or after 2011-10-01.
Gem::Specification#has_rdoc= called from /usr/lib/ruby/vendor_ruby/hoe.rb:454
.
/usr/bin/ruby1.8 -w -Ilib:bin:test:. -e 'require "rubygems"; require "test/unit"; require "test/test_pkg_config.rb"' -- 
Loaded suite -e
Started
FF.........
Finished in 0.2802 seconds.

  1) Failure:
test_cflags(PkgConfigTest)
    [./test/test_pkg_config.rb:112:in `assert_pkg_config'
     ./test/test_pkg_config.rb:20:in `test_cflags']:
<"-pthread -I/usr/include/freetype2 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/tmp/local/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/libpng12"> expected but was
<"-pthread -I/usr/include/cairo -I/usr/include/glib-2.0 -I/tmp/local/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12">.

  2) Failure:
test_cflags_only_I(PkgConfigTest)
    [./test/test_pkg_config.rb:112:in `assert_pkg_config'
     ./test/test_pkg_config.rb:25:in `test_cflags_only_I']:
<"-I/usr/include/freetype2 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/tmp/local/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/libpng12"> expected but was
<"-I/usr/include/cairo -I/usr/include/glib-2.0 -I/tmp/local/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12">.

11 tests, 26 assertions, 2 failures, 0 errors
rake aborted!
Command failed with status (1): [/usr/bin/ruby1.8 -w -Ilib:bin:test:. -e 'r...]

(See full trace by running task with --trace)

I suggest to just ignore the order, like this:

http://anonscm.debian.org/gitweb/?p=pkg-ruby-extras/ruby-pkg-config.git;a=commitdiff;h=6d16d2fa7adad6d51d84f52377df29b9c51ae657

@kou
Copy link
Member

kou commented Jul 3, 2011

I think pkg-config gem should work like pkg-config command.
So we should change lib/pkg-config.rb not test/test_pkg_config.rb but I don't have time to fix it for now. (I need to prepare slides for RubyKaigi2011.)

Please ignore the error for now. I'll fix it after RubyKaigi 2011.

@terceiro
Copy link
Contributor Author

terceiro commented Jul 3, 2011

ok, thanks for looking at it. It would be nice if you made a release after fixing this.

kou added a commit that referenced this issue Jul 4, 2011
@kou
Copy link
Member

kou commented Jul 4, 2011

I've release 1.1.2 without this fix but it includes many of your contributions!

@mtasaka
Copy link
Member

mtasaka commented Dec 31, 2013

This is still a issue with released 1.1.5.
So on Fedora I add similar patch as
http://pkgs.fedoraproject.org/cgit/rubygem-pkg-config.git/commit/?id=982fedb13f4d09e137b3f0bbd0f6f684fb8cac5e

@dai-vdr
Copy link
Contributor

dai-vdr commented Mar 14, 2014

@dai-vdr dai-vdr mentioned this issue Jul 20, 2017
@dai-vdr
Copy link
Contributor

dai-vdr commented Apr 21, 2018

this bug was revived...:

kou added a commit that referenced this issue Apr 28, 2018
GitHub: #6

Reported by HIGUCHI Daisuke. Thanks!!!
@kou
Copy link
Member

kou commented Apr 28, 2018

Thanks. I've fixed and released a new version.

I hope that you open a new issue instead of reusing existing issue.

@dai-vdr
Copy link
Contributor

dai-vdr commented Apr 28, 2018

I see but this issue has been open for a long time (i did not reopen it).
Are there any reasons to keep it open, or could you please close it?

@kou
Copy link
Member

kou commented Apr 28, 2018

Ah, I see.
This should be closed.

@kou kou closed this as completed Apr 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants