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

Fixed unbound cmvers variable #4549

Merged
merged 2 commits into from
Nov 26, 2018
Merged

Fixed unbound cmvers variable #4549

merged 2 commits into from
Nov 26, 2018

Conversation

mensinda
Copy link
Member

Fixes a crash.

@jon-turney
Copy link
Member

jon-turney commented Nov 26, 2018

Can you explain why this case wasn't hit by the test added in #4444? Is it possible to add something to exercise this case (per http://mesonbuild.com/Contributing.html#tests)

@mensinda
Copy link
Member Author

This bug is triggered when CMake is not found by meson. Since CMake is installed in all test environments this bug doesn't occur there. I will try to add a unit test for this, which should be possible since the CMake executable can also be retrieved via os.environ['CMAKE']. Though I don't know if it is OK to set environment variables in unit tests.

@lazka
Copy link
Contributor

lazka commented Nov 26, 2018

master hit this now because the azure msys2 build doesn't have cmake installed (should it? I didn't see a test difference)

@mensinda
Copy link
Member Author

The test currently should only run on Linux (it is in the linuxlike directory). It seams like this bug was triggerd in another test case where the first dependcy method failed. In this case CMake is automatically used as a fallback. I have not looked at the specific test case yet.

In short yes.

@jpakkane jpakkane merged commit 37ffff0 into mesonbuild:master Nov 26, 2018
@mensinda
Copy link
Member Author

The CI still fails. I am looking into it.

@mensinda mensinda deleted the cmake branch November 26, 2018 22:28
@mensinda
Copy link
Member Author

The caused by the CMake backend raising an exception with the message "CMake not found" but the test_dependency unit test requires an exception with the format [Dd]ependency.*not found. The CMake backend raises multiple other exceptions with different messages. Should I update the unit test or the messages in the exception?

@mensinda
Copy link
Member Author

@lazka Actually no. Azure does not need CMake since the tests (currently) only run on Linux. Though this might change in the future.

@lazka
Copy link
Contributor

lazka commented Nov 27, 2018

thanks @mensinda. There is still an error on master

======================================================================
FAIL: test_dependency (__main__.FailureTests)
----------------------------------------------------------------------
mesonbuild.dependencies.base.DependencyException: CMake not found.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "run_unittests.py", line 117, in wrapped
    return f(*args, **kwargs)
  File "run_unittests.py", line 2999, in test_dependency
    self.assertMesonRaises(contents, match)
  File "run_unittests.py", line 2956, in assertMesonRaises
    self.init(self.srcdir, extra_args=extra_args, inprocess=True)
AssertionError: "[Dd]ependency.*not found" does not match "CMake not found." : dependency('zlibfail')

I've opened #4552 to install cmake for msys2 which makes things work here.

jpakkane pushed a commit that referenced this pull request Nov 27, 2018
tbeloqui pushed a commit to pexip/meson that referenced this pull request Aug 22, 2019
tbeloqui pushed a commit to pexip/meson that referenced this pull request Aug 22, 2019
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.

4 participants