GNOME Bugzilla – Bug 752518
validate:launcher: Improvements for --media-paths option
Last modified: 2015-08-16 13:38:03 UTC
I would like to have a couple on improvements when testing with --media-paths option 1) right now we have to specify the full path, like /home/user/gst/master/media/ But when inside master directory, would like to specify only media/ and expect it to work. Using os.getcwd to get the current working directory and create uri based on that. This way we can either just pass media/ or pass the full path as parameters. 2) in validate.py, some mixer test generators are being added by default. When passing --media-paths, i would not want to test these. So instead of setting up the validate test suite, just call tester.register_defaults(). I am attaching patches for the same. Please review and provide comments if it makes sense.
Created attachment 307598 [details] [review] improve uri generation for --medias-paths
Created attachment 307599 [details] [review] skip setting up testsuite for --medias-paths
Review of attachment 307598 [details] [review]: ::: validate/launcher/apps/gstvalidate.py @@ -670,3 +670,3 @@ for root, dirs, files in os.walk(path): for f in files: - fpath = os.path.join(path, root, f) + fpath = os.path.join(os.getcwd(), path, root, f) you should use os.path.abspath for that
Review of attachment 307599 [details] [review]: ::: validate/launcher/baseclasses.py @@ +1124,3 @@ self.options.testsuites = testsuites + def _setup_testsuites(self, force=False): No need for the force parametter here, that function is private so nobody will ever call it with force=true
Created attachment 307602 [details] [review] improve uri generation for --medias-paths updated with abspath. Please review.
Created attachment 307603 [details] [review] skip setting up testsuite for --medias-paths removed Force argument. Please review
Review of attachment 307602 [details] [review]: OK
Review of attachment 307603 [details] [review]: OK
Created attachment 308709 [details] [review] improve uri generation for --medias-paths rebasing the patch
Comment on attachment 308709 [details] [review] improve uri generation for --medias-paths commit ac172a9ac6244256fd39b251051bf3e3076453a1 Author: Vineeth TM <vineeth.tm@samsung.com> Date: Tue Aug 4 08:35:16 2015 +0900 validate:launcher: improve uri generation for --medias-path When --medias-paths option is being used, right now we have to specify the full path, like /home/user/gst/master/media/ But when inside master directory, would like to specify only media/ and expect it to work. Using os.path.abspath and create uri based on that. This way we can either just pass media/ or pass the full path as parameters. https://bugzilla.gnome.org/show_bug.cgi?id=752518
Comment on attachment 307603 [details] [review] skip setting up testsuite for --medias-paths commit b37c550b2b33907d15cb1c893572c0571e8a3749 Author: Vineeth TM <vineeth.tm@samsung.com> Date: Fri Jul 17 16:45:35 2015 +0900 validate:launcher: skip setting up test suite for --medias-paths in validate.py, some mixer test generators are being added by default. When passing --media-paths, i would not want to test these. So instead of setting up the validate test suite, just call tester.register_defaults(). https://bugzilla.gnome.org/show_bug.cgi?id=752518
Thanks.