mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-10 03:19:40 +00:00
validate: Use ges-launch recursing path new feature
And fix path to URI conversion
This commit is contained in:
parent
2077e76aa2
commit
9c5009c724
1 changed files with 5 additions and 14 deletions
|
@ -74,7 +74,7 @@ class GESTest(GstValidateTest):
|
||||||
|
|
||||||
def set_sample_paths(self):
|
def set_sample_paths(self):
|
||||||
if not self.options.paths:
|
if not self.options.paths:
|
||||||
if not self.options.recurse_paths:
|
if self.options.disable_recurse:
|
||||||
return
|
return
|
||||||
paths = [os.path.dirname(utils.url2path(self.project_uri))]
|
paths = [os.path.dirname(utils.url2path(self.project_uri))]
|
||||||
else:
|
else:
|
||||||
|
@ -86,19 +86,10 @@ class GESTest(GstValidateTest):
|
||||||
for path in paths:
|
for path in paths:
|
||||||
# We always want paths separator to be cut with '/' for ges-launch
|
# We always want paths separator to be cut with '/' for ges-launch
|
||||||
path = path.replace("\\", "/")
|
path = path.replace("\\", "/")
|
||||||
quote_uri(path)
|
if not self.options.disable_recurse:
|
||||||
if self.options.recurse_paths:
|
self.add_arguments("--sample-path-recurse", quote_uri(path))
|
||||||
self.add_arguments("--sample-paths", path)
|
|
||||||
for root, dirs, files in os.walk(path):
|
|
||||||
for directory in dirs:
|
|
||||||
self.add_arguments("--sample-paths",
|
|
||||||
quote_uri(os.path.join(path,
|
|
||||||
root,
|
|
||||||
directory)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
else:
|
else:
|
||||||
self.add_arguments("--sample-paths", utils.path2url(path))
|
self.add_arguments("--sample-path", quote_uri(path))
|
||||||
|
|
||||||
def build_arguments(self):
|
def build_arguments(self):
|
||||||
GstValidateTest.build_arguments(self)
|
GstValidateTest.build_arguments(self)
|
||||||
|
@ -201,7 +192,7 @@ Available options:""")
|
||||||
default=os.path.join(utils.DEFAULT_GST_QA_ASSETS,
|
default=os.path.join(utils.DEFAULT_GST_QA_ASSETS,
|
||||||
"ges-projects"),
|
"ges-projects"),
|
||||||
help="Paths in which to look for moved medias")
|
help="Paths in which to look for moved medias")
|
||||||
group.add_argument("-r", "--recurse-paths", dest="recurse_paths",
|
group.add_argument("-r", "--disable-recurse-paths", dest="disable_recurse",
|
||||||
default=False, action="store_true",
|
default=False, action="store_true",
|
||||||
help="Whether to recurse into paths to find medias")
|
help="Whether to recurse into paths to find medias")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue