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
@ -179,8 +179,10 @@ class GstValidateManager(TestsManager, Loggable):
|
|||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
args.extend(["--expected-results", media_info])
|
args.extend(["--expected-results", media_info])
|
||||||
else:
|
elif self.options.generate_info:
|
||||||
args.extend(["--output-file", media_info])
|
args.extend(["--output-file", media_info])
|
||||||
|
else:
|
||||||
|
return True
|
||||||
|
|
||||||
subprocess.check_output(args)
|
subprocess.check_output(args)
|
||||||
self._check_discovering_info(media_info, uri)
|
self._check_discovering_info(media_info, uri)
|
||||||
@ -233,7 +235,7 @@ class GstValidateManager(TestsManager, Loggable):
|
|||||||
if "__uri__" in pipe:
|
if "__uri__" in pipe:
|
||||||
for uri, config in self._list_uris():
|
for uri, config in self._list_uris():
|
||||||
npipe = pipe
|
npipe = pipe
|
||||||
if scenario in SEEKING_REQUIERED_SCENARIO:
|
if scenario != "none":
|
||||||
if config.getboolean("media-info", "seekable") is False:
|
if config.getboolean("media-info", "seekable") is False:
|
||||||
self.debug("Do not run %s as %s does not support seeking",
|
self.debug("Do not run %s as %s does not support seeking",
|
||||||
scenario, uri)
|
scenario, uri)
|
||||||
|
@ -71,6 +71,9 @@ def main():
|
|||||||
parser.add_option("-n", "--no-color", dest="no_color",
|
parser.add_option("-n", "--no-color", dest="no_color",
|
||||||
action="store_true", default=False,
|
action="store_true", default=False,
|
||||||
help="Set it to output no colored text in the terminal")
|
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)
|
loggable.init("GST_VALIDATE_LAUNCHER_DEBUG", True, False)
|
||||||
|
|
||||||
@ -91,11 +94,6 @@ def main():
|
|||||||
|
|
||||||
tests_launcher.set_settings(options, args)
|
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 options.paths == [os.path.join(DEFAULT_GST_QA_ASSETS, "medias")]:
|
||||||
if os.path.exists(DEFAULT_GST_QA_ASSETS):
|
if os.path.exists(DEFAULT_GST_QA_ASSETS):
|
||||||
launch_command("cd %s && git pull --rebase" % 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))
|
launch_command("git clone %s %s" % (DEFAULT_GST_QA_ASSETS_REPO, DEFAULT_GST_QA_ASSETS))
|
||||||
|
|
||||||
tests_launcher.list_tests()
|
tests_launcher.list_tests()
|
||||||
|
|
||||||
|
if options.list_tests:
|
||||||
|
for test in tests_launcher.tests:
|
||||||
|
printc(test)
|
||||||
|
return 0
|
||||||
|
|
||||||
tests_launcher.run_tests()
|
tests_launcher.run_tests()
|
||||||
tests_launcher.final_report()
|
tests_launcher.final_report()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user