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

Comments

Projects
None yet
4 participants
@terceiro
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

This comment has been minimized.

Show comment
Hide comment
@kou

kou Jul 3, 2011

Member

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.

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

This comment has been minimized.

Show comment
Hide comment
@terceiro

terceiro Jul 3, 2011

Contributor

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

Contributor

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

This comment has been minimized.

Show comment
Hide comment
@kou

kou Jul 4, 2011

Member

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

Member

kou commented Jul 4, 2011

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

@mtasaka

This comment has been minimized.

Show comment
Hide comment
@mtasaka

mtasaka Dec 31, 2013

Member

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

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

This comment has been minimized.

Show comment
Hide comment

dai-vdr added a commit to dai-vdr/pkg-config that referenced this issue Jul 20, 2017

@dai-vdr dai-vdr referenced this issue Jul 20, 2017

Closed

fix #6 #13

@dai-vdr

This comment has been minimized.

Show comment
Hide comment
@dai-vdr
Contributor

dai-vdr commented Apr 21, 2018

kou added a commit that referenced this issue Apr 28, 2018

Use Requires.private before Requires
GitHub: #6

Reported by HIGUCHI Daisuke. Thanks!!!
@kou

This comment has been minimized.

Show comment
Hide comment
@kou

kou Apr 28, 2018

Member

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

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

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

This comment has been minimized.

Show comment
Hide comment
@dai-vdr

dai-vdr Apr 28, 2018

Contributor

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?

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

This comment has been minimized.

Show comment
Hide comment
@kou

kou Apr 28, 2018

Member

Ah, I see.
This should be closed.

Member

kou commented Apr 28, 2018

Ah, I see.
This should be closed.

@kou kou closed this Apr 28, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment