After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 776718 - meson: prefix tests with component name
meson: prefix tests with component name
Status: RESOLVED NOTGNOME
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
unspecified
Other Linux
: Normal enhancement
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-01-02 15:29 UTC by Guillaume Desmottes
Modified: 2017-01-30 20:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
meson: prefix tests' names with 'gstreamer' (924 bytes, patch)
2017-01-02 15:30 UTC, Guillaume Desmottes
rejected Details | Review
README: update tests section (1.10 KB, patch)
2017-01-30 08:10 UTC, Guillaume Desmottes
committed Details | Review

Description Guillaume Desmottes 2017-01-02 15:29:38 UTC
'mesontest -C build --list' can be used to list all the available tests in subprojects. We can then use 'mesontest -C build/ $NAME' to run a specific test.

At the moment tests aren't namespaced by (sub)project, making it less clear which component they're testing and risking name clashes.
I'd suggest to prefix them with their component to fix this.

So for example "gst/gstbuffer" would become "gstreamer/gst/gstbuffer".
Comment 1 Guillaume Desmottes 2017-01-02 15:30:02 UTC
Created attachment 342724 [details] [review]
meson: prefix tests' names with 'gstreamer'

Make it clear they are testing the 'gstreamer' (core) component.
Comment 2 Guillaume Desmottes 2017-01-02 15:30:26 UTC
If you're ok with this idea I'll update the other components as well.
Comment 3 Tim-Philipp Müller 2017-01-02 19:55:28 UTC
I feel this shouldn't be needed and meson should handle any clashes by using subproject names automatically already. (Doesn't it already?)
Comment 4 Nirbheek Chauhan 2017-01-02 20:15:33 UTC
I agree with Tim, it makes more sense to namespace this on the Meson end, not in our build files. That will also ensure that there aren't test name collisions in the future.
Comment 5 Nirbheek Chauhan 2017-01-02 20:55:34 UTC
So I tested the current behaviour, and if you run 'mesontest generic/states', it will run all the 'generic/states' tests:

    $ mesontest generic/states -C build
    ninja: Entering directory '$PWD/build'
    ninja: no work to do.
    Running: generic/states 1/1
    Running: generic/states 1/1
    Running: generic/states 1/1
    $

But there's no way to run one of them in particular, and it's not so easy to figure out which one failed if one of them failed without proper debugging messages.

Should definitely do some namespacing upstream since that's the only fool-proof way to do it.
Comment 6 Tim-Philipp Müller 2017-01-02 21:09:31 UTC
Then we should just namespace those generic tests that are duplicated everywhere imho ;)
Comment 7 Guillaume Desmottes 2017-01-03 08:51:49 UTC
Ok, I reported this issue to meson: https://github.com/mesonbuild/meson/issues/1273

Let's close this for now, I'll reopen if meson upstream disagrees that's something which should be fixed in mesontest itself.
Comment 8 Guillaume Desmottes 2017-01-30 08:08:45 UTC
It's now fixed with latest mesontest: https://github.com/mesonbuild/meson/pull/1279

I'll update to gst-build's README to make it clear how to use it.
Comment 9 Guillaume Desmottes 2017-01-30 08:10:34 UTC
Created attachment 344506 [details] [review]
README: update tests section

- Add example to list all tests
- Add example to run all tests of a specific component
- Update example running one specific test to avoid test name clashes
with other components.
Comment 10 Tim-Philipp Müller 2017-01-30 20:00:06 UTC
Comment on attachment 344506 [details] [review]
README: update tests section

Thanks:

commit 5a06cf2807bcf94587ff49ad91932971bb6550d7
Author: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Date:   Mon Jan 30 09:08:59 2017 +0100

    README: update tests section
    
    - Add example to list all tests
    - Add example to run all tests of a specific component
    - Update example running one specific test to avoid test name clashes
    with other components.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=776718