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 775540 - check: Allow listing unit tests names
check: Allow listing unit tests names
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
unspecified
Other All
: Normal enhancement
: 1.11.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-12-02 23:26 UTC by Thibault Saunier
Modified: 2016-12-16 16:48 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
check: Allow listing unit tests names (969 bytes, patch)
2016-12-02 23:26 UTC, Thibault Saunier
none Details | Review
check: Allow listing unit tests names (4.33 KB, patch)
2016-12-12 19:58 UTC, Thibault Saunier
committed Details | Review

Description Thibault Saunier 2016-12-02 23:26:07 UTC
This happens setting the GST_CHECK_LIST_TESTS env variable
Comment 1 Thibault Saunier 2016-12-02 23:26:11 UTC
Created attachment 341280 [details] [review]
check: Allow listing unit tests names
Comment 2 Thibault Saunier 2016-12-12 14:24:53 UTC
Anything against that?
Comment 3 Tim-Philipp Müller 2016-12-12 14:49:03 UTC
It seems a bit weird to do that via an env var, wouldn't a command line option be better? Or is command line option problematic because not all main functions in tests use the macro?
Comment 4 Thibault Saunier 2016-12-12 14:51:59 UTC
(In reply to Tim-Philipp Müller from comment #3)
> It seems a bit weird to do that via an env var, wouldn't a command line
> option be better? Or is command line option problematic because not all main
> functions in tests use the macro?

Yes this is why I did not do it that way, also there is currently no option.
I guess I could change that though but I am not sure it is worth it, if you think it is I am fine making sure we use the macro everywhere and add options.
Comment 5 Thibault Saunier 2016-12-12 19:58:17 UTC
Created attachment 341842 [details] [review]
check: Allow listing unit tests names

Adding options while running gst_check_init
Comment 6 Tim-Philipp Müller 2016-12-16 14:40:39 UTC
Looks fine to me, but does it work in the real world? :)
Comment 7 Thibault Saunier 2016-12-16 14:57:00 UTC
(In reply to Tim-Philipp Müller from comment #6)
> Looks fine to me, but does it work in the real world? :)

Surely not working otherwise it would be useless to add :P

I am using it so that we can use gst-validate-launcher and all its feature about getting backtraces and stuff to run our unit tests (and I actually run each test separately thanks to the feature added in that bz).
Comment 8 Tim-Philipp Müller 2016-12-16 15:23:33 UTC
Let's get it in then and we can fix up any issues that come up.

I suspect some unit tests might have a custom main() that's why I'm asking.
Comment 9 Thibault Saunier 2016-12-16 15:28:57 UTC
(In reply to Tim-Philipp Müller from comment #8)
> Let's get it in then and we can fix up any issues that come up.
> 
> I suspect some unit tests might have a custom main() that's why I'm asking.

In the ones run on meson builds, it is all fine, basically in the custom main we need to call gst_check_init() before actually creating the testsuite, and then it works just fine (I already fixed it in the GES where it was not the case)
Comment 10 Thibault Saunier 2016-12-16 16:47:27 UTC
Attachment 341842 [details] pushed as f7255f3 - check: Allow listing unit tests names