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 752518 - validate:launcher: Improvements for --media-paths option
validate:launcher: Improvements for --media-paths option
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-devtools
git master
Other Linux
: Normal enhancement
: 1.5.90
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-07-17 06:02 UTC by Vineeth
Modified: 2015-08-16 13:38 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
improve uri generation for --medias-paths (1.54 KB, patch)
2015-07-17 06:03 UTC, Vineeth
none Details | Review
skip setting up testsuite for --medias-paths (1.56 KB, patch)
2015-07-17 06:06 UTC, Vineeth
none Details | Review
improve uri generation for --medias-paths (1.51 KB, patch)
2015-07-17 07:46 UTC, Vineeth
none Details | Review
skip setting up testsuite for --medias-paths (1.24 KB, patch)
2015-07-17 07:46 UTC, Vineeth
committed Details | Review
improve uri generation for --medias-paths (1.51 KB, patch)
2015-08-03 23:48 UTC, Vineeth
committed Details | Review

Description Vineeth 2015-07-17 06:02:18 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.
Comment 1 Vineeth 2015-07-17 06:03:20 UTC
Created attachment 307598 [details] [review]
improve uri generation for --medias-paths
Comment 2 Vineeth 2015-07-17 06:06:07 UTC
Created attachment 307599 [details] [review]
skip setting up testsuite for --medias-paths
Comment 3 Thibault Saunier 2015-07-17 07:33:09 UTC
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
Comment 4 Thibault Saunier 2015-07-17 07:35:16 UTC
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
Comment 5 Vineeth 2015-07-17 07:46:27 UTC
Created attachment 307602 [details] [review]
improve uri generation for --medias-paths

updated with abspath. Please review.
Comment 6 Vineeth 2015-07-17 07:46:52 UTC
Created attachment 307603 [details] [review]
skip setting up testsuite for --medias-paths

removed Force argument. Please review
Comment 7 Thibault Saunier 2015-07-23 10:18:55 UTC
Review of attachment 307602 [details] [review]:

OK
Comment 8 Thibault Saunier 2015-07-23 10:19:43 UTC
Review of attachment 307603 [details] [review]:

OK
Comment 9 Vineeth 2015-08-03 23:48:29 UTC
Created attachment 308709 [details] [review]
improve uri generation for --medias-paths

rebasing the patch
Comment 10 Nicolas Dufresne (ndufresne) 2015-08-05 20:52:06 UTC
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 11 Nicolas Dufresne (ndufresne) 2015-08-05 20:52:19 UTC
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
Comment 12 Nicolas Dufresne (ndufresne) 2015-08-05 20:52:32 UTC
Thanks.