mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-02 14:20:06 +00:00
validate:tools: Add an option to generate .media_info files
So we can properly choose what media should be tested only placing media_file as needed.
This commit is contained in:
parent
32e1acbf88
commit
eb23274a5b
2 changed files with 13 additions and 7 deletions
|
@ -179,8 +179,10 @@ class GstValidateManager(TestsManager, Loggable):
|
|||
return True
|
||||
else:
|
||||
args.extend(["--expected-results", media_info])
|
||||
else:
|
||||
elif self.options.generate_info:
|
||||
args.extend(["--output-file", media_info])
|
||||
else:
|
||||
return True
|
||||
|
||||
subprocess.check_output(args)
|
||||
self._check_discovering_info(media_info, uri)
|
||||
|
@ -233,7 +235,7 @@ class GstValidateManager(TestsManager, Loggable):
|
|||
if "__uri__" in pipe:
|
||||
for uri, config in self._list_uris():
|
||||
npipe = pipe
|
||||
if scenario in SEEKING_REQUIERED_SCENARIO:
|
||||
if scenario != "none":
|
||||
if config.getboolean("media-info", "seekable") is False:
|
||||
self.debug("Do not run %s as %s does not support seeking",
|
||||
scenario, uri)
|
||||
|
|
|
@ -71,6 +71,9 @@ def main():
|
|||
parser.add_option("-n", "--no-color", dest="no_color",
|
||||
action="store_true", default=False,
|
||||
help="Set it to output no colored text in the terminal")
|
||||
parser.add_option("-g", "--generate-media-info", dest="generate_info",
|
||||
action="store_true", default=False,
|
||||
help="Set it in order to generate the missing .media_infos files")
|
||||
|
||||
loggable.init("GST_VALIDATE_LAUNCHER_DEBUG", True, False)
|
||||
|
||||
|
@ -91,11 +94,6 @@ def main():
|
|||
|
||||
tests_launcher.set_settings(options, args)
|
||||
|
||||
if options.list_tests:
|
||||
for test in tests_launcher.tests:
|
||||
printc(test)
|
||||
return 0
|
||||
|
||||
if options.paths == [os.path.join(DEFAULT_GST_QA_ASSETS, "medias")]:
|
||||
if os.path.exists(DEFAULT_GST_QA_ASSETS):
|
||||
launch_command("cd %s && git pull --rebase" % DEFAULT_GST_QA_ASSETS)
|
||||
|
@ -103,6 +101,12 @@ def main():
|
|||
launch_command("git clone %s %s" % (DEFAULT_GST_QA_ASSETS_REPO, DEFAULT_GST_QA_ASSETS))
|
||||
|
||||
tests_launcher.list_tests()
|
||||
|
||||
if options.list_tests:
|
||||
for test in tests_launcher.tests:
|
||||
printc(test)
|
||||
return 0
|
||||
|
||||
tests_launcher.run_tests()
|
||||
tests_launcher.final_report()
|
||||
|
||||
|
|
Loading…
Reference in a new issue