Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 687792 - dev-util/meson-0.50.1: Fails test_sdl2_notfound_dependency
Summary: dev-util/meson-0.50.1: Fails test_sdl2_notfound_dependency
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: William Hubbs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-06-10 12:07 UTC by Annamarie Shafto
Modified: 2019-08-24 22:01 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Annamarie Shafto 2019-06-10 12:07:12 UTC
dev-util/meson-0.50.1 fails the test test_sdl2_notfound_dependency. The (not so clear) error message of meson is:

FAIL: test_sdl2_notfound_dependency (__main__.FailureTests)
----------------------------------------------------------------------
mesonbuild.dependencies.base.DependencyException: Dependency "sdl2" not found, tried pkgconfig

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "run_unittests.py", line 3696, in test_sdl2_notfound_dependency
    self.assertMesonRaises(code, self.nopkg)
  File "run_unittests.py", line 3623, in assertMesonRaises
    self.init(self.srcdir, extra_args=extra_args, inprocess=True)
AssertionError: "[Pp]kg-config.*not found" does not match "Dependency "sdl2" not found, tried pkgconfig" : dependency('foobarrr', method : 'pkg-config', required : false)
dependency('foobarrr2', method : 'pkg-config', required : false)
dependency('sdl2', method : 'pkg-config')


The reason is that it found and used pkg-config (where it was supposed to not find pkg-config) to not find sdl2. (The test expects a "pkg-config not found" instead of a "sdl2 notf found")

The reason is that the environment variable PKG_CONFIG is exported (which is done in src_test()), which somehow forces meson to use pkg-config although it is supposed to not use it (see the source of the test in run_unittests.py for details).

Solution:
Unset the PKG_CONFIG environment variable in python_test() before running the test suite as it is already done for the environment variables PYTHONDONTWRITEBYTECODE and XDG_DATA_HOME.
Comment 1 Larry the Git Cow gentoo-dev 2019-08-24 22:01:25 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=36ed230dfd5c5e1e955bdc5f34c5e5c662c34e46

commit 36ed230dfd5c5e1e955bdc5f34c5e5c662c34e46
Author:     Mike Gilbert <floppym@gentoo.org>
AuthorDate: 2019-08-24 22:01:12 +0000
Commit:     Mike Gilbert <floppym@gentoo.org>
CommitDate: 2019-08-24 22:01:12 +0000

    dev-util/meson: unset PKG_CONFIG before running tests
    
    Closes: https://bugs.gentoo.org/687792
    Package-Manager: Portage-2.3.71_p6, Repoman-2.3.17_p5
    Signed-off-by: Mike Gilbert <floppym@gentoo.org>

 dev-util/meson/meson-0.51.1.ebuild | 2 ++
 dev-util/meson/meson-9999.ebuild   | 2 ++
 2 files changed, 4 insertions(+)