On Wed, Sep 9, 2020 at 10:25 AM Andrea Bolognani <abologna(a)redhat.com> wrote:
On Wed, 2020-09-09 at 16:09 +0200, Pavel Hrdina wrote:
> On Wed, Sep 09, 2020 at 03:56:08PM +0200, Andrea Bolognani wrote:
> > Taking a step back,
> > what are the reasons one might want to call either meson or ninja to
> > run the test suite?
>
> It might be more natural for users to run `ninja && ninja test` but
> since meson 0.54.0 it is possible to run `meson compile && meson test`.
>
> So the technically the only reason to use `meson test` instead of
> `ninja test` is to use all the options of meson test.
It looks like you can even do 'meson install', so basically you can
do everything without ever invoking ninja directly.
Interestingly, the %meson RPMs macros, at least in the form they
currently exist in Fedora, seem to only use meson instead of ninja
for running tests in addition to the setup phase, where of course
using ninja is not an option. I wonder if, over time, that will
change...
The Meson macros are maintained as part of Meson itself upstream, and
it was changed to use Meson directly with Meson 0.55.0:
https://github.com/mesonbuild/meson/commit/0a61f511aa1960ac0d3f9b5e50e35f...
This change was inspired by the change done in Fedora for CMake:
https://src.fedoraproject.org/rpms/cmake/c/4e79ea67732aecb6232c33dfff6ab0...
It is incredibly unlikely for Meson to switch back, because this
abstraction makes it possible to trivially switch out backends without
changing the interface.
--
真実はいつも一つ!/ Always, there's only one truth!