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 754380 - validate: Add support to run only particular test generators
validate: Add support to run only particular test generators
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-devtools
git master
Other Linux
: Normal enhancement
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-09-01 07:20 UTC by Vineeth
Modified: 2018-11-03 11:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
add support to run only particular generators (3.94 KB, patch)
2015-09-01 07:23 UTC, Vineeth
none Details | Review
alternate way to run particular generators (4.92 KB, patch)
2015-11-12 06:15 UTC, Vineeth
none Details | Review
add support to run particular generators. (7.26 KB, patch)
2015-11-23 08:21 UTC, Vineeth
none Details | Review
add support to run particular generators. (7.22 KB, patch)
2015-11-24 06:35 UTC, Vineeth
none Details | Review
testsuites: the function register_defaults is changed (1.57 KB, patch)
2015-11-24 06:37 UTC, Vineeth
none Details | Review
simplify mixer generator so that it can be called using --generator option (8.70 KB, patch)
2015-11-24 06:43 UTC, Vineeth
none Details | Review
default testsuites: Change the testsuite according to test manager changes (3.65 KB, patch)
2015-11-24 06:45 UTC, Vineeth
none Details | Review

Description Vineeth 2015-09-01 07:20:22 UTC
Not sure if this is already present..
It will be better if it will be possible to run only particular generators as needed instead of running all of them( media-check, playbin, transcode, mixer).

If already present please tell how to do..

If not i am attaching a patch here to get this behavior.
Comment 1 Vineeth 2015-09-01 07:23:30 UTC
Created attachment 310395 [details] [review]
add support to run only particular generators

Please review..
Comment 2 Vineeth 2015-11-11 00:34:31 UTC
ping :)
Comment 3 Thibault Saunier 2015-11-11 08:56:53 UTC
Review of attachment 310395 [details] [review]:

You should give a name to the generators and make it generic.
Comment 4 Vineeth 2015-11-12 06:15:20 UTC
Created attachment 315306 [details] [review]
alternate way to run particular generators

The generators are already named.
But right now all three generators are getting added by default..
        self.add_generators([GstValidatePlaybinTestsGenerator(self),
                             GstValidateMediaCheckTestsGenerator(self),
                             GstValidateTranscodingTestsGenerator(self)])

So whenever i run validate using --medias-path all three generators get executed.


I am attaching an alternate way of doing this instead of checking in populate tests, checking for the same while adding generators

This method needs the options to be passed along.
So if --generator is given by user then it will select based on that, else it will run all default generators.



Or do you have any other method in mind, please explain how to :)
Comment 5 Thibault Saunier 2015-11-12 09:19:05 UTC
Review of attachment 315306 [details] [review]:

Looks good like that, please have a look at my comment :)

::: validate/launcher/main.py
@@ -427,2 +428,5 @@
                              " Note that it is currently implemented only"
                              " for the X  server thanks to Xvfb (which is requeried in that case)")
+    parser.add_argument("-gen", "--generator", dest="generators", action="store",
+                        help="Helps in running particular generators as needed"
+                             " Can be one of playbin, media-check, transcode"

Could you please generate that stream from the currently avalaible generators instead of hard coding it?
Comment 6 Vineeth 2015-11-16 04:52:52 UTC
(In reply to Thibault Saunier from comment #5)
> Review of attachment 315306 [details] [review] [review]:
> 
> Looks good like that, please have a look at my comment :)
> 
> ::: validate/launcher/main.py
> @@ -427,2 +428,5 @@
>                               " Note that it is currently implemented only"
>                               " for the X  server thanks to Xvfb (which is
> requeried in that case)")
> +    parser.add_argument("-gen", "--generator", dest="generators",
> action="store",
> +                        help="Helps in running particular generators as
> needed"
> +                             " Can be one of playbin, media-check,
> transcode"
> 
> Could you please generate that stream from the currently avalaible
> generators instead of hard coding it?

Sorry i am not able to understand. By 'instead of hard coding' you mean, instead of playbin, media-check, transcode use GstValidatePlaybinTestsGenerator, GstValidateMediaCheckTestsGenerator, GstValidateTranscodingTestsGenerator???
Comment 8 Vineeth 2015-11-23 08:21:24 UTC
Created attachment 316076 [details] [review]
add support to run particular generators.

Tried to get the generator names from the subclasses instead of hardcoding them. This is how the help looks like


  -gen GENERATORS, --generator GENERATORS
                        Helps in running particular generators as needed. Can be one of 
                          * playbin
                          * mediacheck
                          * transcode
                         or combination of them by a seperating comma


One small issue faced was, while getting the subclasses, we get 5 generators including pipeline generator and mixer generator. Since these are not added by default, these options should not be shown. Hence added a blank name for these generators and skipping by checking for name.


Please review if this is how you are expecting it to work? or is there any better way :)
Comment 9 Thibault Saunier 2015-11-23 09:59:47 UTC
Review of attachment 316076 [details] [review]:

::: validate/launcher/apps/gstvalidate.py
@@ -844,3 +854,8 @@
-        self.add_generators([GstValidatePlaybinTestsGenerator(self),
-                             GstValidateMediaCheckTestsGenerator(self),
-                             GstValidateTranscodingTestsGenerator(self)])
+        if not options.generators:
+            self.add_generators([GstValidatePlaybinTestsGenerator(self),
+                                 GstValidateMediaCheckTestsGenerator(self),
... 5 more ...

Should be elif, and I think we should allow registering the mixer generator here, so you should name those and add them only if they are specified.

Also you should add them iterating by subclass and comparing name, no need to hardcode anything here.
Comment 10 Vineeth 2015-11-24 06:35:14 UTC
Created attachment 316136 [details] [review]
add support to run particular generators.

Made changes to run through the subclasses and add the generator instead of hard coding and comparing them.
Making mixer generator to be added similarly needs a bit of modification.
Hence adding a separate patch for the same. Both are not dependant actually. So can be merged seperately. Once the mixer patch is applied along with this patch then we can add mixer generator as well via --generator option.
Comment 11 Vineeth 2015-11-24 06:37:23 UTC
Created attachment 316137 [details] [review]
testsuites: the function register_defaults is changed

While adding support for patch 
316136: add support to run particular generators.
the function register_defaults is changed and options also needs to be passed.
Changing the same in integration testsuites.
Comment 12 Vineeth 2015-11-24 06:43:27 UTC
Created attachment 316138 [details] [review]
simplify mixer generator so that it can be called using --generator option

Right now mixer generator implementation is such that it needs to be called with the below parameters
    def __init__(self, name, test_manager, mixer, media_type, converter="",
                 num_sources=3, mixed_srcs={}, valid_scenarios=[]):

But it can be simplified and all the logic moved to test manager so that the init can be simply
    def __init__(self, test_manager):

This facilitates adding the mixer generator from --generator option and simplifies the calling from default testsuites.
Comment 13 Vineeth 2015-11-24 06:45:32 UTC
Created attachment 316139 [details] [review]
default testsuites: Change the testsuite according to test manager changes

With the modification done in patch
316138: simplify mixer generator so that it can be called using --generator option

We no longer need to pass any extra parameter while adding mixer generator.
Comment 14 Vineeth 2015-11-24 06:53:17 UTC
First two patches are independent of mixer generator related patches.. So first we can go ahead with those changes if they are ok.

for mixer generator i have moved the mixer parameters initialization from testsuite to testmanager. is this ok?
i feel only with these changes we can be able to register the mixer generator here.

Please review.
Comment 15 Vineeth 2015-12-22 06:23:58 UTC
ping :)
Comment 16 Vineeth 2016-02-17 07:01:29 UTC
ping :)
Comment 17 GStreamer system administrator 2018-11-03 11:07:29 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-devtools/issues/19.