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

blueprint-compiler: update to 0.14.0 #1547

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

v1993
Copy link
Contributor

@v1993 v1993 commented Jun 12, 2024

No description provided.

@v1993
Copy link
Contributor Author

v1993 commented Jun 12, 2024

Any idea what's going on with MacOS/Alpine failures? I can't seem to find any useful error messages in logs.

@benoit-pierre
Copy link
Contributor

Apparently no tests were ran, Cf. unittest documentation:

The testRunner argument can either be a test runner class or an already created instance of it. By default main calls sys.exit() with an exit code indicating success (0) or failure (1) of the tests run. An exit code of 5 indicates that no tests were run or skipped.

@benoit-pierre
Copy link
Contributor

benoit-pierre commented Jun 12, 2024

See python/cpython#113661.

Anyway, no tests are discovered is the underlying issue, because of this:

test('tests', py, args: ['-m', 'unittest'], workdir: meson.source_root())

And meson.source_root() will return the parent project source root:

meson.source_root()

Returns a string with the absolute path to the source root directory.

This function will return the source root of the parent project if called from a subproject, which is usually not what you want. Try using meson.current_source_dir() or meson.project_source_root(). In the rare cases where the root of the main project is needed, use meson.global_source_root() that has the same behaviour but with a more explicit name.

So no tests are discovered.

Once the call is patched to use meson.project_source_root(), the tests fail as expected because of missing dependencies:

======================================================================
ERROR: tests.test_samples (unittest.loader._FailedTest.tests.test_samples)
----------------------------------------------------------------------
ImportError: Failed to import test module: tests.test_samples
Traceback (most recent call last):
  File "/usr/lib/python3.11/unittest/loader.py", line 419, in _find_test_path
    module = self._get_module_from_name(name)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/unittest/loader.py", line 362, in _get_module_from_name
    __import__(name)
  File "/wrapdb/subprojects/blueprint-compiler-v0.12.0/tests/test_samples.py", line 24, in <module>
    import gi
ModuleNotFoundError: No module named 'gi'


----------------------------------------------------------------------
Ran 7 tests in 0.004s

FAILED (errors=3)
==============================================================================


Summary of Failures:

1/1 tests FAIL            0.08s   exit status 1

@neheb
Copy link
Collaborator

neheb commented Jun 22, 2024

Install py3-gobject3

v1993 and others added 2 commits June 22, 2024 18:14
@benoit-pierre
Copy link
Contributor

That still does not fix the underlying problem: https://gitlab.gnome.org/jwestman/blueprint-compiler/-/merge_requests/192.

@neheb
Copy link
Collaborator

neheb commented Jun 23, 2024

Yeah. Unfortunate.

@v1993 v1993 changed the title blueprint-compiler: update to 0.12.0 blueprint-compiler: update to 0.14.0 Aug 26, 2024
"blueprint-compiler": {
"_comment": "py3-gobject3 needed for tests",
"alpine_packages": [
"py3-gobject"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"py3-gobject"
"py3-gobject3",
"gtk4.0",

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

Successfully merging this pull request may close these issues.

3 participants