GNOME Bugzilla – Bug 754380
validate: Add support to run only particular test generators
Last modified: 2018-11-03 11:07:29 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.
Created attachment 310395 [details] [review] add support to run only particular generators Please review..
ping :)
Review of attachment 310395 [details] [review]: You should give a name to the generators and make it generic.
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 :)
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?
(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???
I mean doing something similare to: https://phabricator.freedesktop.org/diffusion/GSTDEV/browse/master/validate/launcher/main.py;0f7105d317328808272e554a9a138b5c8b47dc68$131
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 :)
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.
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.
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.
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.
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.
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.
-- 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.