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

Fix Meson build system to be able to run tests #475

Merged
merged 10 commits into from
Feb 24, 2022
Merged

Conversation

smcv
Copy link
Collaborator

@smcv smcv commented Feb 19, 2022

Looks like #432 was less complete than I had intended, sorry.

Successfully tested on Debian 10, Ubuntu 20.04, Debian 11 and Debian unstable.


  • meson.build: Remove unnecessary check for sh

  • meson: Build tests with equivalent of -I$(top_srcdir) -I$(top_builddir)

  • meson: Build the try-syscall helper

  • meson: Run the Python test script with Python, not bash

    The python build option can be used to swap to a different interpreter,
    for environments like the Steam Runtime where the python3 executable in
    the PATH is extremely old but there is a better interpreter available.

    This is treated as non-optional, because Meson is written in Python,
    so the situation where there is no Python interpreter at build-time
    shouldn't arise.

  • meson: Make G_TEST_SRCDIR, G_TEST_BUILDDIR match Autotools

  • meson: Run test scripts from $srcdir

  • tests: Fix compiler warnings for unused arguments

  • meson: Actually build and run the tests

  • Disable test-specifying-pidns.sh under 'meson dist' while I investigate

    This test is hanging when run under 'meson dist' for some reason, but
    not when run under 'meson test', and not locally, only in the Github
    Workflow-based CI. Disable it for now.

  • meson: Improve compatibility with Meson 0.49

    That version doesn't allow more than two arguments for define_variable.

Signed-off-by: Simon McVittie <smcv@collabora.com>
Signed-off-by: Simon McVittie <smcv@collabora.com>
Signed-off-by: Simon McVittie <smcv@collabora.com>
tests/meson.build Outdated Show resolved Hide resolved
The python build option can be used to swap to a different interpreter,
for environments like the Steam Runtime where the python3 executable in
the PATH is extremely old but there is a better interpreter available.

This is treated as non-optional, because Meson is written in Python,
so the situation where there is no Python interpreter at build-time
shouldn't arise.

Signed-off-by: Simon McVittie <smcv@collabora.com>
Signed-off-by: Simon McVittie <smcv@collabora.com>
Signed-off-by: Simon McVittie <smcv@collabora.com>
Signed-off-by: Simon McVittie <smcv@collabora.com>
Signed-off-by: Simon McVittie <smcv@collabora.com>
This test is hanging when run under 'meson dist' for some reason, but
not when run under 'meson test', and not locally, only in the Github
Workflow-based CI. Disable it for now.

Signed-off-by: Simon McVittie <smcv@collabora.com>
That version doesn't allow more than two arguments for define_variable.

Signed-off-by: Simon McVittie <smcv@collabora.com>
@smcv smcv changed the title Fix Meson build system Fix Meson build system to be able to run tests Feb 20, 2022
@smcv
Copy link
Collaborator Author

smcv commented Feb 24, 2022

@cgwalters, @alexlarsson or @mwleeds: would you mind taking a look at this? I'd like to do a bubblewrap 0.6.0 release (mainly for #432 and #453, https://github.com/containers/bubblewrap/releases/edit/untagged-a976e728bb68f2b6c8c5), but it seems silly for the first release with a Meson build system to have known bugs for which a solution is available.

@cgwalters cgwalters merged commit 5b76c60 into containers:main Feb 24, 2022
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.

None yet

3 participants